diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md
index 9c0cccb887..d460d66b6d 100644
--- a/docs/proto/proto-docs.md
+++ b/docs/proto/proto-docs.md
@@ -82,6 +82,8 @@
- [Query](#cosmwasm.wasm.v1.Query)
- [cosmwasm/wasm/v1/tx.proto](#cosmwasm/wasm/v1/tx.proto)
+ - [MsgAddCodeUploadParamsAddresses](#cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses)
+ - [MsgAddCodeUploadParamsAddressesResponse](#cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse)
- [MsgClearAdmin](#cosmwasm.wasm.v1.MsgClearAdmin)
- [MsgClearAdminResponse](#cosmwasm.wasm.v1.MsgClearAdminResponse)
- [MsgExecuteContract](#cosmwasm.wasm.v1.MsgExecuteContract)
@@ -94,6 +96,8 @@
- [MsgMigrateContractResponse](#cosmwasm.wasm.v1.MsgMigrateContractResponse)
- [MsgPinCodes](#cosmwasm.wasm.v1.MsgPinCodes)
- [MsgPinCodesResponse](#cosmwasm.wasm.v1.MsgPinCodesResponse)
+ - [MsgRemoveCodeUploadParamsAddresses](#cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses)
+ - [MsgRemoveCodeUploadParamsAddressesResponse](#cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse)
- [MsgStoreAndInstantiateContract](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContract)
- [MsgStoreAndInstantiateContractResponse](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse)
- [MsgStoreCode](#cosmwasm.wasm.v1.MsgStoreCode)
@@ -1333,6 +1337,34 @@ Query provides defines the gRPC querier service
+
+
+### MsgAddCodeUploadParamsAddresses
+MsgAddCodeUploadParamsAddresses is the
+MsgAddCodeUploadParamsAddresses request type.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `authority` | [string](#string) | | Authority is the address of the governance account. |
+| `addresses` | [string](#string) | repeated | |
+
+
+
+
+
+
+
+
+### MsgAddCodeUploadParamsAddressesResponse
+MsgAddCodeUploadParamsAddressesResponse defines the response
+structure for executing a MsgAddCodeUploadParamsAddresses message.
+
+
+
+
+
+
### MsgClearAdmin
@@ -1532,6 +1564,34 @@ Since: 0.40
+
+
+### MsgRemoveCodeUploadParamsAddresses
+MsgRemoveCodeUploadParamsAddresses is the
+MsgRemoveCodeUploadParamsAddresses request type.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `authority` | [string](#string) | | Authority is the address of the governance account. |
+| `addresses` | [string](#string) | repeated | |
+
+
+
+
+
+
+
+
+### MsgRemoveCodeUploadParamsAddressesResponse
+MsgRemoveCodeUploadParamsAddressesResponse defines the response
+structure for executing a MsgRemoveCodeUploadParamsAddresses message.
+
+
+
+
+
+
### MsgStoreAndInstantiateContract
@@ -1803,6 +1863,8 @@ Since: 0.40 | |
| `StoreAndInstantiateContract` | [MsgStoreAndInstantiateContract](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContract) | [MsgStoreAndInstantiateContractResponse](#cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse) | StoreAndInstantiateContract defines a governance operation for storing and instantiating the contract. The authority is defined in the keeper.
Since: 0.40 | |
+| `RemoveCodeUploadParamsAddresses` | [MsgRemoveCodeUploadParamsAddresses](#cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses) | [MsgRemoveCodeUploadParamsAddressesResponse](#cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse) | RemoveCodeUploadParamsAddresses defines a governance operation for removing addresses from code upload params. The authority is defined in the keeper. | |
+| `AddCodeUploadParamsAddresses` | [MsgAddCodeUploadParamsAddresses](#cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses) | [MsgAddCodeUploadParamsAddressesResponse](#cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse) | AddCodeUploadParamsAddresses defines a governance operation for adding addresses to code upload params. The authority is defined in the keeper. | |
diff --git a/proto/cosmwasm/wasm/v1/tx.proto b/proto/cosmwasm/wasm/v1/tx.proto
index 90905f5e7d..1ce7823c1b 100644
--- a/proto/cosmwasm/wasm/v1/tx.proto
+++ b/proto/cosmwasm/wasm/v1/tx.proto
@@ -60,6 +60,16 @@ service Msg {
// Since: 0.40
rpc StoreAndInstantiateContract(MsgStoreAndInstantiateContract)
returns (MsgStoreAndInstantiateContractResponse);
+ // RemoveCodeUploadParamsAddresses defines a governance operation for
+ // removing addresses from code upload params.
+ // The authority is defined in the keeper.
+ rpc RemoveCodeUploadParamsAddresses(MsgRemoveCodeUploadParamsAddresses)
+ returns (MsgRemoveCodeUploadParamsAddressesResponse);
+ // AddCodeUploadParamsAddresses defines a governance operation for
+ // adding addresses to code upload params.
+ // The authority is defined in the keeper.
+ rpc AddCodeUploadParamsAddresses(MsgAddCodeUploadParamsAddresses)
+ returns (MsgAddCodeUploadParamsAddressesResponse);
}
// MsgStoreCode submit Wasm code to the system
@@ -388,4 +398,36 @@ message MsgStoreAndInstantiateContractResponse {
string address = 1;
// Data contains bytes to returned from the contract
bytes data = 2;
-}
\ No newline at end of file
+}
+
+// MsgAddCodeUploadParamsAddresses is the
+// MsgAddCodeUploadParamsAddresses request type.
+message MsgAddCodeUploadParamsAddresses {
+ option (amino.name) = "wasm/MsgAddCodeUploadParamsAddresses";
+ option (cosmos.msg.v1.signer) = "authority";
+
+ // Authority is the address of the governance account.
+ string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
+
+ repeated string addresses = 2 [ (gogoproto.moretags) = "yaml:\"addresses\"" ];
+}
+
+// MsgAddCodeUploadParamsAddressesResponse defines the response
+// structure for executing a MsgAddCodeUploadParamsAddresses message.
+message MsgAddCodeUploadParamsAddressesResponse {}
+
+// MsgRemoveCodeUploadParamsAddresses is the
+// MsgRemoveCodeUploadParamsAddresses request type.
+message MsgRemoveCodeUploadParamsAddresses {
+ option (amino.name) = "wasm/MsgRemoveCodeUploadParamsAddresses";
+ option (cosmos.msg.v1.signer) = "authority";
+
+ // Authority is the address of the governance account.
+ string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
+
+ repeated string addresses = 2 [ (gogoproto.moretags) = "yaml:\"addresses\"" ];
+}
+
+// MsgRemoveCodeUploadParamsAddressesResponse defines the response
+// structure for executing a MsgRemoveCodeUploadParamsAddresses message.
+message MsgRemoveCodeUploadParamsAddressesResponse {}
\ No newline at end of file
diff --git a/x/wasm/client/cli/gov_tx.go b/x/wasm/client/cli/gov_tx.go
index 969cb263b3..0a46ac6ecf 100644
--- a/x/wasm/client/cli/gov_tx.go
+++ b/x/wasm/client/cli/gov_tx.go
@@ -48,6 +48,8 @@ func SubmitProposalCmd() *cobra.Command {
ProposalPinCodesCmd(),
ProposalUnpinCodesCmd(),
ProposalUpdateInstantiateConfigCmd(),
+ ProposalAddCodeUploadParamsAddresses(),
+ ProposalRemoveCodeUploadParamsAddresses(),
)
return cmd
}
@@ -805,6 +807,90 @@ $ %s tx gov submit-proposal update-instantiate-config 1:nobody 2:everybody 3:%s1
return cmd
}
+func ProposalAddCodeUploadParamsAddresses() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "add-code-upload-params-addresses [addresses] --title [text] --summary [text] --authority [address]",
+ Short: "Submit an add code upload params addresses proposal to add addresses to code upload config params",
+ Args: cobra.MinimumNArgs(1),
+ RunE: func(cmd *cobra.Command, args []string) error {
+ clientCtx, proposalTitle, summary, deposit, err := getProposalInfo(cmd)
+ if err != nil {
+ return err
+ }
+
+ 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.MsgAddCodeUploadParamsAddresses{
+ Authority: authority,
+ Addresses: args,
+ }
+
+ proposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{&msg}, deposit, clientCtx.GetFromAddress().String(), "", proposalTitle, summary)
+ if err != nil {
+ return err
+ }
+ if err = proposalMsg.ValidateBasic(); err != nil {
+ return err
+ }
+
+ return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), proposalMsg)
+ },
+ SilenceUsage: true,
+ }
+ // proposal flags
+ addCommonProposalFlags(cmd)
+ return cmd
+}
+
+func ProposalRemoveCodeUploadParamsAddresses() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "remove-code-upload-params-addresses [addresses] --title [text] --summary [text] --authority [address]",
+ Short: "Submit a remove code upload params addresses proposal to remove addresses from code upload config params",
+ Args: cobra.MinimumNArgs(1),
+ RunE: func(cmd *cobra.Command, args []string) error {
+ clientCtx, proposalTitle, summary, deposit, err := getProposalInfo(cmd)
+ if err != nil {
+ return err
+ }
+
+ 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.MsgRemoveCodeUploadParamsAddresses{
+ Authority: authority,
+ Addresses: args,
+ }
+
+ proposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{&msg}, deposit, clientCtx.GetFromAddress().String(), "", proposalTitle, summary)
+ if err != nil {
+ return err
+ }
+ if err = proposalMsg.ValidateBasic(); err != nil {
+ return err
+ }
+
+ return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), proposalMsg)
+ },
+ SilenceUsage: true,
+ }
+ // proposal flags
+ addCommonProposalFlags(cmd)
+ return cmd
+}
+
func addCommonProposalFlags(cmd *cobra.Command) {
flags.AddTxFlagsToCmd(cmd)
cmd.Flags().String(cli.FlagTitle, "", "Title of proposal")
diff --git a/x/wasm/keeper/msg_server.go b/x/wasm/keeper/msg_server.go
index 18bfc024cf..ace3059d66 100644
--- a/x/wasm/keeper/msg_server.go
+++ b/x/wasm/keeper/msg_server.go
@@ -357,6 +357,81 @@ func (m msgServer) StoreAndInstantiateContract(goCtx context.Context, req *types
}, nil
}
+// AddCodeUploadParamsAddresses adds addresses to code upload params
+func (m msgServer) AddCodeUploadParamsAddresses(goCtx context.Context, req *types.MsgAddCodeUploadParamsAddresses) (*types.MsgAddCodeUploadParamsAddressesResponse, error) {
+ if err := req.ValidateBasic(); err != nil {
+ return nil, err
+ }
+ authority := m.keeper.GetAuthority()
+ if authority != req.Authority {
+ return nil, errorsmod.Wrapf(types.ErrInvalid, "invalid authority; expected %s, got %s", authority, req.Authority)
+ }
+
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ params := m.keeper.GetParams(ctx)
+ if params.CodeUploadAccess.Permission != types.AccessTypeAnyOfAddresses {
+ return nil, errorsmod.Wrap(types.ErrInvalid, "permission")
+ }
+
+ addresses := params.CodeUploadAccess.Addresses
+ for _, newAddr := range req.Addresses {
+ if !contains(addresses, newAddr) {
+ addresses = append(addresses, newAddr)
+ }
+ }
+
+ params.CodeUploadAccess.Addresses = addresses
+ if err := m.keeper.SetParams(ctx, params); err != nil {
+ return nil, err
+ }
+
+ return &types.MsgAddCodeUploadParamsAddressesResponse{}, nil
+}
+
+// RemoveCodeUploadParamsAddresses removes addresses to code upload params
+func (m msgServer) RemoveCodeUploadParamsAddresses(goCtx context.Context, req *types.MsgRemoveCodeUploadParamsAddresses) (*types.MsgRemoveCodeUploadParamsAddressesResponse, error) {
+ if err := req.ValidateBasic(); err != nil {
+ return nil, err
+ }
+ authority := m.keeper.GetAuthority()
+ if authority != req.Authority {
+ return nil, errorsmod.Wrapf(types.ErrInvalid, "invalid authority; expected %s, got %s", authority, req.Authority)
+ }
+
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ params := m.keeper.GetParams(ctx)
+ if params.CodeUploadAccess.Permission != types.AccessTypeAnyOfAddresses {
+ return nil, errorsmod.Wrap(types.ErrInvalid, "permission")
+ }
+ addresses := params.CodeUploadAccess.Addresses
+ newAddresses := make([]string, 0)
+ for _, addr := range addresses {
+ if contains(req.Addresses, addr) {
+ continue
+ }
+ newAddresses = append(newAddresses, addr)
+ }
+
+ params.CodeUploadAccess.Addresses = newAddresses
+
+ if err := m.keeper.SetParams(ctx, params); err != nil {
+ return nil, err
+ }
+
+ return &types.MsgRemoveCodeUploadParamsAddressesResponse{}, nil
+}
+
+func contains[T comparable](src []T, o T) bool {
+ for _, v := range src {
+ if v == o {
+ return true
+ }
+ }
+ return false
+}
+
func (m msgServer) selectAuthorizationPolicy(ctx sdk.Context, actor string) types.AuthorizationPolicy {
if actor == m.keeper.GetAuthority() {
return newGovAuthorizationPolicy(m.keeper.propagateGovAuthorization)
diff --git a/x/wasm/keeper/msg_server_integration_test.go b/x/wasm/keeper/msg_server_integration_test.go
index 0ee2e21c22..e4b3ed6b45 100644
--- a/x/wasm/keeper/msg_server_integration_test.go
+++ b/x/wasm/keeper/msg_server_integration_test.go
@@ -145,6 +145,198 @@ func TestUpdateParams(t *testing.T) {
}
}
+func TestAddCodeUploadParamsAddresses(t *testing.T) {
+ wasmApp := app.Setup(t)
+ ctx := wasmApp.BaseApp.NewContext(false, tmproto.Header{})
+
+ var (
+ myAddress sdk.AccAddress = make([]byte, types.ContractAddrLen)
+ _, _, otherAddr = testdata.KeyTestPubAddr()
+ govAuthority = wasmApp.WasmKeeper.GetAuthority()
+ )
+
+ specs := map[string]struct {
+ src types.MsgAddCodeUploadParamsAddresses
+ uploadConfig types.AccessConfig
+ expUploadConfig types.AccessConfig
+ expErr bool
+ }{
+ "authority can add addresses when permission is any of addresses": {
+ src: types.MsgAddCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress, otherAddr),
+ },
+ "add existing address": {
+ src: types.MsgAddCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{myAddress.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ },
+ "authority cannot add addresses when permission is allow everybody": {
+ src: types.MsgAddCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AllowEverybody,
+ expUploadConfig: types.AllowEverybody,
+ expErr: true,
+ },
+ "authority cannot add addresses when permission is allow nobody": {
+ src: types.MsgAddCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AllowNobody,
+ expUploadConfig: types.AllowNobody,
+ expErr: true,
+ },
+ "authority cannot add duplicate addresses when permission is any of addresses": {
+ src: types.MsgAddCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String(), otherAddr.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ expErr: true,
+ },
+ "other address cannot add addresses when permission is any of addresses": {
+ src: types.MsgAddCodeUploadParamsAddresses{
+ Authority: otherAddr.String(),
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress, otherAddr),
+ expErr: true,
+ },
+ }
+ for name, spec := range specs {
+ t.Run(name, func(t *testing.T) {
+ err := wasmApp.WasmKeeper.SetParams(ctx, types.Params{
+ CodeUploadAccess: spec.uploadConfig,
+ InstantiateDefaultPermission: types.AccessTypeEverybody,
+ })
+ require.NoError(t, err)
+
+ // when
+ rsp, err := wasmApp.MsgServiceRouter().Handler(&spec.src)(ctx, &spec.src)
+ if spec.expErr {
+ require.Error(t, err)
+ require.Nil(t, rsp)
+ return
+ }
+ require.NoError(t, err)
+ require.Len(t, rsp.MsgResponses, 1)
+ assert.IsType(t, rsp.MsgResponses[0].GetCachedValue(), &types.MsgAddCodeUploadParamsAddressesResponse{})
+
+ // then
+ gotUploadConfig := wasmApp.WasmKeeper.GetParams(ctx).CodeUploadAccess
+ assert.True(t, spec.expUploadConfig.Equals(gotUploadConfig),
+ "got %#v not %#v", gotUploadConfig, spec.expUploadConfig)
+ })
+ }
+}
+
+func TestRemoveCodeUploadParamsAddresses(t *testing.T) {
+ wasmApp := app.Setup(t)
+ ctx := wasmApp.BaseApp.NewContext(false, tmproto.Header{})
+
+ var (
+ myAddress sdk.AccAddress = make([]byte, types.ContractAddrLen)
+ _, _, otherAddr = testdata.KeyTestPubAddr()
+ govAuthority = wasmApp.WasmKeeper.GetAuthority()
+ )
+
+ specs := map[string]struct {
+ src types.MsgRemoveCodeUploadParamsAddresses
+ uploadConfig types.AccessConfig
+ expUploadConfig types.AccessConfig
+ expErr bool
+ }{
+ "authority can remove addresses when permission is any of addresses": {
+ src: types.MsgRemoveCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress, otherAddr),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ },
+ "authority cannot remove not existing addresses when permission is any of addresses": {
+ src: types.MsgRemoveCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress),
+ },
+ "authority cannot remove addresses when permission is allow everybody": {
+ src: types.MsgRemoveCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AllowEverybody,
+ expUploadConfig: types.AllowEverybody,
+ expErr: true,
+ },
+ "authority cannot remove addresses when permission is allow nobody": {
+ src: types.MsgRemoveCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AllowNobody,
+ expUploadConfig: types.AllowNobody,
+ expErr: true,
+ },
+ "authority cannot remove duplicate addresses when permission is any of addresses": {
+ src: types.MsgRemoveCodeUploadParamsAddresses{
+ Authority: govAuthority,
+ Addresses: []string{otherAddr.String(), otherAddr.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress, otherAddr),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress, otherAddr),
+ expErr: true,
+ },
+ "other address cannot remove addresses when permission is any of addresses": {
+ src: types.MsgRemoveCodeUploadParamsAddresses{
+ Authority: otherAddr.String(),
+ Addresses: []string{otherAddr.String()},
+ },
+ uploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress, otherAddr),
+ expUploadConfig: types.AccessTypeAnyOfAddresses.With(myAddress, otherAddr),
+ expErr: true,
+ },
+ }
+ for name, spec := range specs {
+ t.Run(name, func(t *testing.T) {
+ err := wasmApp.WasmKeeper.SetParams(ctx, types.Params{
+ CodeUploadAccess: spec.uploadConfig,
+ InstantiateDefaultPermission: types.AccessTypeEverybody,
+ })
+ require.NoError(t, err)
+
+ // when
+ rsp, err := wasmApp.MsgServiceRouter().Handler(&spec.src)(ctx, &spec.src)
+ if spec.expErr {
+ require.Error(t, err)
+ require.Nil(t, rsp)
+ return
+ }
+ require.NoError(t, err)
+ require.Len(t, rsp.MsgResponses, 1)
+ assert.IsType(t, rsp.MsgResponses[0].GetCachedValue(), &types.MsgRemoveCodeUploadParamsAddressesResponse{})
+
+ // then
+ gotUploadConfig := wasmApp.WasmKeeper.GetParams(ctx).CodeUploadAccess
+ assert.True(t, spec.expUploadConfig.Equals(gotUploadConfig),
+ "got %#v not %#v", gotUploadConfig, spec.expUploadConfig)
+ })
+ }
+}
+
func TestPinCodes(t *testing.T) {
wasmApp := app.Setup(t)
ctx := wasmApp.BaseApp.NewContext(false, tmproto.Header{})
diff --git a/x/wasm/types/codec.go b/x/wasm/types/codec.go
index 10ff3af67d..aafa435fb9 100644
--- a/x/wasm/types/codec.go
+++ b/x/wasm/types/codec.go
@@ -28,6 +28,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgPinCodes{}, "wasm/MsgPinCodes", nil)
cdc.RegisterConcrete(&MsgUnpinCodes{}, "wasm/MsgUnpinCodes", nil)
cdc.RegisterConcrete(&MsgStoreAndInstantiateContract{}, "wasm/MsgStoreAndInstantiateContract", nil)
+ cdc.RegisterConcrete(&MsgAddCodeUploadParamsAddresses{}, "wasm/MsgAddCodeUploadParamsAddresses", nil)
+ cdc.RegisterConcrete(&MsgRemoveCodeUploadParamsAddresses{}, "wasm/MsgRemoveCodeUploadParamsAddresses", nil)
cdc.RegisterConcrete(&PinCodesProposal{}, "wasm/PinCodesProposal", nil)
cdc.RegisterConcrete(&UnpinCodesProposal{}, "wasm/UnpinCodesProposal", nil)
@@ -76,6 +78,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
&MsgPinCodes{},
&MsgUnpinCodes{},
&MsgStoreAndInstantiateContract{},
+ &MsgAddCodeUploadParamsAddresses{},
+ &MsgRemoveCodeUploadParamsAddresses{},
)
registry.RegisterImplementations(
(*v1beta1.Content)(nil),
diff --git a/x/wasm/types/tx.go b/x/wasm/types/tx.go
index d75993b7f6..ba8acce15d 100644
--- a/x/wasm/types/tx.go
+++ b/x/wasm/types/tx.go
@@ -615,3 +615,81 @@ func (msg MsgStoreAndInstantiateContract) ValidateBasic() error {
}
return nil
}
+
+func (msg MsgAddCodeUploadParamsAddresses) Route() string {
+ return RouterKey
+}
+
+func (msg MsgAddCodeUploadParamsAddresses) Type() string {
+ return "add-code-upload-params-addresses"
+}
+
+func (msg MsgAddCodeUploadParamsAddresses) GetSigners() []sdk.AccAddress {
+ authority, err := sdk.AccAddressFromBech32(msg.Authority)
+ if err != nil { // should never happen as valid basic rejects invalid addresses
+ panic(err.Error())
+ }
+ return []sdk.AccAddress{authority}
+}
+
+func (msg MsgAddCodeUploadParamsAddresses) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
+}
+
+func (msg MsgAddCodeUploadParamsAddresses) ValidateBasic() error {
+ if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil {
+ return errorsmod.Wrap(err, "authority")
+ }
+
+ if len(msg.Addresses) == 0 {
+ return errorsmod.Wrap(ErrEmpty, "addresses")
+ }
+
+ return checkDuplicatedAddresses(msg.Addresses)
+}
+
+func (msg MsgRemoveCodeUploadParamsAddresses) Route() string {
+ return RouterKey
+}
+
+func (msg MsgRemoveCodeUploadParamsAddresses) Type() string {
+ return "remove-code-upload-params-addresses"
+}
+
+func (msg MsgRemoveCodeUploadParamsAddresses) GetSigners() []sdk.AccAddress {
+ authority, err := sdk.AccAddressFromBech32(msg.Authority)
+ if err != nil { // should never happen as valid basic rejects invalid addresses
+ panic(err.Error())
+ }
+ return []sdk.AccAddress{authority}
+}
+
+func (msg MsgRemoveCodeUploadParamsAddresses) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
+}
+
+func (msg MsgRemoveCodeUploadParamsAddresses) ValidateBasic() error {
+ if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil {
+ return errorsmod.Wrap(err, "authority")
+ }
+
+ if len(msg.Addresses) == 0 {
+ return errorsmod.Wrap(ErrEmpty, "addresses")
+ }
+
+ return checkDuplicatedAddresses(msg.Addresses)
+}
+
+func checkDuplicatedAddresses(addresses []string) error {
+ index := map[string]struct{}{}
+ for _, addr := range addresses {
+ if _, err := sdk.AccAddressFromBech32(addr); err != nil {
+ return errorsmod.Wrap(err, "addresses")
+ }
+ if _, found := index[addr]; found {
+ return errorsmod.Wrap(ErrInvalid, "duplicate addresses")
+ }
+ index[addr] = struct{}{}
+ }
+ return nil
+}
diff --git a/x/wasm/types/tx.pb.go b/x/wasm/types/tx.pb.go
index 4d4ad490e2..ba3dcc60f3 100644
--- a/x/wasm/types/tx.pb.go
+++ b/x/wasm/types/tx.pb.go
@@ -1289,6 +1289,189 @@ func (m *MsgStoreAndInstantiateContractResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgStoreAndInstantiateContractResponse proto.InternalMessageInfo
+// MsgAddCodeUploadParamsAddresses is the
+// MsgAddCodeUploadParamsAddresses request type.
+type MsgAddCodeUploadParamsAddresses struct {
+ // Authority is the address of the governance account.
+ Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
+ Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"`
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) Reset() { *m = MsgAddCodeUploadParamsAddresses{} }
+func (m *MsgAddCodeUploadParamsAddresses) String() string { return proto.CompactTextString(m) }
+func (*MsgAddCodeUploadParamsAddresses) ProtoMessage() {}
+func (*MsgAddCodeUploadParamsAddresses) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4f74d82755520264, []int{26}
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgAddCodeUploadParamsAddresses.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgAddCodeUploadParamsAddresses.Merge(m, src)
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) XXX_Size() int {
+ return m.Size()
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgAddCodeUploadParamsAddresses.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgAddCodeUploadParamsAddresses proto.InternalMessageInfo
+
+// MsgAddCodeUploadParamsAddressesResponse defines the response
+// structure for executing a MsgAddCodeUploadParamsAddresses message.
+type MsgAddCodeUploadParamsAddressesResponse struct{}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) Reset() {
+ *m = MsgAddCodeUploadParamsAddressesResponse{}
+}
+func (m *MsgAddCodeUploadParamsAddressesResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgAddCodeUploadParamsAddressesResponse) ProtoMessage() {}
+func (*MsgAddCodeUploadParamsAddressesResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4f74d82755520264, []int{27}
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgAddCodeUploadParamsAddressesResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgAddCodeUploadParamsAddressesResponse.Merge(m, src)
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Size() int {
+ return m.Size()
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgAddCodeUploadParamsAddressesResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgAddCodeUploadParamsAddressesResponse proto.InternalMessageInfo
+
+// MsgRemoveCodeUploadParamsAddresses is the
+// MsgRemoveCodeUploadParamsAddresses request type.
+type MsgRemoveCodeUploadParamsAddresses struct {
+ // Authority is the address of the governance account.
+ Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
+ Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"`
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) Reset() { *m = MsgRemoveCodeUploadParamsAddresses{} }
+func (m *MsgRemoveCodeUploadParamsAddresses) String() string { return proto.CompactTextString(m) }
+func (*MsgRemoveCodeUploadParamsAddresses) ProtoMessage() {}
+func (*MsgRemoveCodeUploadParamsAddresses) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4f74d82755520264, []int{28}
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses.Merge(m, src)
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Size() int {
+ return m.Size()
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses proto.InternalMessageInfo
+
+// MsgRemoveCodeUploadParamsAddressesResponse defines the response
+// structure for executing a MsgRemoveCodeUploadParamsAddresses message.
+type MsgRemoveCodeUploadParamsAddressesResponse struct{}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) Reset() {
+ *m = MsgRemoveCodeUploadParamsAddressesResponse{}
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) String() string {
+ return proto.CompactTextString(m)
+}
+func (*MsgRemoveCodeUploadParamsAddressesResponse) ProtoMessage() {}
+func (*MsgRemoveCodeUploadParamsAddressesResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4f74d82755520264, []int{29}
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgRemoveCodeUploadParamsAddressesResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgRemoveCodeUploadParamsAddressesResponse.Merge(m, src)
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Size() int {
+ return m.Size()
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgRemoveCodeUploadParamsAddressesResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgRemoveCodeUploadParamsAddressesResponse proto.InternalMessageInfo
+
func init() {
proto.RegisterType((*MsgStoreCode)(nil), "cosmwasm.wasm.v1.MsgStoreCode")
proto.RegisterType((*MsgStoreCodeResponse)(nil), "cosmwasm.wasm.v1.MsgStoreCodeResponse")
@@ -1316,103 +1499,115 @@ func init() {
proto.RegisterType((*MsgUnpinCodesResponse)(nil), "cosmwasm.wasm.v1.MsgUnpinCodesResponse")
proto.RegisterType((*MsgStoreAndInstantiateContract)(nil), "cosmwasm.wasm.v1.MsgStoreAndInstantiateContract")
proto.RegisterType((*MsgStoreAndInstantiateContractResponse)(nil), "cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse")
+ proto.RegisterType((*MsgAddCodeUploadParamsAddresses)(nil), "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses")
+ proto.RegisterType((*MsgAddCodeUploadParamsAddressesResponse)(nil), "cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse")
+ proto.RegisterType((*MsgRemoveCodeUploadParamsAddresses)(nil), "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses")
+ proto.RegisterType((*MsgRemoveCodeUploadParamsAddressesResponse)(nil), "cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse")
}
func init() { proto.RegisterFile("cosmwasm/wasm/v1/tx.proto", fileDescriptor_4f74d82755520264) }
var fileDescriptor_4f74d82755520264 = []byte{
- // 1441 bytes of a gzipped FileDescriptorProto
+ // 1574 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcf, 0x6f, 0x1b, 0xc5,
- 0x17, 0xcf, 0xc6, 0xbf, 0x5f, 0xfc, 0x6d, 0xd3, 0xad, 0x9b, 0x6c, 0xb6, 0xad, 0x9d, 0x6e, 0x7f,
- 0xb9, 0xfd, 0xb6, 0x76, 0x63, 0xa0, 0x82, 0x70, 0x8a, 0x53, 0x24, 0x52, 0xc9, 0x10, 0x6d, 0xd4,
- 0x56, 0xa0, 0x4a, 0xd6, 0xda, 0x3b, 0xd9, 0xac, 0x9a, 0xdd, 0x35, 0x9e, 0x75, 0x93, 0x1c, 0xb8,
- 0x80, 0x84, 0x04, 0x27, 0xfe, 0x09, 0x24, 0xe0, 0x42, 0x0f, 0x20, 0x71, 0xec, 0xb1, 0x12, 0x97,
- 0x8a, 0x13, 0xa7, 0x00, 0x2e, 0x52, 0xb9, 0x21, 0x71, 0xe4, 0x84, 0x66, 0x66, 0x77, 0x3d, 0x5e,
- 0xef, 0x3a, 0x4e, 0x4a, 0xc5, 0x81, 0x4b, 0xb2, 0x33, 0xef, 0xc7, 0xbc, 0xcf, 0xe7, 0xbd, 0x99,
- 0x79, 0x63, 0x58, 0x68, 0x3b, 0xd8, 0xda, 0xd1, 0xb0, 0x55, 0xa5, 0x7f, 0x1e, 0x2e, 0x55, 0xd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x81,
+ 0xf1, 0x23, 0x40, 0x18, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1472,6 +1667,14 @@ type MsgClient interface {
//
// Since: 0.40
StoreAndInstantiateContract(ctx context.Context, in *MsgStoreAndInstantiateContract, opts ...grpc.CallOption) (*MsgStoreAndInstantiateContractResponse, error)
+ // RemoveCodeUploadParamsAddresses defines a governance operation for
+ // removing addresses from code upload params.
+ // The authority is defined in the keeper.
+ RemoveCodeUploadParamsAddresses(ctx context.Context, in *MsgRemoveCodeUploadParamsAddresses, opts ...grpc.CallOption) (*MsgRemoveCodeUploadParamsAddressesResponse, error)
+ // AddCodeUploadParamsAddresses defines a governance operation for
+ // adding addresses to code upload params.
+ // The authority is defined in the keeper.
+ AddCodeUploadParamsAddresses(ctx context.Context, in *MsgAddCodeUploadParamsAddresses, opts ...grpc.CallOption) (*MsgAddCodeUploadParamsAddressesResponse, error)
}
type msgClient struct {
@@ -1599,6 +1802,24 @@ func (c *msgClient) StoreAndInstantiateContract(ctx context.Context, in *MsgStor
return out, nil
}
+func (c *msgClient) RemoveCodeUploadParamsAddresses(ctx context.Context, in *MsgRemoveCodeUploadParamsAddresses, opts ...grpc.CallOption) (*MsgRemoveCodeUploadParamsAddressesResponse, error) {
+ out := new(MsgRemoveCodeUploadParamsAddressesResponse)
+ err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/RemoveCodeUploadParamsAddresses", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *msgClient) AddCodeUploadParamsAddresses(ctx context.Context, in *MsgAddCodeUploadParamsAddresses, opts ...grpc.CallOption) (*MsgAddCodeUploadParamsAddressesResponse, error) {
+ out := new(MsgAddCodeUploadParamsAddressesResponse)
+ err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/AddCodeUploadParamsAddresses", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// MsgServer is the server API for Msg service.
type MsgServer interface {
// StoreCode to submit Wasm code to the system
@@ -1644,6 +1865,14 @@ type MsgServer interface {
//
// Since: 0.40
StoreAndInstantiateContract(context.Context, *MsgStoreAndInstantiateContract) (*MsgStoreAndInstantiateContractResponse, error)
+ // RemoveCodeUploadParamsAddresses defines a governance operation for
+ // removing addresses from code upload params.
+ // The authority is defined in the keeper.
+ RemoveCodeUploadParamsAddresses(context.Context, *MsgRemoveCodeUploadParamsAddresses) (*MsgRemoveCodeUploadParamsAddressesResponse, error)
+ // AddCodeUploadParamsAddresses defines a governance operation for
+ // adding addresses to code upload params.
+ // The authority is defined in the keeper.
+ AddCodeUploadParamsAddresses(context.Context, *MsgAddCodeUploadParamsAddresses) (*MsgAddCodeUploadParamsAddressesResponse, error)
}
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
@@ -1701,6 +1930,14 @@ func (*UnimplementedMsgServer) StoreAndInstantiateContract(ctx context.Context,
return nil, status.Errorf(codes.Unimplemented, "method StoreAndInstantiateContract not implemented")
}
+func (*UnimplementedMsgServer) RemoveCodeUploadParamsAddresses(ctx context.Context, req *MsgRemoveCodeUploadParamsAddresses) (*MsgRemoveCodeUploadParamsAddressesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RemoveCodeUploadParamsAddresses not implemented")
+}
+
+func (*UnimplementedMsgServer) AddCodeUploadParamsAddresses(ctx context.Context, req *MsgAddCodeUploadParamsAddresses) (*MsgAddCodeUploadParamsAddressesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method AddCodeUploadParamsAddresses not implemented")
+}
+
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
}
@@ -1939,6 +2176,42 @@ func _Msg_StoreAndInstantiateContract_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
+func _Msg_RemoveCodeUploadParamsAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgRemoveCodeUploadParamsAddresses)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).RemoveCodeUploadParamsAddresses(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/cosmwasm.wasm.v1.Msg/RemoveCodeUploadParamsAddresses",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).RemoveCodeUploadParamsAddresses(ctx, req.(*MsgRemoveCodeUploadParamsAddresses))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Msg_AddCodeUploadParamsAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgAddCodeUploadParamsAddresses)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).AddCodeUploadParamsAddresses(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/cosmwasm.wasm.v1.Msg/AddCodeUploadParamsAddresses",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).AddCodeUploadParamsAddresses(ctx, req.(*MsgAddCodeUploadParamsAddresses))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "cosmwasm.wasm.v1.Msg",
HandlerType: (*MsgServer)(nil),
@@ -1995,6 +2268,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "StoreAndInstantiateContract",
Handler: _Msg_StoreAndInstantiateContract_Handler,
},
+ {
+ MethodName: "RemoveCodeUploadParamsAddresses",
+ Handler: _Msg_RemoveCodeUploadParamsAddresses_Handler,
+ },
+ {
+ MethodName: "AddCodeUploadParamsAddresses",
+ Handler: _Msg_AddCodeUploadParamsAddresses_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmwasm/wasm/v1/tx.proto",
@@ -3110,6 +3391,130 @@ func (m *MsgStoreAndInstantiateContractResponse) MarshalToSizedBuffer(dAtA []byt
return len(dAtA) - i, nil
}
+func (m *MsgAddCodeUploadParamsAddresses) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgAddCodeUploadParamsAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Addresses) > 0 {
+ for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Addresses[iNdEx])
+ copy(dAtA[i:], m.Addresses[iNdEx])
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Addresses[iNdEx])))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Authority) > 0 {
+ i -= len(m.Authority)
+ copy(dAtA[i:], m.Authority)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Addresses) > 0 {
+ for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Addresses[iNdEx])
+ copy(dAtA[i:], m.Addresses[iNdEx])
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Addresses[iNdEx])))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Authority) > 0 {
+ i -= len(m.Authority)
+ copy(dAtA[i:], m.Authority)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ return len(dAtA) - i, nil
+}
+
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
offset -= sovTx(v)
base := offset
@@ -3617,8 +4022,64 @@ func (m *MsgStoreAndInstantiateContractResponse) Size() (n int) {
return n
}
-func sovTx(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
+func (m *MsgAddCodeUploadParamsAddresses) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Authority)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if len(m.Addresses) > 0 {
+ for _, s := range m.Addresses {
+ l = len(s)
+ n += 1 + l + sovTx(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Authority)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if len(m.Addresses) > 0 {
+ for _, s := range m.Addresses {
+ l = len(s)
+ n += 1 + l + sovTx(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func sovTx(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
}
func sozTx(x uint64) (n int) {
@@ -7053,6 +7514,338 @@ func (m *MsgStoreAndInstantiateContractResponse) Unmarshal(dAtA []byte) error {
return nil
}
+func (m *MsgAddCodeUploadParamsAddresses) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgAddCodeUploadParamsAddresses: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgAddCodeUploadParamsAddresses: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Authority = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+
+func (m *MsgAddCodeUploadParamsAddressesResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgAddCodeUploadParamsAddressesResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgAddCodeUploadParamsAddressesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+
+func (m *MsgRemoveCodeUploadParamsAddresses) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgRemoveCodeUploadParamsAddresses: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgRemoveCodeUploadParamsAddresses: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Authority = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+
+func (m *MsgRemoveCodeUploadParamsAddressesResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgRemoveCodeUploadParamsAddressesResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgRemoveCodeUploadParamsAddressesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+
func skipTx(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/x/wasm/types/tx_test.go b/x/wasm/types/tx_test.go
index fd5cf5ba11..95bd3542ec 100644
--- a/x/wasm/types/tx_test.go
+++ b/x/wasm/types/tx_test.go
@@ -14,9 +14,7 @@ import (
const firstCodeID = 1
func TestStoreCodeValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, ContractAddrLen)).String()
sdk.GetConfig().SetAddressVerifier(VerifyAddressLen())
@@ -78,9 +76,7 @@ func TestStoreCodeValidation(t *testing.T) {
}
func TestInstantiateContractValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
sdk.GetConfig().SetAddressVerifier(VerifyAddressLen())
@@ -186,9 +182,7 @@ func TestInstantiateContractValidation(t *testing.T) {
}
func TestInstantiateContract2Validation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
sdk.GetConfig().SetAddressVerifier(VerifyAddressLen())
@@ -322,9 +316,7 @@ func TestInstantiateContract2Validation(t *testing.T) {
}
func TestExecuteContractValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
@@ -431,9 +423,7 @@ func TestExecuteContractValidation(t *testing.T) {
}
func TestMsgUpdateAdministrator(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
otherGoodAddress := sdk.AccAddress(bytes.Repeat([]byte{0x1}, 20)).String()
@@ -503,9 +493,7 @@ func TestMsgUpdateAdministrator(t *testing.T) {
}
func TestMsgClearAdministrator(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
anotherGoodAddress := sdk.AccAddress(bytes.Repeat([]byte{0x2}, 20)).String()
@@ -554,9 +542,7 @@ func TestMsgClearAdministrator(t *testing.T) {
}
func TestMsgMigrateContract(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
anotherGoodAddress := sdk.AccAddress(bytes.Repeat([]byte{0x2}, 20)).String()
@@ -680,9 +666,7 @@ func TestMsgJsonSignBytes(t *testing.T) {
}
func TestMsgUpdateInstantiateConfig(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
anotherGoodAddress := sdk.AccAddress(bytes.Repeat([]byte{0x2}, 20)).String()
@@ -742,9 +726,7 @@ func TestMsgUpdateInstantiateConfig(t *testing.T) {
}
func TestMsgUpdateParamsValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
@@ -784,10 +766,130 @@ func TestMsgUpdateParamsValidation(t *testing.T) {
}
}
+func TestMsgAddCodeUploadParamsAddressesValidation(t *testing.T) {
+ badAddress := "abcd"
+ // proper address size
+ goodAddress := sdk.AccAddress(make([]byte, 20)).String()
+
+ specs := map[string]struct {
+ src MsgAddCodeUploadParamsAddresses
+ expErr bool
+ }{
+ "all good": {
+ src: MsgAddCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ Addresses: []string{goodAddress},
+ },
+ },
+ "bad authority": {
+ src: MsgAddCodeUploadParamsAddresses{
+ Authority: badAddress,
+ Addresses: []string{goodAddress},
+ },
+ expErr: true,
+ },
+ "empty authority": {
+ src: MsgAddCodeUploadParamsAddresses{
+ Addresses: []string{goodAddress},
+ },
+ expErr: true,
+ },
+ "empty addresses": {
+ src: MsgAddCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ },
+ expErr: true,
+ },
+ "invalid addresses": {
+ src: MsgAddCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ Addresses: []string{badAddress},
+ },
+ expErr: true,
+ },
+ "duplicate addresses": {
+ src: MsgAddCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ Addresses: []string{goodAddress, goodAddress},
+ },
+ expErr: true,
+ },
+ }
+ for msg, spec := range specs {
+ t.Run(msg, func(t *testing.T) {
+ err := spec.src.ValidateBasic()
+ if spec.expErr {
+ require.Error(t, err)
+ return
+ }
+ require.NoError(t, err)
+ })
+ }
+}
+
+func TestMsgRemoveCodeUploadParamsAddressesValidation(t *testing.T) {
+ badAddress := "abcd"
+ // proper address size
+ goodAddress := sdk.AccAddress(make([]byte, 20)).String()
+
+ specs := map[string]struct {
+ src MsgRemoveCodeUploadParamsAddresses
+ expErr bool
+ }{
+ "all good": {
+ src: MsgRemoveCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ Addresses: []string{goodAddress},
+ },
+ },
+ "bad authority": {
+ src: MsgRemoveCodeUploadParamsAddresses{
+ Authority: badAddress,
+ Addresses: []string{goodAddress},
+ },
+ expErr: true,
+ },
+ "empty authority": {
+ src: MsgRemoveCodeUploadParamsAddresses{
+ Addresses: []string{goodAddress},
+ },
+ expErr: true,
+ },
+ "empty addresses": {
+ src: MsgRemoveCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ },
+ expErr: true,
+ },
+ "invalid addresses": {
+ src: MsgRemoveCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ Addresses: []string{badAddress},
+ },
+ expErr: true,
+ },
+ "duplicate addresses": {
+ src: MsgRemoveCodeUploadParamsAddresses{
+ Authority: goodAddress,
+ Addresses: []string{goodAddress, goodAddress},
+ },
+ expErr: true,
+ },
+ }
+ for msg, spec := range specs {
+ t.Run(msg, func(t *testing.T) {
+ err := spec.src.ValidateBasic()
+ if spec.expErr {
+ require.Error(t, err)
+ return
+ }
+ require.NoError(t, err)
+ })
+ }
+}
+
func TestMsgPinCodesValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
@@ -834,9 +936,7 @@ func TestMsgPinCodesValidation(t *testing.T) {
}
func TestMsgUnpinCodesValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
@@ -883,9 +983,7 @@ func TestMsgUnpinCodesValidation(t *testing.T) {
}
func TestMsgSudoContractValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
anotherGoodAddress := sdk.AccAddress(bytes.Repeat([]byte{0x2}, 20)).String()
@@ -960,9 +1058,7 @@ func TestMsgSudoContractValidation(t *testing.T) {
}
func TestMsgStoreAndInstantiateContractValidation(t *testing.T) {
- bad, err := sdk.AccAddressFromHexUnsafe("012345")
- require.NoError(t, err)
- badAddress := bad.String()
+ badAddress := "abcd"
// proper address size
goodAddress := sdk.AccAddress(make([]byte, 20)).String()
sdk.GetConfig().SetAddressVerifier(VerifyAddressLen())