Closed onikonychev closed 2 days ago
The submitted changes introduce a new feature to the NibiruChain/nibiru
project: the ability to register an existing Cosmos coin as an EVM ERC-20 fungible token, known as a "fun token." This feature includes modifications to .proto
files, new methods in the Keeper
struct, and associated test cases to ensure functionality and robustness.
File(s) | Summary |
---|---|
CHANGELOG.md |
Added a feature for creating a fun token from a coin in the EVM module. |
proto/eth/evm/v1/events.proto |
Added EventCreateFunTokenFromCoin message with fields denom , contract_address , and creator . |
proto/eth/evm/v1/tx.proto |
Added CreateFunTokenFromCoin RPC, messages MsgCreateFunTokenFromCoin and MsgCreateFunTokenFromCoinResponse . |
x/evm/keeper/funtoken_state.go |
Renamed variable funtoken to funToken in SafeInsert method. |
x/evm/keeper/msg_fun_token.go |
Introduced method CreateFunTokenFromCoin in Keeper struct to register Cosmos coin as fun token. |
x/evm/keeper/msg_fun_token_test.go |
Added TestMsgCreateFunTokenFromCoin in the keeper_test package. |
x/evm/msg.go |
Integrated MsgCreateFunTokenFromCoin , its ValidateBasic , and GetSigners methods. |
sequenceDiagram
participant User
participant Client
participant CosmosApp
participant EVMModule
participant Keeper
User->>Client: Initiate CreateFunTokenFromCoin Request
Client->>CosmosApp: Send MsgCreateFunTokenFromCoin
CosmosApp->>EVMModule: Forward MsgCreateFunTokenFromCoin
EVMModule->>Keeper: Call CreateFunTokenFromCoin Method
Keeper-->>EVMModule: Return MsgCreateFunTokenFromCoinResponse
EVMModule-->>CosmosApp: Response with new_contract_address
CosmosApp-->>Client: Return new_contract_address
Client-->>User: Display new_contract_address
CreateFunTokenFromCoin
feature requested in the issue.Amidst the chains that intertwine,
A coin transforms by design.
With magic code and tokens spun,
Cosmos meets EVM, the fun's begun.
In bytes and blocks, they come alive,
A rabbit's joy, the chains now thrive.
🌟🚀
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 50.00000%
with 15 lines
in your changes missing coverage. Please review.
Project coverage is 64.80%. Comparing base (
822d838
) to head (202a3bd
).:exclamation: Current head 202a3bd differs from pull request most recent head cd1ec0a
Please upload reports for the commit cd1ec0a to get more accurate results.
1942
Summary by CodeRabbit
New Features
Tests