Polymer Challenge 4

Template for IBC enabled Solidity contracts

Polymer Labs . Establishing the next generation of the internet, by scaling IBC interoperability to all blockchains. | http://polymerlabs.org

Use template

Installation Package

sudo apt-get update
sudo apt-get upgrade
apt install npm
sudo apt install git

Install Node js

sudo apt install curl wget gnupg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install nodejs
node --version
npm --version

Install Foundry

curl -L https://foundry.paradigm.xyz | bash
foundryup 

For VPS

source /root/.bashrc

For Gitpod

Install Just Program

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

Create API Explorer OP and Base

Create Alchemi API Key for OP and Base

Clone

git clone https://github.com/polymerdevs/testnet-challenge-3-template.git

edit config.json

nano testnet-challenge-3-template/config.json

replace

      "portAddr": "0x009FD9729DBAed7e04184D0484c92CD6F7988D62",

edit CCqueryUC.sol

nano testnet-challenge-3-template/contracts/CCqueryUC.sol

Replace and change

recvedPackets.push(UcPacketWithChannel(channelId, packet));

(address sender, string memory query) = abi.decode(packet.appData, (address, string));

bytes memory payload = abi.encode(sender, "mint");

return AckPacket(true, payload);
nano testnet-challenge-3-template/Justfile

and scroll, copy this script

run-challenge-4:
    echo "Running Challenge 4"
    just deploy base base
    just sanity-check
    just send-packet optimism
    echo "Thank you for participating in Challenge!"
    echo "Submit your evidence in the #proof channel in our Discord Server!"
just run-challenge-4

Done Packet has been sent!

Check your channel IBC on https://sepolia.polymer.zone/packets

Last updated