-
Notifications
You must be signed in to change notification settings - Fork 118
feat: add convert coin endpoint #85
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
Conversation
Co-Authored-By: Joel Smith <joelsmith.2019@gmail.com>
Eric-Warehime
left a comment
There was a problem hiding this 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"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
* 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>
ref: #17
reopens: #36