-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(auth,vesting): add autocli options for tx #18100
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9361853
feat(auth,vesting): add autocli options for tx
julienrbrt 036ce4d
changelog + correct wire
julienrbrt 6663b70
updates
julienrbrt 314f006
delete unecessary file
julienrbrt e4c841e
Merge branch 'main' into julien/autocli-tx-auth
julienrbrt 4bf8028
Merge branch 'main' into julien/autocli-tx-auth
julienrbrt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package vesting | ||
|
||
import ( | ||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" | ||
vestingv1beta1 "cosmossdk.io/api/cosmos/vesting/v1beta1" | ||
) | ||
|
||
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. | ||
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { | ||
return &autocliv1.ModuleOptions{ | ||
Tx: &autocliv1.ServiceCommandDescriptor{ | ||
Service: vestingv1beta1.Msg_ServiceDesc.ServiceName, | ||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{ | ||
{ | ||
RpcMethod: "CreateVestingAccount", | ||
Use: "create-vesting-account [to_address] [end_time] [amount]", | ||
Short: "Create a new vesting account funded with an allocation of tokens.", | ||
Long: `Create a new vesting account funded with an allocation of tokens. The | ||
account can either be a delayed or continuous vesting account, which is determined | ||
by the '--delayed' flag. All vesting accounts created will have their start time | ||
set by the committed block's time. The end_time must be provided as a UNIX epoch | ||
timestamp.`, | ||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{ | ||
{ProtoField: "to_address"}, | ||
{ProtoField: "end_time"}, | ||
{ProtoField: "amount", Varargs: true}, | ||
}, | ||
FlagOptions: map[string]*autocliv1.FlagOptions{ | ||
"delayed": {Name: "delayed", Usage: "Create a delayed vesting account if true"}, | ||
}, | ||
}, | ||
{ | ||
RpcMethod: "CreatePermanentLockedAccount", | ||
Use: "create-permanent-locked-account [to_address] [amount]", | ||
Short: "Create a new permanently locked account funded with an allocation of tokens.", | ||
Long: `Create a new account funded with an allocation of permanently locked tokens. These | ||
tokens may be used for staking but are non-transferable. Staking rewards will acrue as liquid and transferable | ||
tokens.`, | ||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{ | ||
{ProtoField: "to_address"}, | ||
{ProtoField: "amount", Varargs: true}, | ||
}, | ||
}, | ||
}, | ||
EnhanceCustomCommand: true, | ||
}, | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
since it is CLI breaking, can we keep the existing command with deprecated tag?
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.
It is minimally breaking (swapping two args), so I'd argue that this isn't necessary.