Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
martineckardt committed Sep 7, 2024
2 parents 999a3c1 + ab750cc commit f1b8445
Showing 1 changed file with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,15 @@ In the previous sections of this chapter we manually deployed and interacted wit
<Steps>
<Step>

### Deploy ERC-20 Contract on C-chain

Now we will deploy an ERC-20 contract. We are using OpenZeppelin's example contract which has been renamed to `ERC20.sol` for convenience.

```bash
forge create --rpc-url local-c --private-key $PK src/8-erc20-to-erc20-interchain-token-transfer/ERC20.sol:TOK
```
### Deploy Avalanche Interchain Token Transfer Contracts

Add the contract address in the environment variables.
First retrieve the address of the ERC-20 token on C-Chain.

```bash
export ERC20_C_CHAIN=<"Deployed to" address>
echo $ERC20_C_CHAIN
```

Check your balance using the command below:
```bash
cast call --rpc-url local-c --private-key $PK $ERC20_C_CHAIN "balanceOf(address)(uint)" $FUNDED_ADDRESS
```
100,000 tokens should be returned.

</Step>
<Step>
### Deploy Avalanche Interchain Token Transfer Contracts

Next we will deploy two Interchain Token Transfer contracts. One for the source chain (C-Chain) and another on the destination chain (myblockchain).

Next we will deploy two Interchain Token Transfer contracts using the Avalanche CLI. It will deploy the contracts on the source chain (C-Chain) and on the destination chain (myblockchain) for us.

```bash
avalanche interchain tokenTransferrer deploy
Expand Down

0 comments on commit f1b8445

Please sign in to comment.