First complete all the steps mentioned here : First Article
Paste all the command all one by one -
git clone https://github.com/polymerdevs/testnet-challenge-3-template.git
cd testnet-challenge-3-template
cp .env.example .env
nano .env
Use W/A/S/D key to move the cursor and paste the API key and private key in the respective place in between the quotes, no need to paste any things in tenderly token.
Then press ctrl+x then type y and press ENTER
sudo add-apt-repository ppa:git-core/ppa
sudo apt update; apt install git
sudo apt install curl
curl -s https://deb.nodesource.com/setup_18.x | sudo bash
sudo apt install nodejs -y
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm
nvm install 20
nvm use 20
curl -L https://foundry.paradigm.xyz | bash
source /home/gitpod/.bashrc
foundryup
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
sudo apt install just
just install
You need to Edit the contract CCQueryUC.sol
Open CCQueryUC.sol
file and search sendUniversalPacket
function
Then paste :
bytes memory payload = abi.encode(msg.sender, "crossChainQuery");
uint64 timeoutTimestamp = uint64((block.timestamp + timeoutSeconds) * 1000000000);
IbcUniversalPacketSender(mw).sendUniversalPacket(
channelId, IbcUtils.toBytes32(destPortAddr), payload, timeoutTimestamp
);
Again search for onUniversalAcknowledgement
function on the same file and again paste this code :
ackPackets.push(UcAckWithChannel(channelId, packet, ack));
(string memory _secretMessage) = abi.decode(ack.data, (string));
emit LogAcknowledgement(_secretMessage);
just run-challenge-3
Done you will see a message something like this :
Now Open the Explorer URL link in “PACKET IS ACKNOWLEDGED”
Go to logs section and then take a screenshot also copy the URL from searchbar
Now go to : IBC Explorer
and paste the Tx Hash of “PACKET HAS BEEN SENT”
Now click on “Delivered” and take a screenshot of it
Then submit proof in the proof channel something like this :
评论 (0)