Skip to content

Commit e4e6ce8

Browse files
committed
add cosmwasm tests
1 parent 0d64dcc commit e4e6ce8

File tree

9 files changed

+336
-70
lines changed

9 files changed

+336
-70
lines changed

Dockerfile.static

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ RUN sha256sum /lib/libgo_owasm_muslc.x86_64.a | grep 52b43f1d1ee7f93eba2316b0dd0
1414
# Copy the library you want to the final location that will be found by the linker flag `-lgo_owasm_muslc`
1515
RUN cp /lib/libgo_owasm_muslc.x86_64.a /lib/libgo_owasm_muslc.a
1616

17+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.0.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
18+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.0.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
19+
#RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 860ba8d7ee4c89c1b0dc3abd4b3658d07ddf5531d2de970cada0699689cc1e33
20+
#RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 85de2ab3c40236935dbd023c9211130d49c5464494c4b9b09ea33e27a2d6bf87
21+
1722
# force it to use static lib (from above) not standard libgo_owasm.so file
1823
RUN LEDGER_ENABLED=true BUILD_TAGS=muslc LINK_STATICALLY=true make install \
1924
&& echo "Ensuring binary is statically linked ..." \

app/genesis.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
nftmodule "cosmossdk.io/x/nft/module"
1616
"cosmossdk.io/x/upgrade"
1717
upgradetypes "cosmossdk.io/x/upgrade/types"
18+
"github.com/CosmWasm/wasmd/x/wasm"
19+
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
1820
minttypes "github.com/ODIN-PROTOCOL/odin-core/x/mint/types"
1921
sdk "github.com/cosmos/cosmos-sdk/types"
2022
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
@@ -107,6 +109,6 @@ func NewDefaultGenesisState() GenesisState {
107109
oracletypes.ModuleName: cdc.MustMarshalJSON(oracleGenesis),
108110
nft.ModuleName: nftmodule.AppModuleBasic{}.DefaultGenesis(cdc),
109111
circuittypes.ModuleName: circuit.AppModuleBasic{}.DefaultGenesis(cdc),
110-
//wasmtypes.ModuleName: wasm.AppModuleBasic{}.DefaultGenesis(cdc),
112+
wasmtypes.ModuleName: wasm.AppModuleBasic{}.DefaultGenesis(cdc),
111113
}
112114
}

