Skip to content

Commit

Permalink
cli
Browse files Browse the repository at this point in the history
  • Loading branch information
GNaD13 authored and ducphamle2 committed Dec 16, 2024
1 parent 4b51212 commit 71708de
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions x/wasm/client/cli/gov_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func SubmitProposalCmd() *cobra.Command {
ProposalAddCodeUploadParamsAddresses(),
ProposalRemoveCodeUploadParamsAddresses(),
ProposalStoreAndMigrateContractCmd(),
ProposalSetGaslessContractsCmd(),
ProposalUnsetGaslessContractsCmd(),
)
return cmd
}
Expand Down Expand Up @@ -719,10 +721,17 @@ func ProposalSetGaslessContractsCmd() *cobra.Command {
return err
}

msg := types.SetGasLessContractsProposal{
Title: proposalTitle,
Description: summary,
ContractAddresses: args,
authority, err := cmd.Flags().GetString(flagAuthority)
if err != nil {
return fmt.Errorf("authority: %s", err)
}

if len(authority) == 0 {
return errors.New("authority address is required")
}

msg := types.MsgSetGaslessContracts{
Contracts: args,
}
if err = msg.ValidateBasic(); err != nil {
return err
Expand Down Expand Up @@ -753,10 +762,17 @@ func ProposalUnsetGaslessContractsCmd() *cobra.Command {
return err
}

msg := types.UnsetGasLessContractsProposal{
Title: proposalTitle,
Description: summary,
ContractAddresses: args,
authority, err := cmd.Flags().GetString(flagAuthority)
if err != nil {
return fmt.Errorf("authority: %s", err)
}

if len(authority) == 0 {
return errors.New("authority address is required")
}

msg := types.MsgUnsetGaslessContracts{
Contracts: args,
}
if err = msg.ValidateBasic(); err != nil {
return err
Expand Down

0 comments on commit 71708de

Please sign in to comment.