Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(evmutil)!: implement MsgConvertCosmosCoinToERC20 #1603

Merged
merged 7 commits into from
May 30, 2023

Conversation

pirtleshell
Copy link
Member

@pirtleshell pirtleshell commented May 25, 2023

Description

  • adds message server handler for MsgConvertCosmosCoinToERC20
  • registers the message for codec
  • includes CLI cmd
  • intend follow-up prs for the following:
    • event emission
    • e2e test
kava tx evmutil convert-cosmos-coin-to-erc20 --help
converts asset native to Cosmos Co-chain to an ERC20 on the EVM Co-chain

Usage:
  kava tx evmutil convert-cosmos-coin-to-erc20 [receiver_0x_address] [amount] [flags]

Examples:
Convert 500 ATOM and send ERC20 to 0x03db6b11F47d074a532b9eb8a98aB7AdA5845087:
  kava tx evmutil convert-cosmos-coin-to-erc20 0x03db6b11F47d074a532b9eb8a98aB7AdA5845087 500000000ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2 --from <key> --gas 2000000

Checked out some initial gas things:

  • 1st convert with deploy used 1,100,009 gas
  • 2nd convert (which just transfers sdk.Coin & mints ERC20) used 152,648 gas

Checklist

  • Changelog has been updated as necessary.

CHANGELOG.md Outdated Show resolved Hide resolved
- (evmutil) [#1603] Add MsgConvertCosmosCoinToERC20 for converting representing an sdk.Coin as an ERC20 in the EVM

### Client Breaking
- (evmutil) [#1603] Renamed error `ErrConversionNotEnabled` to `ErrEVMConversionNotEnabled`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😃 big fan of explicitness as a pillar of reliable distributed systems design (read: all web and blockchain software)

x/evmutil/client/cli/tx.go Outdated Show resolved Hide resolved
@pirtleshell pirtleshell merged commit 741f1e4 into master May 30, 2023
@pirtleshell pirtleshell deleted the rp-deploy-erc20s branch May 30, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants