Closed dezzeus closed 1 week ago
The changes in this pull request focus on the create.go
file within the mod/cli/pkg/commands/deposit
package. The primary modification involves replacing the dependency on the client
from the Cosmos SDK with the clicontext
package. This affects how application options are retrieved in the getBLSSigner
function, while the overall structure and functionality of the NewCreateValidator
function and command execution logic remain largely unchanged.
File Path | Change Summary |
---|---|
mod/cli/pkg/commands/deposit/create.go | - Added import for clicontext . - Updated getBLSSigner to source AppOpts from clicontext . - No structural changes to NewCreateValidator . |
create.go
file, updating import statements and changing how AppOpts
is sourced, which is directly related to the changes made in the main PR.create.go
file and discusses the NewCreateValidator
function, which is relevant as it pertains to the command for creating validator deposits.create.go
file, which is directly related to the enhancements made in the main PR regarding command execution and user input handling.skill issue
🐇 In the code we hop and play,
Withclicontext
leading the way.
ThegetBLSSigner
now finds its tune,
As we dance with imports, morning to noon.
Validator commands, still strong and bright,
In our rabbit hole, everything feels right! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 0%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 23.48%. Comparing base (
50503f5
) to head (8a0cd92
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
mod/cli/pkg/commands/deposit/create.go | 0.00% | 1 Missing :warning: |
Upon CLI bootstrapping, a
PersistentPreRunE
handler is added to the command in order to, among other things, load the configuration in a viper instance and store it into the command's context with aViperContextKey
key.The
create-validator
command was using the wrong, but homonymous,ViperContextKey
for retrieving the viper configuration from the command context.As a result, the command implementation was not able to find some configuration values which were silently used as empty strings that, eventually, would halt the execution with unexpected errors.
This commit replaces the source package of the
ViperContextKey
key fromgithub.com/cosmos/cosmos-sdk/client
togithub.com/berachain/beacon-kit/mod/cli/pkg/context
This should also fix the issue #2122 .
Summary by CodeRabbit