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(evm): tx for creating fun token from coin #1946

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1917](https://github.com/NibiruChain/nibiru/pull/1917) - test(e2e-evm): TypeScript support. Type generation from compiled contracts. Formatter for TS code.
- [#1922](https://github.com/NibiruChain/nibiru/pull/1922) - feat(evm): tracer option is read from the config.
- [#1936](https://github.com/NibiruChain/nibiru/pull/1936) - feat(evm): EVM fungible token protobufs and encoding tests
- [#1946](https://github.com/NibiruChain/nibiru/pull/1946) - feat(evm): tx for creating fun token from coin

#### Dapp modules: perp, spot, oracle, etc

Expand Down
6 changes: 6 additions & 0 deletions proto/eth/evm/v1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ message EventBlockBloom {
// bloom is the bloom filter of the block
string bloom = 1;
}

message EventCreateFunTokenFromCoin {
string denom = 1;
string contract_address = 2;
string creator = 3;
}
18 changes: 18 additions & 0 deletions proto/eth/evm/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ service Msg {
// UpdateParams defined a governance operation for updating the x/evm module parameters.
// The authority is hard-coded to the Cosmos SDK x/gov module account
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);

// CreateFunTokenFromCoin registers existing cosmos coin as an evm erc-20 fungible token contract.
rpc CreateFunTokenFromCoin(MsgCreateFunTokenFromCoin) returns (MsgCreateFunTokenFromCoinResponse);
}

// MsgEthereumTx encapsulates an Ethereum transaction as an SDK message.
Expand Down Expand Up @@ -176,3 +179,18 @@ message MsgUpdateParams {
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
message MsgUpdateParamsResponse {}


// MsgCreateFunTokenFromCoin: sdk.Msg that registers cosmos denom as an evm erc-20 contract
message MsgCreateFunTokenFromCoin {
string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
// cosmos denom. Ex: ibc/abc123def
string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ];
}

// MsgCreateFunTokenFromCoinResponse is the return value of MsgCreateFunTokenFromCoin
message MsgCreateFunTokenFromCoinResponse {
// NewContractAddress: erc-20 contract address. Ex: 0x123abc456
string new_contract_address = 1
[ (gogoproto.moretags) = "yaml:\"new_contract_address\"" ];
}
Loading
Loading