Skip to content

Commit

Permalink
Merge branch 'main' into develop_sdk47_to_main
Browse files Browse the repository at this point in the history
* main: (36 commits)
  Add changelog for v0.31.0 (#1188)
  Upgrade to wasmvm 1.2.1 (#1245)
  Bump bufbuild/buf-setup-action from 1.15.0 to 1.15.1
  Make `CaptureIbcEvents` in ibctesting public.
  Fix client checksum verification (#1234)
  Test rust panic for regression
  Return IBC packet sequence number (#1225)
  Rename windows client binary
  Configure sonarcloud analysis
  Bump github.com/cosmos/gogoproto from 1.4.3 to 1.4.6
  Add Windows client support (#1197)
  Bump github.com/cosmos/cosmos-proto from 1.0.0-beta.1 to 1.0.0-beta.2
  Bump bufbuild/buf-setup-action from 1.14.0 to 1.15.0
  Bump SDK version to v0.45.14
  Bump bufbuild/buf-setup-action from 1.13.1 to 1.14.0 (#1200)
  Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#1211)
  test: add unit test
  fix: stargate querier does not reset the state
  list-contract-by-code bugfix
  update interface proto annotations (#1156)
  ...
  • Loading branch information
alpe committed Mar 14, 2023
2 parents 539c783 + bc0e817 commit 280dc4e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/local/start_node.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -eu

wasmd start --rpc.laddr tcp://0.0.0.0:26657 --log_level=info --trace # --trace # does not work anymore: --log_level="main:info,state:debug,*:error"
wasmd start --rpc.laddr tcp://0.0.0.0:26657 --log_level=info --trace #remove trace flag if you don't wantg the stack trace to be printed
2 changes: 2 additions & 0 deletions x/wasm/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func GetCmdLibVersion() *cobra.Command {
fmt.Println(version)
return nil
},
SilenceUsage: true,
}
return cmd
}
Expand Down Expand Up @@ -103,6 +104,7 @@ func GetCmdBuildAddress() *cobra.Command {
cmd.Println(keeper.BuildContractAddressPredictable(codeHash, creator, salt, msg).String())
return nil
},
SilenceUsage: true,
}
decoder.RegisterFlags(cmd.PersistentFlags(), "salt")
return cmd
Expand Down
5 changes: 5 additions & 0 deletions x/wasm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ func (m msgServer) UpdateInstantiateConfig(goCtx context.Context, msg *types.Msg
if err := m.keeper.SetAccessConfig(ctx, msg.CodeID, sdk.AccAddress(msg.Sender), *msg.NewInstantiatePermission); err != nil {
return nil, err
}
ctx.EventManager().EmitEvent(sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName),
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender),
))

return &types.MsgUpdateInstantiateConfigResponse{}, nil
}
10 changes: 10 additions & 0 deletions x/wasm/types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ func (msg MsgStoreCode) ValidateBasic() error {
if msg.InstantiatePermission.Permission == AccessTypeOnlyAddress {
return ErrInvalid.Wrap("unsupported type, use AccessTypeAnyOfAddresses instead")
}
// AccessTypeOnlyAddress is still considered valid as legacy instantiation permission
// but not for new contracts
if msg.InstantiatePermission.Permission == AccessTypeOnlyAddress {
return ErrInvalid.Wrap("unsupported type, use AccessTypeAnyOfAddresses instead")
}
}
return nil
}
Expand Down Expand Up @@ -431,6 +436,11 @@ func (msg MsgUpdateInstantiateConfig) ValidateBasic() error {
if msg.NewInstantiatePermission.Permission == AccessTypeOnlyAddress {
return ErrInvalid.Wrap("unsupported type, use AccessTypeAnyOfAddresses instead")
}
// AccessTypeOnlyAddress is still considered valid as legacy instantiation permission
// but not for new contracts
if msg.NewInstantiatePermission.Permission == AccessTypeOnlyAddress {
return ErrInvalid.Wrap("unsupported type, use AccessTypeAnyOfAddresses instead")
}

return nil
}
Expand Down

0 comments on commit 280dc4e

Please sign in to comment.