-
Notifications
You must be signed in to change notification settings - Fork 26
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: added injective-std-derive #232
Conversation
WalkthroughThe recent changes introduce the Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant ProceduralMacro
participant CosmosSDK
participant QuerySystem
Developer->>ProceduralMacro: Define message struct with attributes
ProceduralMacro->>Developer: Generate traits and implementations
Developer->>CosmosSDK: Use generated traits for smart contract
Developer->>QuerySystem: Execute queries using new request structures
QuerySystem->>CosmosSDK: Return results based on query execution
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 Configuration 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: 4
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 (9)
- packages/injective-std-derive/Cargo.toml (1 hunks)
- packages/injective-std-derive/README.md (1 hunks)
- packages/injective-std-derive/src/lib.rs (1 hunks)
- packages/injective-std-derive/tests/main.rs (1 hunks)
- packages/injective-std-derive/tests/query.rs (1 hunks)
- packages/injective-std-derive/tests/struct.rs (1 hunks)
- packages/injective-std/Cargo.toml (1 hunks)
- packages/injective-std/README.md (1 hunks)
- packages/injective-std/src/types/cosmos/base/v1beta1.rs (4 hunks)
Files skipped from review due to trivial changes (2)
- packages/injective-std-derive/README.md
- packages/injective-std/README.md
Additional comments not posted (21)
packages/injective-std-derive/tests/main.rs (1)
1-6
: LGTM! Verify the test paths.The code changes are approved.
However, ensure that the test paths
tests/struct.rs
andtests/query.rs
exist and are correctly configured.Verification successful
LGTM!
The test paths
tests/struct.rs
andtests/query.rs
exist and are correctly configured.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the test files. # Test: Check if the test files exist. Expect: Both files should exist. test -f packages/injective-std-derive/tests/struct.rs && echo "struct.rs exists" || echo "struct.rs missing" test -f packages/injective-std-derive/tests/query.rs && echo "query.rs exists" || echo "query.rs missing"Length of output: 194
packages/injective-std-derive/Cargo.toml (4)
1-6
: LGTM! Package metadata is accurate.The package metadata follows standard conventions and is accurate.
10-11
: LGTM! Library configuration is correct.The library is correctly configured as a procedural macro.
13-18
: LGTM! Dependencies are appropriate and up-to-date.The dependencies listed are appropriate for a procedural macro library and are up-to-date.
20-24
: LGTM! Dev-dependencies are appropriate and up-to-date.The dev-dependencies listed are appropriate for development and testing and are up-to-date.
packages/injective-std-derive/tests/struct.rs (3)
1-2
: LGTM! Imports are correct and necessary.The imports are correct and necessary for the test.
4-12
: LGTM! Struct definition is correct and appropriate.The
MsgCreateDenom
struct is correctly defined and the derived traits are appropriate.
14-21
: LGTM! Main function is comprehensive and correctly implemented.The main function comprehensively tests the
MsgCreateDenom
struct and is correctly implemented.packages/injective-std/Cargo.toml (3)
8-8
: Verify the version downgrade.The version has been downgraded from
1.13.2-testnet
to1.13.0
. Ensure this aligns with the project's versioning strategy and doesn't introduce any regressions.
14-14
: Verify compatibility withcosmwasm-std
version2.1.0
.The
cosmwasm-std
dependency has been updated from1.5.0
to2.1.0
. Ensure all existing code is compatible with this new version.
15-15
: Verify the newinjective-std-derive
dependency.The dependency
osmosis-std-derive
has been replaced withinjective-std-derive
version1.13.0
. Ensure this new dependency is correctly integrated and compatible with the existing code.packages/injective-std-derive/tests/query.rs (3)
1-2
: Imports look good.The imports from
cosmwasm_std
andinjective_std_derive
are appropriate and necessary for the functionality being tested.
4-13
: Struct definition looks good.The
QueryDenomsFromCreatorRequest
struct is defined with appropriate derives and proto annotations. Ensure that the proto annotations align with the expected schema.
14-26
: Struct and main function look good.The
QueryDenomsFromCreatorResponse
struct and the main function are defined correctly. The main function tests the conversion of the request struct into aQueryRequest
.packages/injective-std-derive/src/lib.rs (7)
7-23
: LGTM!The macro
match_kv_attr
is well-defined and correctly uses pattern matching to verify key-value pairs.
25-125
: LGTM!The procedural macro
derive_cosmwasm_ext
is well-structured and correctly implements various traits and conversion methods for CosmWasm extensions.
127-147
: LGTM!The function
get_type_url
is well-implemented and correctly handles various cases for extracting the type URL from attributes.
149-185
: LGTM!The function
get_query_attrs
is well-implemented and correctly uses the custom matcher to extract query attributes.
188-192
: LGTM!The function
get_attr
is simple and correctly retrieves the specified attribute from a list of attributes.
194-197
: LGTM!The function
proto_message_attr_error
is well-implemented and correctly generates a compile error for invalidproto_message
attributes.
199-205
: LGTM!The function
proto_query_attr_error
is well-implemented and correctly generates a compile error for invalidproto_query
attributes.
b3990f7
to
294da57
Compare
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: 1
Outside diff range, codebase verification and nitpick comments (1)
packages/injective-std/src/types/injective/peggy/v1.rs (1)
1311-1311
: The renaming of the struct field has not been fully propagated.The field
batch_fees
in theQueryBatchFeeResponse
struct has been renamed tobatchFees
, but there are still references to the old field namebatch_fees
in the codebase. Ensure that all references are updated to match the new naming convention.
packages/injective-std/src/types/injective/peggy/v1.rs
: Functionbatch_fees
still uses the old field name.#!/bin/bash # Description: Verify all instances of the old and new field names. # Test: Search for the usage of both batch_fees and batchFees. rg --type rust 'batch_fees' rg --type rust 'batchFees'Analysis chain
Verify the impact of renaming the struct field.
The field
batch_fees
in theQueryBatchFeeResponse
struct has been renamed tobatchFees
. Ensure that all references to this field in the codebase are updated to match the new naming convention.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the references to the renamed struct field. # Test: Search for the usage of batchFees. Expect: No references to the old field name. rg --type rust 'batch_fees'Length of output: 170
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 (31)
- packages/injective-protobuf/src/proto/mod.rs (1 hunks)
- packages/injective-std-derive/src/lib.rs (1 hunks)
- packages/injective-std/Cargo.toml (1 hunks)
- packages/injective-std/src/types/cosmos/auth/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/auth/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/authz/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/authz/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/bank/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/bank/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/base/node/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/base/query/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/base/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/distribution/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/distribution/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/feegrant/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/feegrant/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/gov/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/gov/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/gov/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/params/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/params/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/staking/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmwasm/wasm/v1.rs (1 hunks)
- packages/injective-std/src/types/injective/auction/v1beta1.rs (2 hunks)
- packages/injective-std/src/types/injective/exchange/v1beta1.rs (15 hunks)
- packages/injective-std/src/types/injective/insurance/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/injective/oracle/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/injective/peggy/v1.rs (2 hunks)
- packages/injective-std/src/types/injective/permissions/v1beta1.rs (2 hunks)
- packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/injective/wasmx/v1.rs (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/injective-protobuf/src/proto/mod.rs
Files skipped from review as they are similar to previous changes (3)
- packages/injective-std-derive/src/lib.rs
- packages/injective-std/Cargo.toml
- packages/injective-std/src/types/cosmos/base/v1beta1.rs
Additional context used
GitHub Check: Lints
packages/injective-std/src/types/injective/auction/v1beta1.rs
[failure] 176-176:
structure fieldauctionRound
should have a snake case name
[failure] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[failure] 186-186:
structure fieldhighestBidder
should have a snake case name
[failure] 189-189:
structure fieldhighestBidAmount
should have a snake case namepackages/injective-std/src/types/injective/exchange/v1beta1.rs
[failure] 332-332:
structure fieldisPerpetual
should have a snake case name
[failure] 816-816:
structure fieldisReduceOnly
should have a snake case name
[failure] 886-886:
structure fieldisLong
should have a snake case name
[failure] 905-905:
structure fieldisBuy
should have a snake case name
[failure] 1472-1472:
structure fieldexecutionType
should have a snake case name
[failure] 1472-1472:
methodexecutionType
should have a snake case name
GitHub Check: Test Suite
packages/injective-std/src/types/injective/auction/v1beta1.rs
[warning] 176-176:
structure fieldauctionRound
should have a snake case name
[warning] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[warning] 186-186:
structure fieldhighestBidder
should have a snake case name
[warning] 189-189:
structure fieldhighestBidAmount
should have a snake case namepackages/injective-std/src/types/injective/exchange/v1beta1.rs
[warning] 332-332:
structure fieldisPerpetual
should have a snake case name
[warning] 816-816:
structure fieldisReduceOnly
should have a snake case name
[warning] 886-886:
structure fieldisLong
should have a snake case name
[warning] 905-905:
structure fieldisBuy
should have a snake case name
[warning] 1472-1472:
structure fieldexecutionType
should have a snake case name
[warning] 1472-1472:
methodexecutionType
should have a snake case name
Additional comments not posted (71)
packages/injective-std/src/types/cosmos/authz/module/v1.rs (1)
1-1
: Verify the new import path.Ensure that the
injective_std_derive::CosmwasmExt
path is correct and that the new macro provides the expected functionality.Verification successful
The import path
injective_std_derive::CosmwasmExt
is correct and the macro is used as expected.
- The
CosmwasmExt
macro is defined and used extensively in the codebase.- The import path
injective_std_derive::CosmwasmExt
is valid and referenced in multiple files.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive` crate is correctly imported and used. # Test: Search for the `injective_std_derive` crate. Expect: The crate should be present in the dependencies. rg --type toml 'injective_std_derive'Length of output: 37
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive` crate is correctly imported and used. # 1. Search for the `injective_std_derive` crate in all Cargo.toml files. echo "Searching for injective_std_derive in Cargo.toml files..." rg --type toml 'injective_std_derive' --glob '**/Cargo.toml' # 2. Search for the definition of the `CosmwasmExt` macro within the `injective_std_derive` crate. echo "Searching for the definition of the CosmwasmExt macro..." rg 'macro_rules! CosmwasmExt' # 3. Check the usage of the `CosmwasmExt` macro in the codebase. echo "Searching for the usage of the CosmwasmExt macro..." rg 'CosmwasmExt' --glob '**/*.rs'Length of output: 210158
packages/injective-std/src/types/cosmos/params/module/v1.rs (1)
1-1
: Verify the new import path.Ensure that the
injective_std_derive::CosmwasmExt
path is correct and that the new macro provides the expected functionality.Verification successful
Verified the new import path.
The
injective_std_derive::CosmwasmExt
path is correct and the necessary dependencies are listed in theCargo.toml
file.
injective-std-derive
is listed inpackages/injective-std/Cargo.toml
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive` crate is correctly imported and used. # Test: Search for the `injective_std_derive` crate. Expect: The crate should be present in the dependencies. rg --type toml 'injective_std_derive'Length of output: 37
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive` crate is correctly imported and used. # Step 1: Search for the `injective_std_derive` crate in all `Cargo.toml` files. rg 'injective_std_derive' --glob '**/Cargo.toml' # Step 2: Check if `CosmwasmExt` is defined within the `injective_std_derive` crate. fd -t f -e rs | xargs rg 'CosmwasmExt' # Step 3: Verify that `CosmwasmExt` is used in the codebase. rg 'CosmwasmExt' --glob '**/*.rs'Length of output: 419463
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive` crate is correctly listed in the dependencies. # Search for any mention of `injective_std_derive` in all `Cargo.toml` files. rg 'injective_std_derive' --glob '**/Cargo.toml'Length of output: 48
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive` crate or any similar pattern is correctly listed in the dependencies. # Search for any mention of `injective_std_derive` or similar patterns in all `Cargo.toml` files. rg 'injective[-_]std[-_]derive' --glob '**/Cargo.toml'Length of output: 214
packages/injective-std/src/types/cosmos/feegrant/module/v1.rs (1)
1-1
: Verify the new import path.Ensure that the
injective_std_derive::CosmwasmExt
path is correct and that the new macro provides the expected functionality.packages/injective-std/src/types/cosmos/distribution/module/v1.rs (1)
1-1
: LGTM! But verify the impact of the new dependency.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new dependency does not introduce any breaking changes or unexpected behavior.packages/injective-std/src/types/cosmos/gov/module/v1.rs (1)
1-1
: LGTM! But verify the impact of the new dependency.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new dependency does not introduce any breaking changes or unexpected behavior.packages/injective-std/src/types/cosmos/bank/module/v1.rs (1)
1-1
: LGTM! But verify the impact of the new dependency.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new dependency does not introduce any breaking changes or unexpected behavior.packages/injective-std/src/types/cosmos/auth/module/v1.rs (1)
1-1
: Update import statement to useinjective_std_derive::CosmwasmExt
.The import statement has been updated to reflect the new dependency, ensuring that the
CosmwasmExt
derive macro is sourced frominjective_std_derive
instead ofosmosis_std_derive
.packages/injective-std/src/types/cosmos/base/node/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive::CosmwasmExt
.The import statement has been updated to reflect the new dependency, ensuring that the
CosmwasmExt
derive macro is sourced frominjective_std_derive
instead ofosmosis_std_derive
.packages/injective-std/src/types/cosmos/base/query/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive::CosmwasmExt
.The import statement has been updated to reflect the new dependency, ensuring that the
CosmwasmExt
derive macro is sourced frominjective_std_derive
instead ofosmosis_std_derive
.packages/injective-std/src/types/cosmos/params/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new library provides the same functionality as the old one.packages/injective-std/src/types/cosmos/feegrant/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new library provides the same functionality as the old one.packages/injective-std/src/types/injective/auction/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new library provides the same functionality as the old one.packages/injective-std/src/types/cosmos/authz/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
instead ofosmosis_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new library provides the same or enhanced functionality as the previous one.Verification successful
Import statement correctly updated
The import statement has been correctly updated to use
injective_std_derive::CosmwasmExt
. TheCosmwasmExt
macro is defined and used extensively within the codebase, confirming its functionality.
packages/injective-std-derive/src/lib.rs
: Definition ofCosmwasmExt
macro.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive::CosmwasmExt` macro is correctly imported and used. # Test: Search for the definition of the `CosmwasmExt` macro in the `injective_std_derive` crate. rg --type rust --pattern 'macro_rules! CosmwasmExt' --files-with-matchesLength of output: 486
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive::CosmwasmExt` macro is correctly imported and used. # Test: Search for the definition of the `CosmwasmExt` macro in the `injective_std_derive` crate. rg 'macro_rules! CosmwasmExt' --type rustLength of output: 43
Script:
#!/bin/bash # Description: Verify the presence and usage of `CosmwasmExt` in the `injective_std_derive` crate. # Test: Search for any occurrence of `CosmwasmExt` in the codebase. rg 'CosmwasmExt' --type rustLength of output: 209699
packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
instead ofosmosis_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new library provides the same or enhanced functionality as the previous one.Verification successful
Import statement update verified successfully.
The import statement has been correctly updated to use
injective_std_derive::CosmwasmExt
. TheCosmwasmExt
macro is defined in theinjective_std_derive
crate and is extensively used across the codebase, ensuring it provides the required functionality.
injective-std/src/types/injective/tokenfactory/v1beta1.rs
injective-std/src/types/injective/auction/v1beta1.rs
injective-std/src/types/injective/peggy/v1.rs
injective-std/src/types/cosmwasm/wasm/v1.rs
injective-std/src/types/cosmos/params/v1beta1.rs
injective-std/src/types/cosmos/distribution/v1beta1.rs
injective-std/src/types/cosmos/gov/v1beta1.rs
injective-std/src/types/cosmos/base/v1beta1.rs
injective-std/src/types/cosmos/authz/v1beta1.rs
injective-std/src/types/injective/permissions/v1beta1.rs
injective-std/src/types/cosmos/bank/v1beta1.rs
injective-std/src/types/injective/oracle/v1beta1.rs
injective-std/src/types/injective/insurance/v1beta1.rs
injective-std/src/types/injective/exchange/v1beta1.rs
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive::CosmwasmExt` macro is correctly imported and used. # Test: Search for the definition of the `CosmwasmExt` macro in the `injective_std_derive` crate. rg --type rust --pattern 'macro_rules! CosmwasmExt' --files-with-matchesLength of output: 486
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive::CosmwasmExt` macro is correctly imported and used. # Test: Search for the definition of the `CosmwasmExt` macro in the `injective_std_derive` crate. rg 'macro_rules! CosmwasmExt' # Test: Search for the usage of the `CosmwasmExt` macro in the codebase. rg 'CosmwasmExt'Length of output: 209719
packages/injective-std/src/types/cosmos/auth/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
instead ofosmosis_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that the new library provides the same or enhanced functionality as the previous one.Verification successful
The
CosmwasmExt
proc-macro derive frominjective_std_derive
is correctly imported and used.
- The
CosmwasmExt
proc-macro derive is defined and used extensively throughout the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive::CosmwasmExt` macro is correctly imported and used. # Test: Search for the definition of the `CosmwasmExt` macro in the `injective_std_derive` crate. rg --type rust --pattern 'macro_rules! CosmwasmExt' --files-with-matchesLength of output: 486
Script:
#!/bin/bash # Description: Verify that the `injective_std_derive::CosmwasmExt` macro is correctly imported and used. # Test: Search for the definition of the `CosmwasmExt` macro in the `injective_std_derive` crate. rg 'macro_rules! CosmwasmExt' --type rustLength of output: 43
Script:
#!/bin/bash # Description: Verify if any macros are defined in the `injective_std_derive` crate and check the usage of `CosmwasmExt` in the codebase. # Test 1: Search for any macro definitions in the `injective_std_derive` crate. rg 'macro_rules!' --type rust --glob '*/injective_std_derive/*' # Test 2: Search for the usage of `CosmwasmExt` in the codebase. rg 'CosmwasmExt' --type rustLength of output: 209914
packages/injective-std/src/types/injective/permissions/v1beta1.rs (2)
1-1
: Verify the correctness of the new import.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality asosmosis_std_derive::CosmwasmExt
.
326-326
: Verify the correctness of the new import.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality asosmosis_std_derive::CosmwasmExt
.packages/injective-std/src/types/injective/wasmx/v1.rs (1)
1-1
: Verify the correctness of the new import.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality asosmosis_std_derive::CosmwasmExt
.packages/injective-std/src/types/injective/insurance/v1beta1.rs (1)
1-1
: Verify the correctness of the new import.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality asosmosis_std_derive::CosmwasmExt
.packages/injective-std/src/types/cosmos/gov/v1beta1.rs (1)
1-1
: LGTM! But verify the usage ofCosmwasmExt
in the codebase.The import statement change is approved.
However, ensure that all usages of
CosmwasmExt
are compatible withinjective_std_derive
.packages/injective-std/src/types/cosmos/staking/v1beta1.rs (1)
1-1
: LGTM! But verify the usage ofCosmwasmExt
in the codebase.The import statement change is approved.
However, ensure that all usages of
CosmwasmExt
are compatible withinjective_std_derive
.packages/injective-std/src/types/cosmos/bank/v1beta1.rs (1)
1-1
: Verify the correctness of the new import.Ensure that
injective_std_derive::CosmwasmExt
is correctly defined and used within the codebase.Verification successful
The import statement is correct and integrates properly with the rest of the code.
The
CosmwasmExt
macro is correctly defined in theinjective_std_derive
crate and is used appropriately in thepackages/injective-std/src/types/cosmos/bank/v1beta1.rs
file.
- The
CosmwasmExt
macro is defined inpackages/injective-std-derive/src/lib.rs
.- The macro is applied to multiple struct definitions in the target file.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and correctness of the new import. # Test: Search for the definition of CosmwasmExt in injective_std_derive. rg --type rust 'CosmwasmExt' --glob 'packages/injective-std-derive/src/**/*.rs'Length of output: 194
Script:
#!/bin/bash # Description: Verify the usage of CosmwasmExt in the target file. # Test: Search for the usage of CosmwasmExt in the target file. rg 'CosmwasmExt' --glob 'packages/injective-std/src/types/cosmos/bank/v1beta1.rs'Length of output: 8869
packages/injective-std/src/types/cosmos/distribution/v1beta1.rs (1)
1-1
: Verify the impact of the import change.The import statement has been changed from
osmosis_std_derive::CosmwasmExt
toinjective_std_derive::CosmwasmExt
. Ensure that the new dependency is compatible and functions as expected with the existing codebase.packages/injective-std/src/types/cosmos/gov/v1.rs (1)
1-1
: Verify the impact of the import change.The import statement has been changed from
osmosis_std_derive::CosmwasmExt
toinjective_std_derive::CosmwasmExt
. Ensure that the new dependency is compatible and functions as expected with the existing codebase.packages/injective-std/src/types/injective/oracle/v1beta1.rs (30)
Line range hint
4-8
:
LGTM!The
Params
struct is correctly defined.
Line range hint
9-16
:
LGTM!The
OracleInfo
struct is correctly defined.
Line range hint
17-25
:
LGTM!The
ChainlinkPriceState
struct is correctly defined.
Line range hint
26-36
:
LGTM!The
BandPriceState
struct is correctly defined.
Line range hint
37-45
:
LGTM!The
PriceFeedState
struct is correctly defined.
Line range hint
46-51
:
LGTM!The
ProviderInfo
struct is correctly defined.
Line range hint
52-58
:
LGTM!The
ProviderState
struct is correctly defined.
Line range hint
59-64
:
LGTM!The
ProviderPriceState
struct is correctly defined.
Line range hint
65-69
:
LGTM!The
PriceFeedInfo
struct is correctly defined.
Line range hint
70-73
:
LGTM!The
PriceFeedPrice
struct is correctly defined.
Line range hint
74-85
:
LGTM!The
CoinbasePriceState
struct is correctly defined.
Line range hint
86-95
:
LGTM!The
StorkPriceState
struct is correctly defined.
Line range hint
96-102
:
LGTM!The
PriceState
struct is correctly defined.
Line range hint
103-113
:
LGTM!The
PythPriceState
struct is correctly defined.
Line range hint
114-131
:
LGTM!The
BandOracleRequest
struct is correctly defined.
Line range hint
132-145
:
LGTM!The
BandIbcParams
struct is correctly defined.
Line range hint
146-152
:
LGTM!The
SymbolPriceTimestamp
struct is correctly defined.
Line range hint
153-156
:
LGTM!The
LastPriceTimestamps
struct is correctly defined.
Line range hint
157-164
:
LGTM!The
PriceRecords
struct is correctly defined.
Line range hint
165-169
:
LGTM!The
PriceRecord
struct is correctly defined.
Line range hint
170-198
:
LGTM!The
OracleType
enum is correctly defined.
Line range hint
199-205
:
LGTM!The
SetChainlinkPriceEvent
struct is correctly defined.
Line range hint
206-214
:
LGTM!The
SetBandPriceEvent
struct is correctly defined.
Line range hint
215-226
:
LGTM!The
SetBandIbcPriceEvent
struct is correctly defined.
Line range hint
227-232
:
LGTM!The
EventBandIbcAckSuccess
struct is correctly defined.
Line range hint
233-238
:
LGTM!The
EventBandIbcAckError
struct is correctly defined.
Line range hint
239-243
:
LGTM!The
EventBandIbcResponseTimeout
struct is correctly defined.
Line range hint
244-250
:
LGTM!The
SetPriceFeedPriceEvent
struct is correctly defined.
Line range hint
251-257
:
LGTM!The
SetProviderPriceEvent
struct is correctly defined.
1-1
: Verify the new dependency.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality asosmosis_std_derive::CosmwasmExt
and does not introduce any issues.Verification successful
Verified the new dependency.
The
injective_std_derive::CosmwasmExt
provides the required functionality and is correctly implemented across the codebase. The change fromosmosis_std_derive::CosmwasmExt
toinjective_std_derive::CosmwasmExt
does not introduce any issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the functionality provided by the new dependency. # Test: Search for the definition of `CosmwasmExt` in the `injective_std_derive` crate. rg --type rust 'pub trait CosmwasmExt' --context 10Length of output: 53
Script:
#!/bin/bash # Description: Verify the functionality provided by the new dependency. # Test 1: Search for all public traits in the `injective_std_derive` crate. rg --type rust 'pub trait' --context 10 # Test 2: Search for all occurrences of `CosmwasmExt` in the codebase to verify its usage. rg 'CosmwasmExt'Length of output: 230370
packages/injective-std/src/types/injective/peggy/v1.rs (1)
1-1
: Verify the impact of changing the import source.The import statement has been changed from
osmosis_std_derive
toinjective_std_derive
. Ensure that all functionalities provided byCosmwasmExt
from the new source are compatible with the existing code.Verification successful
Verified the impact of changing the import source.
The import statement has been changed from
osmosis_std_derive
toinjective_std_derive
. The search results indicate thatCosmwasmExt
is consistently imported frominjective_std_derive
across the codebase, and there are no compatibility issues found.
- All instances of
CosmwasmExt
are correctly usinginjective_std_derive
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of CosmwasmExt from the new source. # Test: Search for the usage of CosmwasmExt. Expect: No compatibility issues. rg --type rust 'CosmwasmExt'Length of output: 209699
packages/injective-std/src/types/cosmwasm/wasm/v1.rs (1)
1-1
: Verify the new import path.Ensure that the
injective_std_derive::CosmwasmExt
path is correct and that theinjective_std_derive
crate is included in the project's dependencies.Verification successful
Verified the new import path.
The
injective_std_derive::CosmwasmExt
path is correct and theinjective_std_derive
crate is properly included in the project's dependencies.
packages/injective-std-derive/src/lib.rs
: Definition ofCosmwasmExt
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the new import path for `injective_std_derive::CosmwasmExt`. # Test: Search for the `injective_std_derive` crate in the project's dependencies. Expect: The crate is listed as a dependency. rg --type toml 'injective_std_derive'Length of output: 37
Script:
#!/bin/bash # Description: Verify the new import path for `injective_std_derive::CosmwasmExt`. # Test: Search for the `injective_std_derive` crate in the project's dependencies across all relevant files. rg --type toml 'injective_std_derive' . # Test: Search for the `CosmwasmExt` within the `injective_std_derive` crate to ensure it exists. rg 'CosmwasmExt' $(fd -e rs)Length of output: 217986
packages/injective-std/src/types/injective/exchange/v1beta1.rs (15)
1-1
: LGTM!The import statement has been correctly updated to use
injective_std_derive::CosmwasmExt
.
332-332
: Consider using snake_case for struct fields.The field
isPerpetual
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
Tools
GitHub Check: Lints
[failure] 332-332:
structure fieldisPerpetual
should have a snake case nameGitHub Check: Test Suite
[warning] 332-332:
structure fieldisPerpetual
should have a snake case name
816-816
: Consider using snake_case for struct fields.The field
isReduceOnly
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
Tools
GitHub Check: Lints
[failure] 816-816:
structure fieldisReduceOnly
should have a snake case nameGitHub Check: Test Suite
[warning] 816-816:
structure fieldisReduceOnly
should have a snake case name
886-886
: Consider using snake_case for struct fields.The field
isLong
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
Tools
GitHub Check: Lints
[failure] 886-886:
structure fieldisLong
should have a snake case nameGitHub Check: Test Suite
[warning] 886-886:
structure fieldisLong
should have a snake case name
905-905
: Consider using snake_case for struct fields.The field
isBuy
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
Tools
GitHub Check: Lints
[failure] 905-905:
structure fieldisBuy
should have a snake case nameGitHub Check: Test Suite
[warning] 905-905:
structure fieldisBuy
should have a snake case name
1472-1472
: Consider using snake_case for struct fields.The field
executionType
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
Tools
GitHub Check: Lints
[failure] 1472-1472:
structure fieldexecutionType
should have a snake case name
[failure] 1472-1472:
methodexecutionType
should have a snake case nameGitHub Check: Test Suite
[warning] 1472-1472:
structure fieldexecutionType
should have a snake case name
[warning] 1472-1472:
methodexecutionType
should have a snake case name
1495-1495
: Consider using snake_case for struct fields.The field
executionType
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
1707-1707
: Consider using snake_case for struct fields.The field
isLimitCancel
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
1758-1758
: Consider using snake_case for struct fields.The field
isLimitCancel
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
1772-1772
: Consider using snake_case for struct fields.The field
isLimitTrigger
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
3180-3180
: Consider using snake_case for struct fields.The field
isBuySide
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
3193-3193
: Consider using snake_case for struct fields.The field
isBuySide
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
3352-3352
: Consider using snake_case for struct fields.The field
exchangeType
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
4861-4861
: LGTM!The import statement has been correctly updated to use
injective_std_derive::CosmwasmExt
.
5621-5628
: Consider using snake_case for struct fields.The fields
triggerPrice
,isBuy
, andisLimit
should ideally follow snake_case naming conventions as per Rust guidelines.Ensure that this naming convention change is consistent across the codebase and does not introduce any issues.
pub auctionRound: u64, | ||
/// auctionClosingTime describes auction close time for the round | ||
#[prost(int64, tag = "3")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub auction_closing_time: i64, | ||
pub auctionClosingTime: i64, | ||
/// highestBidder describes highest bidder on current round | ||
#[prost(string, tag = "4")] | ||
pub highest_bidder: ::prost::alloc::string::String, | ||
pub highestBidder: ::prost::alloc::string::String, | ||
/// highestBidAmount describes highest bid amount on current round | ||
#[prost(string, tag = "5")] | ||
pub highest_bid_amount: ::prost::alloc::string::String, | ||
pub highestBidAmount: ::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.
Revert field names to snake_case.
The field names in the QueryCurrentAuctionBasketResponse
struct have been changed to camelCase. However, static analysis hints suggest that they should remain in snake_case to follow Rust naming conventions.
- pub auctionRound: u64,
+ pub auction_round: u64,
- pub auctionClosingTime: i64,
+ pub auction_closing_time: i64,
- pub highestBidder: ::prost::alloc::string::String,
+ pub highest_bidder: ::prost::alloc::string::String,
- pub highestBidAmount: ::prost::alloc::string::String,
+ pub highest_bid_amount: ::prost::alloc::string::String,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
pub auctionRound: u64, | |
/// auctionClosingTime describes auction close time for the round | |
#[prost(int64, tag = "3")] | |
#[serde( | |
serialize_with = "crate::serde::as_str::serialize", | |
deserialize_with = "crate::serde::as_str::deserialize" | |
)] | |
pub auction_closing_time: i64, | |
pub auctionClosingTime: i64, | |
/// highestBidder describes highest bidder on current round | |
#[prost(string, tag = "4")] | |
pub highest_bidder: ::prost::alloc::string::String, | |
pub highestBidder: ::prost::alloc::string::String, | |
/// highestBidAmount describes highest bid amount on current round | |
#[prost(string, tag = "5")] | |
pub highest_bid_amount: ::prost::alloc::string::String, | |
pub highestBidAmount: ::prost::alloc::string::String, | |
pub auction_round: u64, | |
/// auctionClosingTime describes auction close time for the round | |
#[prost(int64, tag = "3")] | |
#[serde( | |
serialize_with = "crate::serde::as_str::serialize", | |
deserialize_with = "crate::serde::as_str::deserialize" | |
)] | |
pub auction_closing_time: i64, | |
/// highestBidder describes highest bidder on current round | |
#[prost(string, tag = "4")] | |
pub highest_bidder: ::prost::alloc::string::String, | |
/// highestBidAmount describes highest bid amount on current round | |
#[prost(string, tag = "5")] | |
pub highest_bid_amount: ::prost::alloc::string::String, |
Tools
GitHub Check: Lints
[failure] 176-176:
structure fieldauctionRound
should have a snake case name
[failure] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[failure] 186-186:
structure fieldhighestBidder
should have a snake case name
[failure] 189-189:
structure fieldhighestBidAmount
should have a snake case name
GitHub Check: Test Suite
[warning] 176-176:
structure fieldauctionRound
should have a snake case name
[warning] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[warning] 186-186:
structure fieldhighestBidder
should have a snake case name
[warning] 189-189:
structure fieldhighestBidAmount
should have a snake case name
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: 1
Outside diff range, codebase verification and nitpick comments (1)
packages/injective-std/src/types/injective/peggy/v1.rs (1)
1311-1311
: Update the remaining instance ofbatch_fees
tobatchFees
in the function definition.The field
batch_fees
in theQueryBatchFeeResponse
struct has been renamed tobatchFees
. However, the old field namebatch_fees
is still used in a function definition. Please update this instance to ensure consistency and prevent potential issues.
packages/injective-std/src/types/injective/peggy/v1.rs
:pub fn batch_fees(&self) -> Result<QueryBatchFeeResponse, cosmwasm_std::StdError>
Analysis chain
Verify the usage of the new field name and update serialization/deserialization processes.
The field
batch_fees
inQueryBatchFeeResponse
struct has been renamed tobatchFees
. Ensure that the new field name is correctly used throughout the codebase and update serialization and deserialization processes accordingly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new field name and update serialization/deserialization processes. # Test: Search for the usage of `batchFees`. Expect: No errors or issues with serialization/deserialization. rg --type rust -A 5 $'batchFees'Length of output: 703
Script:
#!/bin/bash # Search for the usage of `batchFees` throughout the codebase to ensure consistency. rg --type rust 'batchFees' # Check for the usage of the old field name `batch_fees` to ensure it has been fully replaced. rg --type rust 'batch_fees'Length of output: 308
Script:
#!/bin/bash # Search for all instances of `batch_fees` in the codebase to ensure they are updated to `batchFees`. rg --type rust 'batch_fees'Length of output: 170
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 (31)
- packages/injective-protobuf/src/proto/mod.rs (1 hunks)
- packages/injective-std-derive/src/lib.rs (1 hunks)
- packages/injective-std/Cargo.toml (1 hunks)
- packages/injective-std/src/types/cosmos/auth/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/auth/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/authz/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/authz/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/bank/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/bank/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/base/node/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/base/query/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/base/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/distribution/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/distribution/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/feegrant/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/feegrant/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/gov/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/gov/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/gov/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/params/module/v1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/params/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmos/staking/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/cosmwasm/wasm/v1.rs (1 hunks)
- packages/injective-std/src/types/injective/auction/v1beta1.rs (2 hunks)
- packages/injective-std/src/types/injective/exchange/v1beta1.rs (15 hunks)
- packages/injective-std/src/types/injective/insurance/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/injective/oracle/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/injective/peggy/v1.rs (2 hunks)
- packages/injective-std/src/types/injective/permissions/v1beta1.rs (2 hunks)
- packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs (1 hunks)
- packages/injective-std/src/types/injective/wasmx/v1.rs (1 hunks)
Files skipped from review due to trivial changes (9)
- packages/injective-protobuf/src/proto/mod.rs
- packages/injective-std/src/types/cosmos/authz/module/v1.rs
- packages/injective-std/src/types/cosmos/gov/module/v1.rs
- packages/injective-std/src/types/cosmos/gov/v1beta1.rs
- packages/injective-std/src/types/cosmos/staking/v1beta1.rs
- packages/injective-std/src/types/cosmwasm/wasm/v1.rs
- packages/injective-std/src/types/injective/oracle/v1beta1.rs
- packages/injective-std/src/types/injective/permissions/v1beta1.rs
- packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs
Files skipped from review as they are similar to previous changes (3)
- packages/injective-std-derive/src/lib.rs
- packages/injective-std/Cargo.toml
- packages/injective-std/src/types/cosmos/base/v1beta1.rs
Additional context used
GitHub Check: Lints
packages/injective-std/src/types/injective/auction/v1beta1.rs
[failure] 176-176:
structure fieldauctionRound
should have a snake case name
[failure] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[failure] 186-186:
structure fieldhighestBidder
should have a snake case name
[failure] 189-189:
structure fieldhighestBidAmount
should have a snake case namepackages/injective-std/src/types/injective/exchange/v1beta1.rs
[failure] 332-332:
structure fieldisPerpetual
should have a snake case name
[failure] 816-816:
structure fieldisReduceOnly
should have a snake case name
[failure] 886-886:
structure fieldisLong
should have a snake case name
[failure] 905-905:
structure fieldisBuy
should have a snake case name
[failure] 1472-1472:
structure fieldexecutionType
should have a snake case name
[failure] 1472-1472:
methodexecutionType
should have a snake case name
GitHub Check: Test Suite
packages/injective-std/src/types/injective/auction/v1beta1.rs
[warning] 176-176:
structure fieldauctionRound
should have a snake case name
[warning] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[warning] 186-186:
structure fieldhighestBidder
should have a snake case name
[warning] 189-189:
structure fieldhighestBidAmount
should have a snake case namepackages/injective-std/src/types/injective/exchange/v1beta1.rs
[warning] 332-332:
structure fieldisPerpetual
should have a snake case name
[warning] 816-816:
structure fieldisReduceOnly
should have a snake case name
[warning] 886-886:
structure fieldisLong
should have a snake case name
[warning] 905-905:
structure fieldisBuy
should have a snake case name
[warning] 1472-1472:
structure fieldexecutionType
should have a snake case name
[warning] 1472-1472:
methodexecutionType
should have a snake case name
Additional comments not posted (36)
packages/injective-std/src/types/cosmos/params/module/v1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
instead ofosmosis_std_derive::CosmwasmExt
. Ensure that the new macro provides the same or enhanced functionality as the previous one.packages/injective-std/src/types/cosmos/feegrant/module/v1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
instead ofosmosis_std_derive::CosmwasmExt
. Ensure that the new macro provides the same or enhanced functionality as the previous one.packages/injective-std/src/types/cosmos/distribution/module/v1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
instead ofosmosis_std_derive::CosmwasmExt
. Ensure that the new macro provides the same or enhanced functionality as the previous one.packages/injective-std/src/types/cosmos/bank/module/v1.rs (2)
Line range hint
2-14
: LGTM!The
Module
struct definition appears to be correct and follows standard Rust conventions.
1-1
: Verify the impact of the new dependency.The import statement has been changed from
osmosis_std_derive
toinjective_std_derive
. Ensure that the new dependency provides the required functionality and does not introduce any breaking changes.packages/injective-std/src/types/cosmos/auth/module/v1.rs (2)
Line range hint
2-22
: LGTM!The
Module
andModuleAccountPermission
struct definitions appear to be correct and follow standard Rust conventions.
1-1
: Verify the impact of the new dependency.The import statement has been changed from
osmosis_std_derive
toinjective_std_derive
. Ensure that the new dependency provides the required functionality and does not introduce any breaking changes.packages/injective-std/src/types/cosmos/base/node/v1beta1.rs (2)
Line range hint
2-45
: LGTM!The
ConfigRequest
,ConfigResponse
,StatusRequest
, andStatusResponse
struct definitions appear to be correct and follow standard Rust conventions.
1-1
: Verify the impact of the new dependency.The import statement has been changed from
osmosis_std_derive
toinjective_std_derive
. Ensure that the new dependency provides the required functionality and does not introduce any breaking changes.packages/injective-std/src/types/cosmos/base/query/v1beta1.rs (1)
1-1
: Updated dependency toinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that this change does not introduce any compatibility issues with the rest of the codebase.packages/injective-std/src/types/cosmos/params/v1beta1.rs (1)
1-1
: Updated dependency toinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that this change does not introduce any compatibility issues with the rest of the codebase.packages/injective-std/src/types/cosmos/feegrant/v1beta1.rs (1)
1-1
: Updated dependency toinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
. Ensure that this change does not introduce any compatibility issues with the rest of the codebase.packages/injective-std/src/types/injective/auction/v1beta1.rs (1)
1-1
: Verify compatibility of the new import.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality compared toosmosis_std_derive::CosmwasmExt
.packages/injective-std/src/types/cosmos/authz/v1beta1.rs (1)
1-1
: Verify compatibility of the new import.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality compared toosmosis_std_derive::CosmwasmExt
.packages/injective-std/src/types/cosmos/auth/v1beta1.rs (1)
1-1
: Verify compatibility of the new import.Ensure that
injective_std_derive::CosmwasmExt
provides the same or improved functionality compared toosmosis_std_derive::CosmwasmExt
.packages/injective-std/src/types/injective/peggy/v1.rs (1)
1-1
: Verify the compatibility and integration of the new dependency.The import path for
CosmwasmExt
was altered fromosmosis_std_derive
toinjective_std_derive
. Ensure that the new dependency is compatible and correctly integrated.packages/injective-std/src/types/injective/exchange/v1beta1.rs (15)
Line range hint
1-5
:
LGTM!The introduction of
injective_std_derive::CosmwasmExt
is appropriate and aligns with the PR's objective.
Line range hint
332-336
:
LGTM!The renaming of
is_perpetual
toisPerpetual
is consistent with camelCase naming conventions.Tools
GitHub Check: Lints
[failure] 332-332:
structure fieldisPerpetual
should have a snake case nameGitHub Check: Test Suite
[warning] 332-332:
structure fieldisPerpetual
should have a snake case name
Line range hint
816-820
:
LGTM!The renaming of
is_reduce_only
toisReduceOnly
is consistent with camelCase naming conventions.Tools
GitHub Check: Lints
[failure] 816-816:
structure fieldisReduceOnly
should have a snake case nameGitHub Check: Test Suite
[warning] 816-816:
structure fieldisReduceOnly
should have a snake case name
Line range hint
886-890
:
LGTM!The renaming of
is_long
toisLong
is consistent with camelCase naming conventions.Tools
GitHub Check: Lints
[failure] 886-886:
structure fieldisLong
should have a snake case nameGitHub Check: Test Suite
[warning] 886-886:
structure fieldisLong
should have a snake case name
Line range hint
905-909
:
LGTM!The renaming of
is_buy
toisBuy
is consistent with camelCase naming conventions.Tools
GitHub Check: Lints
[failure] 905-905:
structure fieldisBuy
should have a snake case nameGitHub Check: Test Suite
[warning] 905-905:
structure fieldisBuy
should have a snake case name
Line range hint
1472-1476
:
LGTM!The renaming of
execution_type
toexecutionType
is consistent with camelCase naming conventions.Tools
GitHub Check: Lints
[failure] 1472-1472:
structure fieldexecutionType
should have a snake case name
[failure] 1472-1472:
methodexecutionType
should have a snake case nameGitHub Check: Test Suite
[warning] 1472-1472:
structure fieldexecutionType
should have a snake case name
[warning] 1472-1472:
methodexecutionType
should have a snake case name
Line range hint
1495-1499
:
LGTM!The renaming of
execution_type
toexecutionType
is consistent with camelCase naming conventions.
Line range hint
1707-1711
:
LGTM!The renaming of
is_limit_cancel
toisLimitCancel
is consistent with camelCase naming conventions.
Line range hint
1758-1762
:
LGTM!The renaming of
is_limit_cancel
toisLimitCancel
is consistent with camelCase naming conventions.
Line range hint
1772-1776
:
LGTM!The renaming of
is_limit_trigger
toisLimitTrigger
is consistent with camelCase naming conventions.
Line range hint
3180-3184
:
LGTM!The renaming of
is_buy_side
toisBuySide
is consistent with camelCase naming conventions.
Line range hint
3193-3197
:
LGTM!The renaming of
is_buy_side
toisBuySide
is consistent with camelCase naming conventions.
Line range hint
3352-3356
:
LGTM!The renaming of
exchange_type
toexchangeType
is consistent with camelCase naming conventions.
Line range hint
4861-4866
:
LGTM!The introduction of
injective_std_derive::CosmwasmExt
in thefull_derivative_market
module is appropriate and aligns with the PR's objective.
5621-5629
: LGTM!The renaming of
trigger_price
,is_buy
, andis_limit
totriggerPrice
,isBuy
, andisLimit
respectively is consistent with camelCase naming conventions.packages/injective-std/src/types/injective/wasmx/v1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
instead ofosmosis_std_derive::CosmwasmExt
. Ensure that this change aligns with the overall objectives and does not introduce any unintended side effects.packages/injective-std/src/types/injective/insurance/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
instead ofosmosis_std_derive::CosmwasmExt
. Ensure that this change aligns with the overall objectives and does not introduce any unintended side effects.packages/injective-std/src/types/cosmos/bank/v1beta1.rs (1)
1-1
: Update import statement to useinjective_std_derive
.The import statement has been updated to use
injective_std_derive::CosmwasmExt
instead ofosmosis_std_derive::CosmwasmExt
. Ensure that this change aligns with the overall objectives and does not introduce any unintended side effects.packages/injective-std/src/types/cosmos/distribution/v1beta1.rs (1)
1-1
: Verify the compatibility and functionality of the new dependency.The import statement has been changed from
osmosis_std_derive::CosmwasmExt
toinjective_std_derive::CosmwasmExt
. Ensure that the new dependency provides the same or improved functionality without introducing any issues.packages/injective-std/src/types/cosmos/gov/v1.rs (1)
1-1
: Verify the compatibility and functionality of the new dependency.The import statement has been changed from
osmosis_std_derive::CosmwasmExt
toinjective_std_derive::CosmwasmExt
. Ensure that the new dependency provides the same or improved functionality without introducing any issues.
pub auctionRound: u64, | ||
/// auctionClosingTime describes auction close time for the round | ||
#[prost(int64, tag = "3")] | ||
#[serde( | ||
serialize_with = "crate::serde::as_str::serialize", | ||
deserialize_with = "crate::serde::as_str::deserialize" | ||
)] | ||
pub auction_closing_time: i64, | ||
pub auctionClosingTime: i64, | ||
/// highestBidder describes highest bidder on current round | ||
#[prost(string, tag = "4")] | ||
pub highest_bidder: ::prost::alloc::string::String, | ||
pub highestBidder: ::prost::alloc::string::String, | ||
/// highestBidAmount describes highest bid amount on current round | ||
#[prost(string, tag = "5")] | ||
pub highest_bid_amount: ::prost::alloc::string::String, | ||
pub highestBidAmount: ::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.
Consider using snake_case for structure fields.
Static analysis tools suggest using snake_case for structure fields to align with Rust conventions.
- pub auctionRound: u64,
- pub auctionClosingTime: i64,
- pub highestBidder: ::prost::alloc::string::String,
- pub highestBidAmount: ::prost::alloc::string::String,
+ pub auction_round: u64,
+ pub auction_closing_time: i64,
+ pub highest_bidder: ::prost::alloc::string::String,
+ pub highest_bid_amount: ::prost::alloc::string::String,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
pub auctionRound: u64, | |
/// auctionClosingTime describes auction close time for the round | |
#[prost(int64, tag = "3")] | |
#[serde( | |
serialize_with = "crate::serde::as_str::serialize", | |
deserialize_with = "crate::serde::as_str::deserialize" | |
)] | |
pub auction_closing_time: i64, | |
pub auctionClosingTime: i64, | |
/// highestBidder describes highest bidder on current round | |
#[prost(string, tag = "4")] | |
pub highest_bidder: ::prost::alloc::string::String, | |
pub highestBidder: ::prost::alloc::string::String, | |
/// highestBidAmount describes highest bid amount on current round | |
#[prost(string, tag = "5")] | |
pub highest_bid_amount: ::prost::alloc::string::String, | |
pub highestBidAmount: ::prost::alloc::string::String, | |
pub auction_round: u64, | |
/// auctionClosingTime describes auction close time for the round | |
#[prost(int64, tag = "3")] | |
#[serde( | |
serialize_with = "crate::serde::as_str::serialize", | |
deserialize_with = "crate::serde::as_str::deserialize" | |
)] | |
pub auction_closing_time: i64, | |
/// highestBidder describes highest bidder on current round | |
#[prost(string, tag = "4")] | |
pub highest_bidder: ::prost::alloc::string::String, | |
/// highestBidAmount describes highest bid amount on current round | |
#[prost(string, tag = "5")] | |
pub highest_bid_amount: ::prost::alloc::string::String, |
Tools
GitHub Check: Lints
[failure] 176-176:
structure fieldauctionRound
should have a snake case name
[failure] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[failure] 186-186:
structure fieldhighestBidder
should have a snake case name
[failure] 189-189:
structure fieldhighestBidAmount
should have a snake case name
GitHub Check: Test Suite
[warning] 176-176:
structure fieldauctionRound
should have a snake case name
[warning] 183-183:
structure fieldauctionClosingTime
should have a snake case name
[warning] 186-186:
structure fieldhighestBidder
should have a snake case name
[warning] 189-189:
structure fieldhighestBidAmount
should have a snake case name
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- packages/injective-std/src/types/injective/auction/mod.rs (1 hunks)
- packages/injective-std/src/types/injective/exchange/mod.rs (1 hunks)
- packages/injective-std/src/types/injective/peggy/mod.rs (1 hunks)
- packages/injective-std/src/types/injective/peggy/v1.rs (2 hunks)
Files skipped from review due to trivial changes (4)
- packages/injective-std/src/types/injective/auction/mod.rs
- packages/injective-std/src/types/injective/exchange/mod.rs
- packages/injective-std/src/types/injective/peggy/mod.rs
- packages/injective-std/src/types/injective/peggy/v1.rs
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.
Obviously LGMT, but I wonder if some of these changes we will have to do manually now for every chain upgrade?
} | ||
|
||
#[proc_macro_derive(CosmwasmExt, attributes(proto_message, proto_query))] | ||
pub fn derive_cosmwasm_ext(input: TokenStream) -> TokenStream { |
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.
brake into smaller functions could make sense
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
As discussed.
Summary by CodeRabbit
New Features
injective-std-derive
package that provides procedural macros to streamline development with CosmWasm smart contracts.Bug Fixes
Documentation
injective-std-derive
package to explain its purpose and usage, improving developer understanding.Tests
Style