cmd/odind/cmd/root.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ func NewRootCmd() (rootCMD *cobra.Command, params params.EncodingConfig) {
6767
cmd.SetOut(cmd.OutOrStdout())
6868
cmd.SetErr(cmd.ErrOrStderr())
6969

70-
// If default keyring flag is not set, set it to file
71-
if !cmd.Flags().Changed(flags.FlagKeyringBackend) {
72-
cmd.Flags().Set(flags.FlagKeyringBackend, keyring.BackendFile)
73-
}
74-
// If default FlagKeyringDir is not set, set it to homedir
75-
if !cmd.Flags().Changed(flags.FlagKeyringDir) {
76-
cmd.Flags().Set(flags.FlagKeyringDir, app.DefaultNodeHome)
77-
}
78-
7970
initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags())
8071
if err != nil {
8172
return err

go.mod

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ require (
2222
cosmossdk.io/x/tx v0.13.3
2323
cosmossdk.io/x/upgrade v0.1.1
2424
github.com/CosmWasm/wasmd v0.51.0
25+
github.com/CosmWasm/wasmvm/v2 v2.0.1
2526
github.com/bytecodealliance/wasmtime-go/v20 v20.0.0
2627
github.com/cometbft/cometbft v0.38.7
2728
github.com/cosmos/cosmos-db v1.0.2
@@ -34,7 +35,7 @@ require (
3435
github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.1.1-0.20240522213455-a80c693d2262
3536
github.com/cosmos/ibc-go/v8 v8.3.1
3637
github.com/cosmos/ics23/go v0.10.0
37-
github.com/ethereum/go-ethereum v1.13.14
38+
github.com/ethereum/go-ethereum v1.14.0
3839
github.com/gin-gonic/gin v1.10.0
3940
github.com/golang/protobuf v1.5.4
4041
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
@@ -50,7 +51,7 @@ require (
5051
github.com/spf13/cast v1.6.0
5152
github.com/spf13/cobra v1.8.0
5253
github.com/spf13/viper v1.19.0
53-
github.com/strangelove-ventures/interchaintest/v8 v8.2.0
54+
github.com/strangelove-ventures/interchaintest/v8 v8.4.0
5455
github.com/stretchr/testify v1.9.0
5556
go.uber.org/mock v0.4.0
5657
go.uber.org/zap v1.27.0
@@ -74,7 +75,6 @@ require (
7475
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
7576
github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 // indirect
7677
github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 // indirect
77-
github.com/CosmWasm/wasmvm/v2 v2.0.1 // indirect
7878
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
7979
github.com/DataDog/zstd v1.5.5 // indirect
8080
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect
@@ -105,6 +105,7 @@ require (
105105
github.com/cosmos/btcutil v1.0.5 // indirect
106106
github.com/cosmos/gogogateway v1.2.0 // indirect
107107
github.com/cosmos/iavl v1.1.2 // indirect
108+
github.com/cosmos/interchain-security/v5 v5.0.0-alpha1.0.20240424193412-7cd900ad2a74 // indirect
108109
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
109110
github.com/creachadair/atomicfile v0.3.1 // indirect
110111
github.com/creachadair/tomledit v0.0.24 // indirect
@@ -120,7 +121,7 @@ require (
120121
github.com/dgraph-io/ristretto v0.1.1 // indirect
121122
github.com/distribution/reference v0.5.0 // indirect
122123
github.com/docker/distribution v2.8.2+incompatible // indirect
123-
github.com/docker/docker v24.0.7+incompatible // indirect
124+
github.com/docker/docker v24.0.9+incompatible // indirect
124125
github.com/docker/go-connections v0.5.0 // indirect
125126
github.com/docker/go-units v0.5.0 // indirect
126127
github.com/dustin/go-humanize v1.0.1 // indirect
@@ -165,7 +166,7 @@ require (
165166
github.com/gtank/merlin v0.1.1 // indirect
166167
github.com/gtank/ristretto255 v0.1.2 // indirect
167168
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
168-
github.com/hashicorp/go-getter v1.7.3 // indirect
169+
github.com/hashicorp/go-getter v1.7.4 // indirect
169170
github.com/hashicorp/go-hclog v1.5.0 // indirect
170171
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
171172
github.com/hashicorp/go-metrics v0.5.3 // indirect
@@ -187,7 +188,6 @@ require (
187188
github.com/jmespath/go-jmespath v0.4.0 // indirect
188189
github.com/jmhodges/levigo v1.0.0 // indirect
189190
github.com/json-iterator/go v1.1.12 // indirect
190-
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
191191
github.com/klauspost/compress v1.17.7 // indirect
192192
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
193193
github.com/kr/pretty v0.3.1 // indirect
@@ -219,6 +219,7 @@ require (
219219
github.com/multiformats/go-multicodec v0.9.0 // indirect
220220
github.com/multiformats/go-multihash v0.2.3 // indirect
221221
github.com/multiformats/go-varint v0.0.7 // indirect
222+
github.com/ncruces/go-strftime v0.1.9 // indirect
222223
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
223224
github.com/oklog/run v1.1.0 // indirect
224225
github.com/opencontainers/go-digest v1.0.0 // indirect
@@ -285,16 +286,13 @@ require (
285286
gopkg.in/yaml.v3 v3.0.1 // indirect
286287
gotest.tools/v3 v3.5.1 // indirect
287288
lukechampine.com/blake3 v1.2.1 // indirect
288-
lukechampine.com/uint128 v1.2.0 // indirect
289-
modernc.org/cc/v3 v3.40.0 // indirect
290-
modernc.org/ccgo/v3 v3.16.13 // indirect
291-
modernc.org/libc v1.29.0 // indirect
289+
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
290+
modernc.org/libc v1.49.3 // indirect
292291
modernc.org/mathutil v1.6.0 // indirect
293-
modernc.org/memory v1.7.2 // indirect
294-
modernc.org/opt v0.1.3 // indirect
295-
modernc.org/sqlite v1.28.0 // indirect
296-
modernc.org/strutil v1.1.3 // indirect
297-
modernc.org/token v1.0.1 // indirect
292+
modernc.org/memory v1.8.0 // indirect
293+
modernc.org/sqlite v1.29.9 // indirect
294+
modernc.org/strutil v1.2.0 // indirect
295+
modernc.org/token v1.1.0 // indirect
298296
nhooyr.io/websocket v1.8.7 // indirect
299297
pgregory.net/rapid v1.1.0 // indirect
300298
)

0 commit comments

Comments
 (0)