With the upcoming deployment of the Gravity bridge module on the Cosmos Hub, we will finally be able to transfer assets between Ethereum and Cosmos. We at blockscape wanted to celebrate this cosmic milestone by contributing something to the user experience — behold, the Gravity Bridge Portal.
- Metamask for an ERC-20 account/address (Guide)
- Keplr for a Cosmos account/address (Guide)
- Google Chrome or Mozilla Firefox browser
Setting Up Wallets
- Unlock your Metamask and Keplr wallets.
- Select Goerli Test Network in Metamask.
- Go to https://gravity.blockscape.network.
- Approve the addition of the chain to your Keplr wallet.
- Use the buttons in the app bar on the top right to connect your wallets.
- In Keplr, select the newly added chain (current: althea-testnet2v3) in the dropdown on the top.
- If you don’t already have an account/address in Keplr, please create one.
- Get ALTG token from Althea’s faucet. Open up a terminal and use the following command:
curl -vv -XPOST http://testnet2.althea.net/get_altg/YOUR_COSMOS_ADDR
- In Metamask, select the Goerli Test Network in the dropdown on the top.
- If you don’t already have an ERC-20 account/address in Metamask, please create one.
- Make sure you have enough GöETH on your address. You can either open up a terminal and use…
curl -vv -XPOST http://testnet2.althea.net/get_eth/YOUR_ERC-20_ADDR
…or, you can use the authenticated faucet.
Getting ERC-20 Tokens
For the purpose of this demo, we will be using a bunch of Görli test tokens. You can choose any one you like:
- WEENUS — 0xaFF4481D10270F50f203E0763e2597776068CBc5
- XEENUS — 0x022E292b44B5a146F2e8ee36Ff44D3dd863C915c
- YEENUS — 0xc6fDe3FD2Cc2b173aEC24cc3f267cb3Cd78a26B7
- ZEENUS — 0x1f9061B953bBa0E36BF50F21876132DcF276fC6e
Then, please follow the instructions below.
- Open Metamask, and click on “Send”.
- Paste any one of the token contract addresses from above into the field.
- Make sure “Amount” says “0 ETH”, and click “Next”.
- Click “Confirm”.
- Switch to the “Assets” tab, scroll down and click “Add Token”.
- Paste the token contract address you chose in step 2 into the “Token Contract Address” field.
- Click “Next”.
By now, you should have received 1,000 of your chosen tokens. If you don’t want to use any of the test tokens listed above, you can also deploy your own ERC-20 token on the Görli testnet.
ERC-20 to Cosmos
- Token contract address
The contract address of the ERC-20 token you want to send to Cosmos. Assuming, you have gotten one of the tokens mentioned in the beginning of this article, you can either select that one here, or paste in any other token contract address of your choice.
(As there’s only a Görli testnet deployment, only ERC-20 tokens deployed on Görli can be sent over the bridge.)
The amount of the ERC-20 token specified in “Token Contract Address” you would like to send to Cosmos.
- Cosmos destination address
The Cosmos address that should receive the ERC-20 token. The address must be an althea1… address.
Cosmos to ERC-20
The denominator of the Cosmos token you want to send to Ethereum. Choose which one you want to send from the dropdown.
The amount of the Cosmos token specified in “Denom” you want to send to Ethereum.
- ERC-20 destination address
The Ethereum address that should receive the Cosmos token on the Goerli testnet.
And that’s it for this guide, we hope you found it helpful and had some fun sending tokens back and forth with the Gravity Bridge Portal! Until next time!