Skip to content

Conversation

@vladjdk
Copy link
Member

@vladjdk vladjdk commented Apr 16, 2025

ref: #17

reopens: #36

reecepbcups and others added 2 commits March 31, 2025 12:00
Co-Authored-By: Joel Smith <joelsmith.2019@gmail.com>
@vladjdk vladjdk changed the title Add convert coin endpoint feat: add convert coin endpoint Apr 16, 2025
@vladjdk vladjdk marked this pull request as ready for review April 16, 2025 20:01
Copy link
Contributor

@Eric-Warehime Eric-Warehime left a comment

Choose a reason for hiding this comment

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

Probably need tests around the new keeper method and the message validation.

Co-authored-by: Eric Warehime <eric.warehime@gmail.com>
// ConvertCoin mints a ERC20 token representation of the native Cosmos coin
// that is registered on the token mapping.
rpc ConvertCoin(MsgConvertCoin) returns (MsgConvertCoinResponse) {
option (google.api.http).get = "/cosmos/evm/erc20/v1/tx/convert_coin";
Copy link

Choose a reason for hiding this comment

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

In what cases is this gateway endpoint used?
It's a bit confusing because it's msg_server and not query.

Copy link
Member Author

Choose a reason for hiding this comment

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

It converts a coin from a bank token to an ERC20.

@vladjdk vladjdk merged commit 07f2a66 into main May 9, 2025
20 checks passed
@vladjdk vladjdk deleted the add-convert-coin-endpoint branch May 9, 2025 04:30
zsystm pushed a commit to zsystm/evm that referenced this pull request Nov 2, 2025
* feat(erc20): add convert coin endpoint

Co-Authored-By: Joel Smith <joelsmith.2019@gmail.com>

* lints

* Update proto/cosmos/evm/erc20/v1/tx.proto

Co-authored-by: Eric Warehime <eric.warehime@gmail.com>

* return error on negative amount

* NewMsgConvertCoin

* add negative error

* msg validation testing

* keeper call testing

* lints

---------

Co-authored-by: Reece Williams <reecepbcups@gmail.com>
Co-authored-by: Joel Smith <joelsmith.2019@gmail.com>
Co-authored-by: Eric Warehime <eric.warehime@gmail.com>
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.

5 participants