-
Notifications
You must be signed in to change notification settings - Fork 195
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
fix: unwire perp module for main branch #1830
Conversation
WalkthroughThe updates encompass a range of modifications aimed at refining the installation and operational aspects of the Changes
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? 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.
Review Status
Actionable comments generated: 8
Configuration used: CodeRabbit UI
Files ignored due to path filters (6)
x/perp/v2/types/event.pb.go
is excluded by!**/*.pb.go
x/perp/v2/types/genesis.pb.go
is excluded by!**/*.pb.go
x/perp/v2/types/query.pb.go
is excluded by!**/*.pb.go
x/perp/v2/types/query.pb.gw.go
is excluded by!**/*.pb.gw.go
x/perp/v2/types/state.pb.go
is excluded by!**/*.pb.go
x/perp/v2/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (14)
- INSTALL.md (7 hunks)
- README.md (5 hunks)
- app/keepers.go (10 hunks)
- cmd/nibid/cmd/root.go (2 hunks)
- contrib/docker/chaosnet.Dockerfile (1 hunks)
- contrib/scripts/chaosnet.sh (3 hunks)
- contrib/scripts/localnet.sh (4 hunks)
- justfile (1 hunks)
- simapp/sim_test.go (2 hunks)
- x/common/testutil/cli/network.go (2 hunks)
- x/common/testutil/cli/query.go (3 hunks)
- x/common/testutil/testapp/testapp.go (2 hunks)
- x/oracle/client/cli/gen_pricefeeder_delegation_test.go (1 hunks)
- x/oracle/keeper/hooks.go (2 hunks)
Files skipped from review due to trivial changes (3)
- contrib/docker/chaosnet.Dockerfile
- justfile
- x/oracle/client/cli/gen_pricefeeder_delegation_test.go
Additional comments (9)
x/oracle/keeper/hooks.go (1)
- 7-12: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-96]
The changes in
AfterEpochEnd
function remove all internal logic, leaving only a conditional check. This simplification could impact how rewards and allocations are managed after each epoch. Ensure that this change aligns with the intended behavior and that any necessary logic is handled elsewhere or is no longer needed.x/common/testutil/cli/query.go (1)
- 16-21: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-93]
The removal of functions related to querying markets and positions in the
perp/v2
module suggests a significant change in functionality. Ensure that all references to these removed functions are also updated or removed throughout the codebase to prevent broken dependencies or functionality.Verification successful
The script execution did not find any references to "QueryMarketsV2", "QueryMarketV2", or "QueryPositionV2" in the codebase. This indicates that the necessary cleanup of references to these removed functions has already been performed, aligning with the objectives of ensuring no broken dependencies or functionality. Therefore, the concern raised in the review comment appears to have been addressed.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for references to the removed functions in the codebase rg "QueryMarketsV2|QueryMarketV2|QueryPositionV2"Length of output: 51
x/common/testutil/testapp/testapp.go (1)
- 19-24: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-93]
The removal of the
perp/v2
module import and related functionality in the test app setup indicates alignment with the PR's objective to unwire theperp
module. Ensure that any tests or functionalities depending on theperp
module are either updated or removed to reflect this change.Verification successful
The search results indicate that references to
PerpKeeperV2
andTestingCollateralDenomNUSD
are only found within theCHANGELOG.md
, which documents historical changes and does not reflect current dependencies in the codebase. This suggests that the removal of theperp/v2
module import and related functionality from the test app setup has been handled appropriately, with no unresolved dependencies remaining. Therefore, the changes align with the PR's objective to unwire theperp
module.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for tests or functionalities that might depend on the `perp` module rg "PerpKeeperV2|TestingCollateralDenomNUSD"Length of output: 869
cmd/nibid/cmd/root.go (1)
- 29-34: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-93]
The removal of the
perpv2cli.AddMarketGenesisCmd
function call from theinitRootCmd
function aligns with the PR's objective to unwire theperp
module. Ensure that any dependencies or functionalities relying on this command are either updated or removed to reflect this change.Verification successful
The search for references to the
AddMarketGenesisCmd
function in the codebase did not yield any results, indicating that the removal of this function call frominitRootCmd
does not leave behind any unresolved references or dependencies. This supports the initial assessment that the change aligns with the PR's objective to unwire theperp
module.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for references to the removed `AddMarketGenesisCmd` function in the codebase rg "AddMarketGenesisCmd"Length of output: 24
README.md (4)
- 25-27: The updates to the documentation links are clear and enhance the accessibility of resources for users.
- 47-49: The revised descriptions for the components provide more detailed and accurate information, which is beneficial for readers.
- 51-59: The adjustments to the table formatting for module descriptions improve readability and consistency.
- 91-102: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [70-115]
The minor formatting changes in the
Building: make
commands section contribute to a clearer and more consistent presentation.app/keepers.go (1)
- 366-378: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-428]
Given the extensive changes and the removal of the
perp
module, it's crucial to ensure that all references to theperp
module have been correctly removed. Additionally, related adjustments in keeper initializations, module manager configurations, and app module routing should be carefully reviewed to prevent runtime errors or misconfigurations. Finally, it's important to check for any potential side effects of theperp
module removal, such as broken dependencies or inconsistencies in the application's logic.Verification successful
The verification process did not find any remaining references to the
perp
module inapp/keepers.go
, suggesting that the removal of theperp
module and related adjustments have been correctly implemented in the codebase. No issues were found regarding the module manager configurations or any comments/documentation that might still reference theperp
module. Based on this, the changes mentioned in the review comment appear to have been successfully verified.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to the perp module in the app/keepers.go file. rg --type go 'perp' app/keepers.go # Verify that module manager configurations and app module routing do not include the perp module. rg --type go 'ModuleManager' app/keepers.go rg --type go 'initAppModules' app/keepers.go rg --type go 'initModuleManager' app/keepers.go # Check for any comments or documentation that might still reference the perp module. rg --type go -C3 '//.*perp' app/keepers.goLength of output: 1043
|
||
## ⚙️ — Documentation | ||
|
||
- [Docs | Nibiru Chain](https://nibiru.fi/docs/): Conceptual and technical documentation can be found here. | ||
- [Docs | Nibiru Chain](https://nibiru.fi/docs/): Conceptual and technical documentation can be found here. | ||
- [Complete Golang reference docs](https://pkg.go.dev/github.com/NibiruChain/nibiru): (`pkg.go.dev`) For the blockchain implementation . | ||
- ["X Module"](https://nibiru.fi/docs/dev/x/)-specific documentation | ||
|
||
## 💬 — Community | ||
|
||
If you have questions or concerns, feel free to connect with a developer or community member in the [Nibiru Discord][social-discord]. We also have active communities on [Twitter][social-twitter] and [Telegram][social-telegram]. | ||
|
||
<!-- Markdown versions of the social badges | ||
[![description][discord-badge]][social-discord] | ||
[![description][twitter-badge]][social-twitter] | ||
<!-- Markdown versions of the social badges | ||
[![description][discord-badge]][social-discord] | ||
[![description][twitter-badge]][social-twitter] | ||
[![description][telegram-badge]][social-telegram] | ||
--> | ||
|
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.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [79-79]
The operating system name should adhere to the standard naming convention. Here's the correction:
- MacOS
+ macOS
- [Troubleshooting](#troubleshooting) | ||
- [Contributing](#contributing) | ||
- [Troubleshooting](#troubleshooting-1) | ||
- [Error when running `make install` on MacOS](#error-when-running-make-install-on-macos) |
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.
The "Troubleshooting" section appears twice in the Table of Contents. Consider removing the duplicate entry to avoid confusion.
make install | ||
make localnet | ||
``` | ||
and open another terminal. | ||
|
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.
This sentence does not start with an uppercase letter. Consider revising for consistency and readability.
- and open another terminal.
+ And open another terminal.
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.
INSTALL.md
Outdated
|
||
``` | ||
brew install wget | ||
``` | ||
``` |
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.
📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [115-127]
The operating system from Apple is written as “macOS” rather than “MacOS”. Consider updating for accuracy.
- ### Error when running `make install` on MacOS
+ ### Error when running `make install` on macOS
curr_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
source "$curr_dir/feat-perp.sh" | ||
add_genesis_perp_markets_offline | ||
curr_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" |
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.
The variable curr_dir
appears unused in this script. If it's not needed, consider removing it to clean up the code.
sed -i "s/localhost:1317/0.0.0.0:$LCD_PORT/" $HOME/.nibid/config/app.toml | ||
sed -i "s/localhost:9090/0.0.0.0:$GRPC_PORT/" $HOME/.nibid/config/app.toml | ||
|
||
|
||
# ------------------------------------------------------------------------ | ||
# Configure genesis params | ||
# ------------------------------------------------------------------------ |
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.
📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [16-28]
Consider quoting variables to prevent globbing and word splitting. This is a good practice to ensure that the script behaves as expected when dealing with values that may contain spaces or special characters.
- nibid init $CHAIN_ID --chain-id $CHAIN_ID --home $HOME/.nibid --overwrite
+ nibid init "$CHAIN_ID" --chain-id "$CHAIN_ID" --home "$HOME/.nibid" --overwrite
# behavior of the script is to run make install if the flag --no-build is not present. | ||
FLAG_NO_BUILD=false | ||
|
||
# $FLAG_PERP: Feature flag for x/perp. Enabled with `--features perp`. | ||
FLAG_PERP=false | ||
|
||
# $FLAG_SPOT: Feature flag for x/spot. Enabled with `--features spot`. | ||
FLAG_SPOT=false | ||
|
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.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [26-26]
The expression if [ console_log_text_color ]; then
is constant and might not behave as expected. If you intended to check the success of the console_log_text_color
function, consider using if console_log_text_color; then
instead.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [152-160]
Consider quoting variables to prevent globbing and word splitting. This is a good practice to ensure that the script behaves as expected when dealing with values that may contain spaces or special characters.
- if $BINARY init nibiru-localnet-0 --chain-id $CHAIN_ID --overwrite; then
+ if "$BINARY" init nibiru-localnet-0 --chain-id "$CHAIN_ID" --overwrite; then
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.
Review Status
Actionable comments generated: 9
Configuration used: CodeRabbit UI
Files selected for processing (1)
- contrib/scripts/e2e/deploy-wasm.sh (3 hunks)
Additional comments (1)
contrib/scripts/e2e/deploy-wasm.sh (1)
- 7-7: The update to use
-b block
for the transaction flag is a good improvement for better control flow during transaction processing. This ensures that the script waits for the transaction to be included in a block before proceeding, which is crucial for scripts that depend on the outcome of previous transactions.
contrib/scripts/e2e/deploy-wasm.sh
Outdated
|
||
# validator addr | ||
VALIDATOR_ADDR=$($BINARY keys show validator --address) | ||
echo "Validator address:" | ||
echo "$VALIDATOR_ADDR" | ||
|
||
BALANCE_1=$($BINARY q bank balances "$VALIDATOR_ADDR") | ||
BALANCE_1=$($BINARY q bank balances $VALIDATOR_ADDR) |
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.
To prevent globbing and word splitting, it's recommended to double-quote variables when they are used. This applies to the usage of $VALIDATOR_ADDR
in the command to query bank balances.
- BALANCE_1=$($BINARY q bank balances $VALIDATOR_ADDR)
+ BALANCE_1=$($BINARY q bank balances "$VALIDATOR_ADDR")
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.
BALANCE_1=$($BINARY q bank balances $VALIDATOR_ADDR) | |
BALANCE_1=$($BINARY q bank balances "$VALIDATOR_ADDR") |
contrib/scripts/e2e/deploy-wasm.sh
Outdated
sleep 3 | ||
|
||
CONTRACT_CODE=$($BINARY q tx $TX_HASH --output json | jq -r '.logs[0].events[-1].attributes[-1].value') | ||
CONTRACT_CODE=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value') |
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.
Similar to the previous comment, to prevent globbing and word splitting, it's recommended to double-quote variables when they are used. This applies to the usage of $TXFLAG
in the command to store the contract code.
- CONTRACT_CODE=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value')
+ CONTRACT_CODE=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator "$TXFLAG" --output json | jq -r '.logs[0].events[-1].attributes[-1].value')
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.
CONTRACT_CODE=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value') | |
CONTRACT_CODE=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator "$TXFLAG" --output json | jq -r '.logs[0].events[-1].attributes[-1].value') |
contrib/scripts/e2e/deploy-wasm.sh
Outdated
sleep 3 | ||
|
||
CONTRACT_CODE=$($BINARY q tx $TX_HASH --output json | jq -r '.logs[0].events[-1].attributes[-1].value') | ||
CONTRACT_CODE=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value') | ||
echo "Stored: $CONTRACT_CODE" | ||
|
||
BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR) |
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.
To ensure the script's robustness and prevent potential issues, it's advisable to double-quote variables when they are used. This applies to the usage of $VALIDATOR_ADDR
in the command to query bank balances after storing the contract.
- BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR)
+ BALANCE_2=$($BINARY q bank balances "$VALIDATOR_ADDR")
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.
BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR) | |
BALANCE_2=$($BINARY q bank balances "$VALIDATOR_ADDR") |
contrib/scripts/e2e/deploy-wasm.sh
Outdated
@@ -28,7 +25,6 @@ | |||
|
|||
INIT='{"purchase_price":{"amount":"100","denom":"unibi"},"transfer_price":{"amount":"999","denom":"unibi"}}' | |||
$BINARY tx wasm instantiate $CONTRACT_CODE "$INIT" --from validator $TXFLAG --label "awesome name service" --no-admin |
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.
When using variables in bash scripts, especially in commands that might be affected by globbing or word splitting, it's best practice to double-quote them. This applies to the usage of $CONTRACT_CODE
and $INIT
in the command to instantiate the wasm contract.
- $BINARY tx wasm instantiate $CONTRACT_CODE "$INIT" --from validator $TXFLAG --label "awesome name service" --no-admin
+ $BINARY tx wasm instantiate "$CONTRACT_CODE" "$INIT" --from validator "$TXFLAG" --label "awesome name service" --no-admin
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.
$BINARY tx wasm instantiate $CONTRACT_CODE "$INIT" --from validator $TXFLAG --label "awesome name service" --no-admin | |
$BINARY tx wasm instantiate "$CONTRACT_CODE" "$INIT" --from validator "$TXFLAG" --label "awesome name service" --no-admin |
contrib/scripts/e2e/deploy-wasm.sh
Outdated
@@ -28,7 +25,6 @@ | |||
|
|||
INIT='{"purchase_price":{"amount":"100","denom":"unibi"},"transfer_price":{"amount":"999","denom":"unibi"}}' | |||
$BINARY tx wasm instantiate $CONTRACT_CODE "$INIT" --from validator $TXFLAG --label "awesome name service" --no-admin | |||
sleep 3 | |||
|
|||
CONTRACT_ADDRESS=$($BINARY query wasm list-contract-by-code $CONTRACT_CODE --output json | jq -r '.contracts[-1]') |
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.
To prevent potential issues with globbing and word splitting, it's recommended to double-quote variables in bash scripts. This applies to the usage of $CONTRACT_CODE
in the command to list contracts by code.
- CONTRACT_ADDRESS=$($BINARY query wasm list-contract-by-code $CONTRACT_CODE --output json | jq -r '.contracts[-1]')
+ CONTRACT_ADDRESS=$($BINARY query wasm list-contract-by-code "$CONTRACT_CODE" --output json | jq -r '.contracts[-1]')
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.
CONTRACT_ADDRESS=$($BINARY query wasm list-contract-by-code $CONTRACT_CODE --output json | jq -r '.contracts[-1]') | |
CONTRACT_ADDRESS=$($BINARY query wasm list-contract-by-code "$CONTRACT_CODE" --output json | jq -r '.contracts[-1]') |
contrib/scripts/e2e/deploy-wasm.sh
Outdated
BINARY="nibid" | ||
DENOM="unibi" | ||
CHAIN_ID="nibiru-localnet-0" | ||
TXFLAG="--gas-prices 0.1$DENOM --gas auto --gas-adjustment 1.3 -y -b async --chain-id $CHAIN_ID" | ||
TXFLAG="--gas-prices 0.1$DENOM --gas auto --gas-adjustment 1.3 -y -b block --chain-id $CHAIN_ID" | ||
|
||
# validator addr | ||
VALIDATOR_ADDR=$($BINARY keys show validator --address) | ||
echo "Validator address:" | ||
echo "$VALIDATOR_ADDR" | ||
|
||
BALANCE_1=$($BINARY q bank balances "$VALIDATOR_ADDR") | ||
BALANCE_1=$($BINARY q bank balances $VALIDATOR_ADDR) | ||
echo "Pre-store balance:" | ||
echo "$BALANCE_1" | ||
echo "TX Flags: $TXFLAG" | ||
|
||
TX_HASH=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator $TXFLAG --output json | jq -r '.txhash' ) | ||
sleep 3 | ||
|
||
CONTRACT_CODE=$($BINARY q tx $TX_HASH --output json | jq -r '.logs[0].events[-1].attributes[-1].value') | ||
CONTRACT_CODE=$($BINARY tx wasm store "./contrib/scripts/e2e/contracts/cw_nameservice.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value') | ||
echo "Stored: $CONTRACT_CODE" | ||
|
||
BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR) |
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.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [32-32]
For better script safety and to avoid issues related to globbing and word splitting, ensure variables are double-quoted. This applies to the usage of $CONTRACT_ADDRESS
in the command to query the wasm contract.
- $BINARY query wasm contract $CONTRACT_ADDRESS
+ $BINARY query wasm contract "$CONTRACT_ADDRESS"
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [39-39]
To ensure the script's reliability, it's recommended to double-quote variables when they are used. This applies to the usage of $CONTRACT_ADDRESS
and $NAME_QUERY
in the command to query the registered domain name.
- DOMAIN_OWNER=$($BINARY query wasm contract-state smart $CONTRACT_ADDRESS "$NAME_QUERY" --output json | jq -r '.data.address')
+ DOMAIN_OWNER=$($BINARY query wasm contract-state smart "$CONTRACT_ADDRESS" "$NAME_QUERY" --output json | jq -r '.data.address')
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [42-42]
Finally, to prevent issues with globbing and word splitting, it's advisable to double-quote variables in bash scripts. This applies to the comparison of $DOMAIN_OWNER
and $VALIDATOR_ADDR
in the conditional statement.
- if [ $DOMAIN_OWNER != $VALIDATOR_ADDR ]; then
+ if [ "$DOMAIN_OWNER" != "$VALIDATOR_ADDR" ]; then
contrib/scripts/e2e/deploy-wasm.sh
Outdated
@@ -37,7 +33,6 @@ | |||
|
|||
# purchase a domain name | |||
$BINARY tx wasm execute $CONTRACT_ADDRESS '{"register":{"name":"uniques-domain"}}' --amount 100$DENOM --from validator $TXFLAG -y |
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.
To enhance the script's robustness, it's advisable to double-quote variables in bash scripts. This applies to the usage of $CONTRACT_ADDRESS
and $TXFLAG
in the command to execute the wasm contract.
- $BINARY tx wasm execute $CONTRACT_ADDRESS '{"register":{"name":"uniques-domain"}}' --amount 100$DENOM --from validator $TXFLAG -y
+ $BINARY tx wasm execute "$CONTRACT_ADDRESS" '{"register":{"name":"uniques-domain"}}' --amount 100$DENOM --from validator "$TXFLAG" -y
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.
$BINARY tx wasm execute $CONTRACT_ADDRESS '{"register":{"name":"uniques-domain"}}' --amount 100$DENOM --from validator $TXFLAG -y | |
$BINARY tx wasm execute "$CONTRACT_ADDRESS" '{"register":{"name":"uniques-domain"}}' --amount 100$DENOM --from validator "$TXFLAG" -y |
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
Purpose / Abstract
Summary by CodeRabbit
Documentation
INSTALL.md
with more detailed installation instructions, including troubleshooting subsections.README.md
with updated links, component descriptions, and formatting improvements.New Features
Refactor
perp
module across various files, indicating a shift in module strategy.AfterEpochEnd
function in thex/oracle/keeper
package, changing how rewards and allocations are managed.Chores
deploy-wasm.sh
script for better transaction processing control.Bug Fixes
contrib/scripts/localnet.sh
to enable onlyFLAG_SPOT
and display its status correctly.