Testing v10.0.0-rc2 on Testnet | ERC-20 ===================== ## Multiple ERC-20 registration ### Deployed ERC-20 contracts using Remix - TTK1: 0xd43Ad9804631165aAeCe65C37FfF5799c46b0127 - TTK2: 0x59BDdFE49655271050B03c6eB7f99a2cA879AC26 - TTK3: 0x773775ac1f59a04caf3098A1685469d8fD6C2450 ### Submit proposal to register multiple ERC-20 pairs ```shell evmosd tx gov submit-legacy-proposal register-erc20 \ 0xd43Ad9804631165aAeCe65C37FfF5799c46b0127 \ 0x59BDdFE49655271050B03c6eB7f99a2cA879AC26 \ 0x773775ac1f59a04caf3098A1685469d8fD6C2450 \ --title="Test: Register multiple ERC-20 token pairs" \ --description="This is a proposal to test the new feature that allows registering multiple ERC-20 token pairs on the same proposal. Please, vote yes on this proposal to test the new functionality properly" \ --deposit="10000000000000000000atevmos" \ --from=my_key1 --keyring-backend=test \ --fees=2000000000010000atevmos --gas=2000000 -b block \ --chain-id=evmos_9000-4 \ --node https://evmos-testnet-rpc.polkachu.com:443 --yes ``` The resulting proposal number is [**108**](https://testnet.mintscan.io/evmos-testnet/proposals/108) ### Vote on the created proposal ```shell evmosd tx gov vote 108 yes --from=my_key1 --chain-id=evmos_9000-4 --yes --keyring-backend=test --fees=2000000000010000atevmos --gas=2000000 --node=https://evmos-testnet-rpc.polkachu.com:443 ``` ### Check if all token pairs were registered waiting for proposal to pass... https://testnet.mintscan.io/evmos-testnet/proposals/108 ## Multiple IBC coin registration ```shell evmosd tx gov submit-legacy-proposal register-coin /tmp/proposal.json \ --title="Test: Register multiple IBC coin token pairs" \ --description="This is a proposal to test the new feature that allows registering multiple IBC coins token pairs on the same proposal. Please, vote yes on this proposal to test the new functionality properly" \ --deposit="10000000000000000000atevmos" \ --from=my_key1 --keyring-backend=test \ --fees=2000002000000000atevmos --gas=8000000 -b block \ --chain-id=evmos_9000-4 \ --node https://evmos-testnet-rpc.polkachu.com:443 --yes ``` Using the following proposal.json: ```json { "metadata": [ { "description": "Wrapped Avax", "denom_units": [ { "denom": "ibc/2B84B3D7B8AA4B04607ACD2E5096D20B34D6D355D33F4F5DD4659449EB757597", "exponent": 0, "aliases": ["ibcwavax-wei"] }, { "denom": "WAVAX", "exponent": 6 } ], "base": "ibc/2B84B3D7B8AA4B04607ACD2E5096D20B34D6D355D33F4F5DD4659449EB757597", "display": "WAVAX", "name": "Wavax", "symbol": "WAVAX" }, { "description": "The native staking and governance token of the Spiking chain", "denom_units": [ { "denom": "ibc/66342056CCD564CD765A50BA5BB3AE1D4B7614088CC2521ABFB357D2A65E64A2", "exponent": 0, "aliases": ["ibcuspike"] }, { "denom": "SPIKE", "exponent": 6 } ], "base": "ibc/66342056CCD564CD765A50BA5BB3AE1D4B7614088CC2521ABFB357D2A65E64A2", "display": "SPIKE", "name": "Spike", "symbol": "SPIKE" }, { "description": "Wrapped BNB", "denom_units": [ { "denom": "ibc/8291F71592AEE7C593D5DC05C1B66CD190B2EEA74DF09D2B8BF57BF6C4E8BCAA", "exponent": 0, "aliases": ["ibcwbnb-wei"] }, { "denom": "WBNB", "exponent": 6 } ], "base": "ibc/8291F71592AEE7C593D5DC05C1B66CD190B2EEA74DF09D2B8BF57BF6C4E8BCAA", "display": "WBNB", "name": "WBnb", "symbol": "WBNB" } ] } ``` Resulting proposal id [**111**](https://testnet.mintscan.io/evmos-testnet/proposals/111) Vote yes on the proposal ```shell evmosd tx gov vote 111 yes --from=my_key1 --chain-id=evmos_9000-4 --yes --keyring-backend=test --fees=2000000000010000atevmos --gas=2000000 --node=https://evmos-testnet-rpc.polkachu.com:443 ``` ## Automatic coin conversion AFAIK only the Axelar-Evmos relayer by Polkachu is up and running. Tried with Evmos-Osmosis but got error: ```shell failed to execute message; message index: 0: cannot send packet using client (07-tendermint-8) with status Expired: client is not active ``` To solve this, need to coordinate IBC client upgrade with someone running a relayer on testnet. [Documentation](https://ibc.cosmos.network/main/ibc/proposals.html) ### Send IBC coin (`uaxl`) #### Token pair NOT registered From Axelar to Evmos: ```shell axelard tx ibc-transfer transfer transfer channel-61 evmos17rpc0rwcmehdcpczcpkzhwdguwqrjutnntdunf 2000000uaxl --node https://rpc-axelar-testnet.imperator.co:443 --from my_key1 --chain-id axelar-testnet-lisbon-3 -y ``` Check balance on Evmos: ```shell evmosd q bank balances evmos17rpc0rwcmehdcpczcpkzhwdguwqrjutnntdunf --node=https://evmos-testnet-rpc.polkachu.com:443 ``` Result: IBC coin not registered, should have balance in IBC denom ```shell balances: - amount: "58484874576729609940" denom: atevmos - amount: "2000000" denom: ibc/D70F005DE981F6EFFB3AD1DF85601258D1C01B9DEDC1F7C1B95C0993E83CF389 ``` Send back some tokens ```shell evmosd tx ibc-transfer transfer transfer channel-22 axelar1564c7upu7p45lx2e3zwpltmz8y5g57jd4j4y3y 1000000ibc/D70F005DE981F6EFFB3AD1DF85601258D1C01B9DEDC1F7C1B95C0993E83CF389 --from=my_key1 --chain-id=evmos_9000-4 --yes --keyring-backend=test --fees=2000000000010000atevmos --gas=2000000 --node=https://evmos-testnet-rpc.polkachu.com:443 ``` Received OK, all balances updated as expected on both chains #### Registered token pair - IBC coin To do this, we submitted a proposal for registering the token pair for AXL on testnet. Send Axl from Axelar to Evmos: ```shell axelard tx ibc-transfer transfer transfer channel-61 evmos17rpc0rwcmehdcpczcpkzhwdguwqrjutnntdunf 2000000uaxl --node https://rpc-axelar-testnet.imperator.co:443 --from my_key1 --chain-id axelar-testnet-lisbon-3 -y ``` On Evmos all previous IBC balance + the transfer amount is converted to ERC-20 (contract_addr =`0x5aD523d94Efb56C400941eb6F34393b84c75ba39`) Send back AXL as ERC-20 to Axelar chain ```shell evmosd tx ibc-transfer transfer transfer channel-22 axelar1564c7upu7p45lx2e3zwpltmz8y5g57jd4j4y3y 5000000erc20/0x5aD523d94Efb56C400941eb6F34393b84c75ba39 --from=my_key1 --chain-id=evmos_9000-4 --yes --keyring-backend=test --fees=2000000000010000atevmos --gas=2000000 --node=https://evmos-testnet-rpc.polkachu.com:443 ``` On Axelar, the funds are updated with the sent amount. On Evmos the ERC-20 funds are deducted properly. ### Send ERC-20 (registered pair) Send TTK1 ERC-20 tokens from Evmos to Axelar ```shell evmosd tx ibc-transfer transfer transfer channel-22 axelar1564c7upu7p45lx2e3zwpltmz8y5g57jd4j4y3y 3000000000000000000erc20/0xd43Ad9804631165aAeCe65C37FfF5799c46b0127 --from=my_key1 --chain-id=evmos_9000-4 --yes --keyring-backend=test --fees=2000000000010000atevmos --gas=2000000 --node=https://evmos-testnet-rpc.polkachu.com:443 ``` Check balance on Axelar: ```shell axelard q bank balances axelar1564c7upu7p45lx2e3zwpltmz8y5g57jd4j4y3y --node https://axelar-lisbon-rpc.allthatnode.com:26657 balances: - amount: "3000000000000000000" // TTK1 ERC-20 denom: ibc/ABD631F5026F3EA53EB80EC83FF09792A5439C7B83692874547BBDD22A37236E - amount: "500000000000000000" // aevmos denom: ibc/F510A39DDB7B08DEB76CEBAF9D7CE2D8D952BED2A0E5E91F07F53BBF50BBBEE0 - amount: "22994800" denom: uaxl ``` Send back the TTK1 tokens from Axelar (as IBC coins) to Evmos ```shell axelard tx ibc-transfer transfer transfer channel-61 evmos17rpc0rwcmehdcpczcpkzhwdguwqrjutnntdunf 2000000000000000000ibc/ABD631F5026F3EA53EB80EC83FF09792A5439C7B83692874547BBDD22A37236E --node https://axelar-lisbon-rpc.allthatnode.com:26657 --from my_key1 --chain-id axelar-testnet-lisbon-3 -y ``` The TTK1 tokens were received and converted to ERC-20 tokens on Evmos side. The Automated Coin Conversion was successful. ### EVMOS token From Evmos to Axelar: ```shell evmosd tx ibc-transfer transfer transfer channel-22 axelar1564c7upu7p45lx2e3zwpltmz8y5g57jd4j4y3y 2000000000000000000atevmos --from=my_key1 --chain-id=evmos_9000-4 --yes --keyring-backend=test --fees=2000000000010000atevmos --gas=2000000 --node=https://evmos-testnet-rpc.polkachu.com:443 ``` Check balance on Axelar: ```shell balances: - amount: "2000000000000000000" denom: ibc/F510A39DDB7B08DEB76CEBAF9D7CE2D8D952BED2A0E5E91F07F53BBF50BBBEE0 - amount: "23997600" denom: uaxl ``` Send back the EVMOS tokens from Axelar to Evmos ```shell axelard tx ibc-transfer transfer transfer channel-61 evmos17rpc0rwcmehdcpczcpkzhwdguwqrjutnntdunf 1500000000000000000ibc/F510A39DDB7B08DEB76CEBAF9D7CE2D8D952BED2A0E5E91F07F53BBF50BBBEE0 --node https://axelar-lisbon-rpc.allthatnode.com:26657 --from my_key1 --chain-id axelar-testnet-lisbon-3 -y ``` Received OK and balance of `atevmos` increased accordingly on the Evmos account ## Checking balances on IBC transfer escrow account on one chain & the total supply of coins of the other chain I performed this check to make sure all the transferred coins on one chain reach the other. There was a situation that the IBC transfers could not trigger the timeout. As a result, the sent funds neither reached the destination chain nor refunded the sender. After a few hours (more than 24hs), the timeout was processed and the corresponding escrowed funds were refunded to the sender. ``` // query escrowed tokens for channel-61 (evmos) ~ ❯ axelard q bank balances axelar1jmcglw0kv9k2wyj4h52yg66qtn6r5sxy59kkqq --node https://axelar-lisbon-rpc.allthatnode.com:26657 balances: - amount: "506399999999998000" denom: eth-wei - amount: "42932057" denom: uausdc - amount: "16473442" denom: uaxl - amount: "3579400000000000000" denom: wavax-wei - amount: "1348300000000000000" denom: wbnb-wei - amount: "590000000000000000" denom: wmatic-wei pagination: next_key: null total: "0" // query total supply of coins on chain evmosd query bank total --node=https://evmos-testnet-rpc.polkachu.com:443 ... - amount: "1348300000000000000" // wbnb-wei == escrowed on axelar denom: ibc/8291F71592AEE7C593D5DC05C1B66CD190B2EEA74DF09D2B8BF57BF6C4E8BCAA - amount: "3579400000000000000" // wavax-wei == escrowed on axelar denom: ibc/2B84B3D7B8AA4B04607ACD2E5096D20B34D6D355D33F4F5DD4659449EB757597 - amount: "4472400" // axl, delta with escrowed on axelar = 12001042 denom: ibc/D70F005DE981F6EFFB3AD1DF85601258D1C01B9DEDC1F7C1B95C0993E83CF389 ```