Skip to content

Commit

Permalink
fix: fix bug where StoreCodeAndInstantiateContract, `UpdateContract…
Browse files Browse the repository at this point in the history
…Status`, `UpdateContractStatusProposal` API does not work (#393)

* fix: fix bug where `StoreCodeAndInstantiateContract` does not work

* chore: add the changes to CHANGELOG.md

* fix: fix bug where `UpdateContractStatus`, `UpdateContractStatusProposal` does not work
  • Loading branch information
zemyblue committed Dec 13, 2021
1 parent a58c60d commit 769fd24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* (x/feegrant) [\#383] (https://github.com/line/lbm-sdk/pull/383) Update allowance inside AllowedMsgAllowance
* (tm-db) [\#388] (https://github.com/line/lbm-sdk/pull/388) Bump up tm-db fixing invalid memory reference
* (swagger) [\#391] (https://github.com/line/lbm-sdk/pull/391) fix swagger's config path for wasm
* (x/wasm) [\#393] (https://github.com/line/lbm-sdk/pull/393) fix bug where `StoreCodeAndInstantiateContract`, `UpdateContractStatus`, `UpdateContractStatusProposal` API does not work

### Breaking Changes

Expand Down
6 changes: 6 additions & 0 deletions x/wasm/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import (
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgStoreCode{}, "wasm/MsgStoreCode", nil)
cdc.RegisterConcrete(&MsgInstantiateContract{}, "wasm/MsgInstantiateContract", nil)
cdc.RegisterConcrete(&MsgStoreCodeAndInstantiateContract{}, "wasm/StoreCodeAndInstantiateContract", nil)
cdc.RegisterConcrete(&MsgExecuteContract{}, "wasm/MsgExecuteContract", nil)
cdc.RegisterConcrete(&MsgMigrateContract{}, "wasm/MsgMigrateContract", nil)
cdc.RegisterConcrete(&MsgUpdateAdmin{}, "wasm/MsgUpdateAdmin", nil)
cdc.RegisterConcrete(&MsgClearAdmin{}, "wasm/MsgClearAdmin", nil)
cdc.RegisterConcrete(&MsgUpdateContractStatus{}, "wasm/MsgUpdateContractStatus", nil)
cdc.RegisterConcrete(&PinCodesProposal{}, "wasm/PinCodesProposal", nil)
cdc.RegisterConcrete(&UnpinCodesProposal{}, "wasm/UnpinCodesProposal", nil)

Expand All @@ -25,17 +27,20 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MigrateContractProposal{}, "wasm/MigrateContractProposal", nil)
cdc.RegisterConcrete(&UpdateAdminProposal{}, "wasm/UpdateAdminProposal", nil)
cdc.RegisterConcrete(&ClearAdminProposal{}, "wasm/ClearAdminProposal", nil)
cdc.RegisterConcrete(&UpdateContractStatusProposal{}, "wasm/UpdateContractStatusProposal", nil)
}

func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations(
(*sdk.Msg)(nil),
&MsgStoreCode{},
&MsgInstantiateContract{},
&MsgStoreCodeAndInstantiateContract{},
&MsgExecuteContract{},
&MsgMigrateContract{},
&MsgUpdateAdmin{},
&MsgClearAdmin{},
&MsgUpdateContractStatus{},
&MsgIBCCloseChannel{},
&MsgIBCSend{},
)
Expand All @@ -48,6 +53,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
&ClearAdminProposal{},
&PinCodesProposal{},
&UnpinCodesProposal{},
&UpdateContractStatusProposal{},
)

registry.RegisterInterface("ContractInfoExtension", (*ContractInfoExtension)(nil))
Expand Down

0 comments on commit 769fd24

Please sign in to comment.