NibiruChain / nibiru

Nibiru Chain: The breakthrough smart contract platform ushering in the next era of money. Nibiru powers an ecosystem of dApps including perps, RWAs, and more.
https://nibiru.fi
Apache License 2.0
178 stars 208 forks source link

feat(evm): Impl a way to send ERC20 tokens to a Nibiru base account as bank coins using the `FunToken` mapping #1944

Closed Unique-Divine closed 1 day ago

Unique-Divine commented 2 weeks ago

Desired Behavior

As the user of a Nibiru EVM account, I want to send an EthereumTx to send ERC20 tokens as coins to a desired Nibiru base account (sdk.AccAddress) with the following arguments:

Arg Go Type Solidity Type
erc20 gethcommon.Address as string address
amount big.Int uint256
to sdk.AccAddress as string string

The bank coins sent to the receiving "nibi" address will be the ones specified by the FunToken mapping corresponding to my ERC20.

Notes