Open leonz789 opened 1 month ago
The updates primarily involve modifications to the Oracle module's parameters, validation logic, and testing. Key changes include updating the CmdCreatePrice
command to require more arguments, commenting out an authority string in the keeper, and enhancing parameter functionalities with new fields and validation. Moreover, new test cases for updating parameters relating to token feeders and tokens have been added, alongside error handling and utility functions.
File(s) | Change Summary |
---|---|
x/oracle/client/cli/tx_create_price.go |
Updated the number of minimum arguments required for CmdCreatePrice from 0 to 8. |
x/oracle/keeper/keeper.go |
Commented out the authority string declaration affecting KeeperStaking logic. |
x/oracle/keeper/msg_server_update_params.go |
Enhanced UpdateParams to add sources, chains, tokens, rules, and token feeders, with validation. |
x/oracle/keeper/msg_server_update_params_test.go , x/oracle/keeper/params_test.go |
Added test cases to verify updated parameter functionalities for token feeders and tokens. |
x/oracle/types/errors.go |
Introduced a new error ErrInvalidParams . |
x/oracle/types/genesis_test.go |
Updated TestGenesisState_Validate to include additional parameters. |
x/oracle/types/message_update_params.go |
Added import for json , a comment for MsgUpdateParams in ValidateBasic , and NewMsgUpdateParams function. |
x/oracle/types/params.go |
Added new fields and validation logic to Params struct, alongside utility functions for sources, tokens, and rules. |
🐇 A rabbit hops in lines of code,
With new fields and rules to decode,
Tokens and feeders, validation too,
Error handling fresh and new.
Tests, updates, parameters array,
Making sure the Oracle's here to stay! 🌟
[!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 always opted into early access features.
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?
Please add comments for the functions which validate the
struct
members ofParams
updated
Description
Implement service for updating params
Closes #XXX
Summary by CodeRabbit
New Features
ErrInvalidParams
.Bug Fixes
CmdCreatePrice
command to require 8 arguments.Tests
Documentation
Params
struct.