-
Notifications
You must be signed in to change notification settings - Fork 22
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: update to latest chain #221
Conversation
WalkthroughThe recent updates focus on enhancing the Changes
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
Files selected for processing (12)
- contracts/atomic-order-example/Cargo.toml (1 hunks)
- contracts/dummy/Cargo.toml (1 hunks)
- contracts/injective-cosmwasm-mock/src/contract.rs (1 hunks)
- contracts/injective-cosmwasm-mock/src/query.rs (2 hunks)
- packages/injective-cosmwasm/Cargo.toml (1 hunks)
- packages/injective-cosmwasm/src/exchange_mock_querier.rs (1 hunks)
- packages/injective-cosmwasm/src/oracle/types.rs (1 hunks)
- packages/injective-cosmwasm/src/querier.rs (3 hunks)
- packages/injective-cosmwasm/src/query.rs (2 hunks)
- packages/injective-std/Cargo.toml (1 hunks)
- packages/injective-std/src/types/injective/exchange/v1beta1.rs (2 hunks)
- packages/injective-testing/Cargo.toml (1 hunks)
Files skipped from review due to trivial changes (3)
- packages/injective-cosmwasm/Cargo.toml
- packages/injective-std/Cargo.toml
- packages/injective-testing/Cargo.toml
Additional comments not posted (8)
contracts/dummy/Cargo.toml (1)
35-35
: Updatedinjective-cosmwasm
to version "0.2.23-rc1" aligns with the PR's objectives to update dependencies.contracts/atomic-order-example/Cargo.toml (1)
37-37
: Updatedinjective-cosmwasm
to version "0.2.23-rc1" aligns with the PR's objectives to update dependencies.packages/injective-cosmwasm/src/oracle/types.rs (1)
32-36
: AddedScalingOptions
struct with fieldsbase_decimals
andquote_decimals
enhances oracle price querying functionalities.packages/injective-cosmwasm/src/query.rs (1)
139-139
: Addedscaling_options
toOraclePrice
query type enhances flexibility in oracle price queries.contracts/injective-cosmwasm-mock/src/query.rs (1)
141-147
: Addedscaling_options
parameter tohandle_oracle_price_query
enhances flexibility in oracle price queries.contracts/injective-cosmwasm-mock/src/contract.rs (1)
133-133
: Updatedhandle_oracle_price_query
function call to includeNone
for the new optional parameter.packages/injective-cosmwasm/src/querier.rs (1)
428-441
: Modifiedquery_oracle_price
method to includescaling_options
enhances flexibility in oracle price queries.packages/injective-cosmwasm/src/exchange_mock_querier.rs (1)
689-691
: The adjustment to include unspecified additional fields in the oracle price query enhances flexibility and future-proofs the query handling.
#[prost(string, tag = "7")] | ||
pub min_notional: ::prost::alloc::string::String, |
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.
Tip
Codebase Verification
The verification process aimed to confirm the uniqueness of the protobuf tag "7" for the field min_notional
in the MsgInstantSpotMarketLaunch
struct. The output from the executed script shows multiple occurrences of tag = "7"
across various fields and data types in the file packages/injective-std/src/types/injective/exchange/v1beta1.rs
. This indicates that the tag "7" is not unique within this file, which could lead to serialization and deserialization issues in protobuf, as each field within a protobuf message should have a unique tag.
Given this information, it is clear that the addition of the min_notional
field with the tag "7" could potentially conflict with other fields using the same tag, leading to incorrect behavior in the system that relies on this protobuf definition.
Action Required:
- The developers should assign a unique protobuf tag to the
min_notional
field in theMsgInstantSpotMarketLaunch
struct to avoid conflicts with other fields.
Locations needing attention:
MsgInstantSpotMarketLaunch
struct inpackages/injective-std/src/types/injective/exchange/v1beta1.rs
needs a unique tag for themin_notional
field.
Analysis chain
Field min_notional
added to MsgInstantSpotMarketLaunch
.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the uniqueness of the protobuf tag for `min_notional` in `MsgInstantSpotMarketLaunch`.
# Test: Search for the tag "7" in the file. Expect: Only one occurrence.
rg --type rust 'tag = "7"' packages/injective-std/src/types/injective/exchange/v1beta1.rs
Length of output: 878
#[prost(string, tag = "14")] | ||
pub min_notional: ::prost::alloc::string::String, |
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.
Tip
Codebase Verification
The verification process has revealed that the protobuf tag "14" is not unique within the file packages/injective-std/src/types/injective/exchange/v1beta1.rs
. The tag is used multiple times for different types of fields, which could lead to serialization issues and data corruption. This needs to be addressed to ensure the integrity of the data structure.
Issues found in the protobuf tag usage:
- Multiple occurrences of
tag = "14"
for different types such asuint32
,enumeration
,string
,bool
, andmessage
. - This could potentially lead to conflicts in the protobuf serialization process.
Analysis chain
Field min_notional
added to MsgInstantPerpetualMarketLaunch
.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the uniqueness of the protobuf tag for `min_notional` in `MsgInstantPerpetualMarketLaunch`.
# Test: Search for the tag "14" in the file. Expect: Only one occurrence.
rg --type rust 'tag = "14"' packages/injective-std/src/types/injective/exchange/v1beta1.rs
Length of output: 552
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.
LGTM
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.
Actionable comments posted: 0
Out of diff range and nitpick comments (2)
contracts/injective-cosmwasm-mock/src/testing/test_token_factory.rs (1)
19-20
: The addition ofname
andsymbol
fields toMsgCreateDenom
struct is correctly implemented.Consider adding comments describing the purpose of these new fields, especially if they have specific constraints or usage within the system.
contracts/injective-cosmwasm-mock/src/utils.rs (1)
416-416
: The addition of thecid
parameter to order functions is implemented correctly.Consider initializing
cid
with a meaningful default value if applicable, rather than an empty string, to enhance clarity and functionality.Also applies to: 542-542
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
Files selected for processing (4)
- contracts/injective-cosmwasm-mock/Cargo.toml (2 hunks)
- contracts/injective-cosmwasm-mock/src/testing/test_token_factory.rs (1 hunks)
- contracts/injective-cosmwasm-mock/src/utils.rs (2 hunks)
- packages/injective-std/Cargo.toml (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/injective-std/Cargo.toml
Additional comments not posted (1)
contracts/injective-cosmwasm-mock/Cargo.toml (1)
33-44
: Dependencies have been updated and adjusted appropriately.Please ensure to run comprehensive tests to verify that the new library versions do not introduce any regressions or compatibility issues.
Also applies to: 50-50
Summary by CodeRabbit
New Features
min_notional
fields to market launch structures to specify minimum trade values.Enhancements
Bug Fixes