logoAcademy

Transfer Native Tokens

Interact with native tokens

In this exercise, you will learn how to transfer native tokens on your own ECC in the Dijets network using Foundry, a powerful toolkit for EVM application development. We will use the blockchain you have create in the last chapter.

Create account

dijets key create myAddress

Save the Key to an Environment Variable

Retrieve the new address with and store it in an environment variable to match the following commands.

dijets key list -l --blockchains mydijetschain --keys myAddress
export MYADDRESS=0x...

Check the Balance

Now we are checking the balance of that key on your ECC. Make sure to replace the --rpc-url flag with appropriate name of your ECC.

cast balance $MYADDRESS --rpc-url mydijetschain

Transfer funds

cast send $MYADDRESS --value 200000  --private-key $PK --rpc-url mydijetschain

Check balances to confirm transfer

cast balance $MYADDRESS --rpc-url mydijetschain

As you saw, funds were transfered from one count to another within the same chain (mydijetschain)

On this page