Convert ERC-20 tokens to native coins
First, start a localnet
Create a fungible token mapping from an ERC-20 contract
First, deploy an ERC-20 contract. Then, run the following command:
CONTRACT_ADDRESS=0x76e03400dC49dD3Dbede29f5e11b0e7bc215F202
nibid tx evm create-funtoken-from-erc20 \
$CONTRACT_ADDRESS \
--from validator \
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 0.025unibi \
--yes | txThere should be a EventFunTokenCreated event that displays the new bank coin denom.
Send ERC-20 tokens to bank
Requires calling the FunToken precompile, which can be done with ethers.js.
Last updated
Was this helpful?