Skip to content

Commit 3a20f9c

Browse files
authored
Merge pull request #898 from neutron-org/chore/wasmd-v0.54.x
Chore: wasmd bump to v0.54.x
2 parents 81e9fb1 + a1bc3f5 commit 3a20f9c

File tree

6 files changed

+261
-97
lines changed

6 files changed

+261
-97
lines changed

app/ante_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type HandlerOptions struct {
2727
AccountKeeper feemarketante.AccountKeeper
2828
IBCKeeper *ibckeeper.Keeper
2929
GlobalFeeKeeper globalfeekeeper.Keeper
30-
WasmConfig *wasmTypes.WasmConfig
30+
WasmConfig *wasmTypes.NodeConfig
3131
TXCounterStoreService corestoretypes.KVStoreService
3232
FeeMarketKeeper feemarketante.FeeMarketKeeper
3333
}

app/app.go

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -684,18 +684,11 @@ func New(
684684
dexModule := dex.NewAppModule(appCodec, app.DexKeeper, app.BankKeeper)
685685

686686
wasmDir := filepath.Join(homePath, "wasm")
687-
wasmConfig, err := wasm.ReadWasmConfig(appOpts)
687+
wasmConfig, err := wasm.ReadNodeConfig(appOpts)
688688
if err != nil {
689689
panic(fmt.Sprintf("error while reading wasm cfg: %s", err))
690690
}
691691

692-
// The last arguments can contain custom message handlers, and custom query handlers,
693-
// if we want to allow any custom callbacks
694-
// NOTE: we need staking feature here even if there is no staking module anymore because cosmwasm-std in the CosmWasm SDK requires this feature
695-
// NOTE: cosmwasm_1_2 feature enables GovMsg::VoteWeighted, which doesn't work with Neutron, because it uses its own custom governance,
696-
// however, cosmwasm_1_2 also enables WasmMsg::Instantiate2, which works as one could expect
697-
supportedFeatures := []string{"iterator", "stargate", "staking", "neutron", "cosmwasm_1_1", "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "cosmwasm_2_1"}
698-
699692
// register the proposal types
700693
adminRouterLegacy := govv1beta1.NewRouter()
701694
adminRouterLegacy.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
@@ -799,7 +792,10 @@ func New(
799792
app.GRPCQueryRouter(),
800793
wasmDir,
801794
wasmConfig,
802-
supportedFeatures,
795+
wasmtypes.VMConfig{},
796+
// NOTE: cosmwasm_1_2 feature enables GovMsg::VoteWeighted, which doesn't work with Neutron, because it uses its own custom governance,
797+
// however, cosmwasm_1_2 also enables WasmMsg::Instantiate2, which works as one could expect
798+
append(wasmkeeper.BuiltInCapabilities(), "neutron"),
803799
authtypes.NewModuleAddress(adminmoduletypes.ModuleName).String(),
804800
wasmOpts...,
805801
)
@@ -883,7 +879,7 @@ func New(
883879
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
884880
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry),
885881
upgrade.NewAppModule(&app.UpgradeKeeper, address.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix())),
886-
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
882+
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
887883
evidence.NewAppModule(app.EvidenceKeeper),
888884
ibc.NewAppModule(app.IBCKeeper),
889885
params.NewAppModule(app.ParamsKeeper),
@@ -1064,7 +1060,7 @@ func New(
10641060
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
10651061
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
10661062
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, nil, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry),
1067-
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
1063+
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
10681064
evidence.NewAppModule(app.EvidenceKeeper),
10691065
ibc.NewAppModule(app.IBCKeeper),
10701066
params.NewAppModule(app.ParamsKeeper),

docs/static/swagger.yaml

Lines changed: 168 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16335,6 +16335,43 @@ definitions:
1633516335
title: Address is the contract address
1633616336
type: string
1633716337
type: object
16338+
cosmwasm.wasm.v1.QueryCodeInfoResponse:
16339+
properties:
16340+
checksum:
16341+
format: byte
16342+
type: string
16343+
code_id:
16344+
format: uint64
16345+
type: string
16346+
creator:
16347+
type: string
16348+
instantiate_permission:
16349+
description: AccessConfig access control type.
16350+
properties:
16351+
addresses:
16352+
items:
16353+
type: string
16354+
type: array
16355+
permission:
16356+
default: ACCESS_TYPE_UNSPECIFIED
16357+
description: >-
16358+
- ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for
16359+
empty value
16360+
- ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden
16361+
- ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted
16362+
- ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses
16363+
enum:
16364+
- ACCESS_TYPE_UNSPECIFIED
16365+
- ACCESS_TYPE_NOBODY
16366+
- ACCESS_TYPE_EVERYBODY
16367+
- ACCESS_TYPE_ANY_OF_ADDRESSES
16368+
title: AccessType permission types
16369+
type: string
16370+
type: object
16371+
title: >-
16372+
QueryCodeInfoResponse is the response type for the Query/CodeInfo RPC
16373+
method
16374+
type: object
1633816375
cosmwasm.wasm.v1.QueryCodeResponse:
1633916376
properties:
1634016377
code_info:
@@ -16759,6 +16796,15 @@ definitions:
1675916796
QuerySmartContractStateResponse is the response type for the
1676016797
Query/SmartContractState RPC method
1676116798
type: object
16799+
cosmwasm.wasm.v1.QueryWasmLimitsConfigResponse:
16800+
description: |-
16801+
QueryWasmLimitsConfigResponse is the response type for the
16802+
Query/WasmLimitsConfig RPC method. It contains the JSON encoded limits for
16803+
static validation of Wasm files.
16804+
properties:
16805+
config:
16806+
type: string
16807+
type: object
1676216808
feemarket.feemarket.v1.GasPriceResponse:
1676316809
description: |-
1676416810
GasPriceResponse is the response type for the Query/GasPrice RPC method.
@@ -43034,6 +43080,80 @@ paths:
4303443080
summary: Codes gets the metadata for all stored wasm codes
4303543081
tags:
4303643082
- Query
43083+
/cosmwasm/wasm/v1/code-info/{code_id}:
43084+
get:
43085+
operationId: CodeInfo
43086+
parameters:
43087+
- format: uint64
43088+
in: path
43089+
name: code_id
43090+
required: true
43091+
type: string
43092+
responses:
43093+
'200':
43094+
description: A successful response.
43095+
schema:
43096+
properties:
43097+
checksum:
43098+
format: byte
43099+
type: string
43100+
code_id:
43101+
format: uint64
43102+
type: string
43103+
creator:
43104+
type: string
43105+
instantiate_permission:
43106+
description: AccessConfig access control type.
43107+
properties:
43108+
addresses:
43109+
items:
43110+
type: string
43111+
type: array
43112+
permission:
43113+
default: ACCESS_TYPE_UNSPECIFIED
43114+
description: >-
43115+
- ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified
43116+
placeholder for empty value
43117+
- ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden
43118+
- ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted
43119+
- ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses
43120+
enum:
43121+
- ACCESS_TYPE_UNSPECIFIED
43122+
- ACCESS_TYPE_NOBODY
43123+
- ACCESS_TYPE_EVERYBODY
43124+
- ACCESS_TYPE_ANY_OF_ADDRESSES
43125+
title: AccessType permission types
43126+
type: string
43127+
type: object
43128+
title: >-
43129+
QueryCodeInfoResponse is the response type for the Query/CodeInfo
43130+
RPC method
43131+
type: object
43132+
default:
43133+
description: An unexpected error response.
43134+
schema:
43135+
properties:
43136+
code:
43137+
format: int32
43138+
type: integer
43139+
details:
43140+
items:
43141+
properties:
43142+
type_url:
43143+
type: string
43144+
value:
43145+
format: byte
43146+
type: string
43147+
type: object
43148+
type: array
43149+
error:
43150+
type: string
43151+
message:
43152+
type: string
43153+
type: object
43154+
summary: CodeInfo gets the metadata for a single wasm code
43155+
tags:
43156+
- Query
4303743157
/cosmwasm/wasm/v1/code/{code_id}:
4303843158
get:
4303943159
operationId: Code
@@ -43112,7 +43232,7 @@ paths:
4311243232
message:
4311343233
type: string
4311443234
type: object
43115-
summary: Code gets the binary code and metadata for a singe wasm code
43235+
summary: Code gets the binary code and metadata for a single wasm code
4311643236
tags:
4311743237
- Query
4311843238
/cosmwasm/wasm/v1/code/{code_id}/contracts:
@@ -44171,6 +44291,53 @@ paths:
4417144291
summary: ContractsByCreator gets the contracts by creator
4417244292
tags:
4417344293
- Query
44294+
/cosmwasm/wasm/v1/wasm-limits-config:
44295+
get:
44296+
operationId: WasmLimitsConfig
44297+
responses:
44298+
'200':
44299+
description: A successful response.
44300+
schema:
44301+
description: >-
44302+
QueryWasmLimitsConfigResponse is the response type for the
44303+
44304+
Query/WasmLimitsConfig RPC method. It contains the JSON encoded
44305+
limits for
44306+
44307+
static validation of Wasm files.
44308+
properties:
44309+
config:
44310+
type: string
44311+
type: object
44312+
default:
44313+
description: An unexpected error response.
44314+
schema:
44315+
properties:
44316+
code:
44317+
format: int32
44318+
type: integer
44319+
details:
44320+
items:
44321+
properties:
44322+
type_url:
44323+
type: string
44324+
value:
44325+
format: byte
44326+
type: string
44327+
type: object
44328+
type: array
44329+
error:
44330+
type: string
44331+
message:
44332+
type: string
44333+
type: object
44334+
summary: >-
44335+
WasmLimitsConfig gets the configured limits for static validation of
44336+
Wasm
44337+
44338+
files, encoded in JSON.
44339+
tags:
44340+
- Query
4417444341
/feemarket/v1/gas_price/{denom}:
4417544342
get:
4417644343
operationId: GasPrice

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ require (
1616
cosmossdk.io/x/feegrant v0.1.1
1717
cosmossdk.io/x/tx v0.13.7
1818
cosmossdk.io/x/upgrade v0.1.4
19-
github.com/CosmWasm/wasmd v0.53.2
20-
github.com/CosmWasm/wasmvm/v2 v2.1.5
19+
github.com/CosmWasm/wasmd v0.54.0
20+
github.com/CosmWasm/wasmvm/v2 v2.2.3
2121
github.com/cometbft/cometbft v0.38.17
2222
github.com/cosmos/admin-module/v2 v2.0.0-20240430142959-8b3328d1b1a2
2323
github.com/cosmos/cosmos-db v1.1.1
@@ -93,7 +93,7 @@ require (
9393
github.com/cometbft/cometbft-db v0.15.0 // indirect
9494
github.com/cosmos/btcutil v1.0.5 // indirect
9595
github.com/cosmos/gogogateway v1.2.0 // indirect
96-
github.com/cosmos/iavl v1.2.2 // indirect
96+
github.com/cosmos/iavl v1.2.4 // indirect
9797
github.com/cosmos/interchain-security/v5 v5.2.0 // indirect
9898
github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect
9999
github.com/danieljoos/wincred v1.2.0 // indirect
@@ -225,7 +225,7 @@ require (
225225

226226
replace (
227227
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
228-
github.com/CosmWasm/wasmd => github.com/neutron-org/wasmd v0.53.2-neutron.0.20250122164643-8ab684b5eff6
228+
github.com/CosmWasm/wasmd => github.com/neutron-org/wasmd v0.54.0-rc0
229229
github.com/btcsuite/btcd/btcec/v2 => github.com/btcsuite/btcd/btcec/v2 v2.3.2
230230
github.com/cosmos/admin-module/v2 => github.com/neutron-org/admin-module/v2 v2.0.3
231231
github.com/cosmos/cosmos-sdk => github.com/neutron-org/cosmos-sdk v0.50.13-neutron

go.sum

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4=
212212
cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc=
213213
cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8=
214214
cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ=
215-
cosmossdk.io/x/nft v0.1.1 h1:pslAVS8P5NkW080+LWOamInjDcq+v2GSCo+BjN9sxZ8=
216-
cosmossdk.io/x/nft v0.1.1/go.mod h1:Kac6F6y2gsKvoxU+fy8uvxRTi4BIhLOor2zgCNQwVgY=
217215
cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI=
218216
cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w=
219217
cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38=
@@ -227,8 +225,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
227225
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
228226
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
229227
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
230-
github.com/CosmWasm/wasmvm/v2 v2.1.5 h1:cYI1Ook1IAA5DFA0IVvDQQboorNHZPAZ7emBBHFmXSQ=
231-
github.com/CosmWasm/wasmvm/v2 v2.1.5/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
228+
github.com/CosmWasm/wasmvm/v2 v2.2.3 h1:LVaAdkCMbgfUTSFOANmp2OOU1rIgz4iylow4SFD/lqs=
229+
github.com/CosmWasm/wasmvm/v2 v2.2.3/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
232230
github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4=
233231
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
234232
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
@@ -372,8 +370,6 @@ github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM=
372370
github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI=
373371
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.2.0 h1:rM+S14DFiqmu6Rc3PuhvWqwywPsnt/CbIslSnBftPFs=
374372
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.2.0/go.mod h1:O5H9Ic3Pe6cmJn1eqlj5N48sLb8WQ1VWmDP4/11g/4E=
375-
github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd h1:Lx+/5dZ/nN6qPXP2Ofog6u1fmlkCFA1ElcOconnofEM=
376-
github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd/go.mod h1:JWfpWVKJKiKtd53/KbRoKfxWl8FsT2GPcNezTOk0o5Q=
377373
github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI=
378374
github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E=
379375
github.com/cosmos/ibc-go/v8 v8.7.0 h1:HqhVOkO8bDpClXE81DFQgFjroQcTvtpm0tCS7SQVKVY=
@@ -846,8 +842,8 @@ github.com/neutron-org/cosmos-sdk v0.50.13-neutron h1:WpOT+IoQEHP9V7KVwi2ZaOwBap
846842
github.com/neutron-org/cosmos-sdk v0.50.13-neutron/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67FS1nnMrQIjO2daw=
847843
github.com/neutron-org/feemarket v0.0.0-20250127141246-4ffcf3d43464 h1:5mbzd7sqp8pPYWzIhIYKFovMRBL0ru24N2E6dIWjL0o=
848844
github.com/neutron-org/feemarket v0.0.0-20250127141246-4ffcf3d43464/go.mod h1:DUa6djUsTeMOrbrcIZqWSVxU9IZNCXp96ruaojyBNpc=
849-
github.com/neutron-org/wasmd v0.53.2-neutron.0.20250122164643-8ab684b5eff6 h1:AUYYxKenTOqIoajmOT1vnMKaTQevStZzzjaid+bwMUk=
850-
github.com/neutron-org/wasmd v0.53.2-neutron.0.20250122164643-8ab684b5eff6/go.mod h1:gP10E56tuToU5rsZR7vZLBL5ssW2mie6KN/WrQLG7/I=
845+
github.com/neutron-org/wasmd v0.54.0-rc0 h1:9nINrQoH15n0bygSNg+R/QUzC1dI31geaJcB9S2Aloo=
846+
github.com/neutron-org/wasmd v0.54.0-rc0/go.mod h1:8Zu/rj6RHbJ8Gx0WdqsGeHvgnEQb0rqchpqhgMxASRU=
851847
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
852848
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
853849
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=

0 commit comments

Comments
 (0)