From c049c4438ef7f77720ab0c39f3912856e2ff5b6b Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 25 Apr 2025 15:47:06 +0700 Subject: [PATCH 01/72] fix: upgrade dependencies --- go.mod | 200 ++++++++++++++------------- go.sum | 417 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 327 insertions(+), 290 deletions(-) diff --git a/go.mod b/go.mod index acf524d940..9330930f41 100644 --- a/go.mod +++ b/go.mod @@ -3,32 +3,31 @@ module github.com/NibiruChain/nibiru/v2 go 1.24 require ( - github.com/CosmWasm/wasmd v0.44.0 - github.com/CosmWasm/wasmvm v1.5.8 - github.com/NibiruChain/collections v0.5.0 + github.com/CosmWasm/wasmd v0.50.0 + github.com/CosmWasm/wasmvm/v2 v2.1.0 + github.com/NibiruChain/collections v0.50.0 // Consenus Engine - github.com/cometbft/cometbft v0.37.5 - github.com/cometbft/cometbft-db v0.11.0 + github.com/cometbft/cometbft v0.38.15 + github.com/cometbft/cometbft-db v0.14.1 // Cosmos-SDK and IBC github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.47.11 - github.com/cosmos/ibc-go/v7 v7.4.0 + github.com/cosmos/cosmos-sdk v0.50.11 + github.com/cosmos/ibc-go/v8 v8.4.0 github.com/ethereum/go-ethereum v1.14.13 ) require ( - cosmossdk.io/api v0.7.0 + cosmossdk.io/api v0.7.6 cosmossdk.io/errors v1.0.1 - cosmossdk.io/math v1.4.0 + cosmossdk.io/math v1.5.0 cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/armon/go-metrics v0.4.1 github.com/btcsuite/btcd v0.24.2 - github.com/btcsuite/btcd/btcutil v1.1.5 + github.com/btcsuite/btcd/btcutil v1.1.6 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/gogoproto v1.7.0 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 @@ -38,66 +37,76 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/holiman/uint256 v1.3.1 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.20.5 github.com/rakyll/statik v0.1.7 - github.com/spf13/cast v1.6.0 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cast v1.7.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.18.2 - github.com/stretchr/testify v1.9.0 + github.com/spf13/viper v1.19.0 + github.com/stretchr/testify v1.10.0 github.com/tidwall/gjson v1.17.0 github.com/tidwall/sjson v1.2.5 github.com/tyler-smith/go-bip39 v1.1.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe - google.golang.org/grpc v1.62.1 - google.golang.org/protobuf v1.34.2 + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 + google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.36.1 gopkg.in/yaml.v2 v2.4.0 ) require ( cosmossdk.io/collections v0.4.0 - cosmossdk.io/core v0.10.0 - cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/core v0.11.0 + cosmossdk.io/depinject v1.1.0 + cosmossdk.io/log v1.4.1 + cosmossdk.io/store v1.1.1 cosmossdk.io/tools/rosetta v0.2.1 - github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.3.2-0.20240730185603-13c071f0b34d + cosmossdk.io/x/evidence v0.1.1 + cosmossdk.io/x/feegrant v0.1.1 + cosmossdk.io/x/upgrade v0.1.3 + github.com/CosmWasm/wasmvm v1.5.9 + github.com/cosmos/cosmos-db v1.1.0 + github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc - github.com/gorilla/websocket v1.5.0 - github.com/rs/cors v1.8.3 - github.com/rs/zerolog v1.32.0 + github.com/gorilla/websocket v1.5.3 + github.com/hashicorp/go-metrics v0.5.3 + github.com/rs/cors v1.11.1 + github.com/rs/zerolog v1.33.0 github.com/status-im/keycard-go v0.2.0 - golang.org/x/crypto v0.37.0 - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/net v0.39.0 - golang.org/x/text v0.24.0 + golang.org/x/crypto v0.36.0 + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 + golang.org/x/net v0.37.0 + golang.org/x/text v0.23.0 ) require ( - cloud.google.com/go v0.112.0 // indirect - cloud.google.com/go/compute v1.23.3 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.5 // indirect - cloud.google.com/go/storage v1.36.0 // indirect - cosmossdk.io/log v1.3.1 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.38.0 // indirect + cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect + cosmossdk.io/x/circuit v0.1.1 // indirect + cosmossdk.io/x/tx v0.13.7 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -105,41 +114,39 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect - github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.21.0-beta.1 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect + github.com/cosmos/iavl v1.2.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.2 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/gin-gonic/gin v1.9.1 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect @@ -149,71 +156,76 @@ require ( github.com/golang/glog v1.2.4 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/flatbuffers v2.0.8+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/gorilla/handlers v1.5.2 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/lib/pq v1.10.9 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect - github.com/minio/highwayhash v1.0.2 // indirect + github.com/minio/highwayhash v1.0.3 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.60.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sasha-s/go-deadlock v0.3.5 // indirect + github.com/shamaton/msgpack/v2 v2.2.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -222,7 +234,7 @@ require ( github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -232,27 +244,26 @@ require ( github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect - go.opentelemetry.io/otel v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.9.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sync v0.13.0 // indirect - golang.org/x/sys v0.32.0 // indirect - golang.org/x/term v0.31.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/term v0.30.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.155.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/api v0.171.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect @@ -260,11 +271,8 @@ require ( ) replace ( - cosmossdk.io/api => cosmossdk.io/api v0.3.1 - - github.com/CosmWasm/wasmd => github.com/NibiruChain/wasmd v0.44.0-nibiru - github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.47.11-nibiru.3 - github.com/cosmos/iavl => github.com/cosmos/iavl v0.20.0 + github.com/CosmWasm/wasmd => github.com/NibiruChain/wasmd v0.51.0-nibiru + github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac github.com/ethereum/go-ethereum => github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2 diff --git a/go.sum b/go.sum index 819320e906..2aab291572 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRY cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= -cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -175,13 +175,12 @@ cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63 cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= @@ -315,8 +314,8 @@ cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGE cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -535,8 +534,8 @@ cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeL cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= -cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= @@ -602,24 +601,40 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= -cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= +cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= +cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= -cosmossdk.io/core v0.10.0 h1:NP28Ol9YyRODmZLJg2ko/mUl40hMegeMzhJnG+XPkcY= -cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY= -cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= +cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= -cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= -cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= -cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc= +cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= +cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= +cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= +cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= +cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= +cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= +cosmossdk.io/x/nft v0.1.0 h1:VhcsFiEK33ODN27kxKLa0r/CeFd8laBfbDBwYqCyYCM= +cosmossdk.io/x/nft v0.1.0/go.mod h1:ec4j4QAO4mJZ+45jeYRnW7awLHby1JZANqe1hNZ4S3g= +cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= +cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +cosmossdk.io/x/upgrade v0.1.3 h1:q4XpXc6zp0dX6x74uBtfN6+J7ikaQev5Bla6Q0ADLK8= +cosmossdk.io/x/upgrade v0.1.3/go.mod h1:jOdQhnaY5B8CDUoUbed23/Lre0Dk+r6BMQE40iKlVVQ= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -642,19 +657,20 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0/go.mod h1: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/CosmWasm/wasmvm v1.5.8 h1:vrmAvDuXcNqw7XqDiVDIyopo9gNdkcvRLFTC8+wBb/A= -github.com/CosmWasm/wasmvm v1.5.8/go.mod h1:2qaMB5ISmYXtpkJR2jy8xxx5Ti8sntOEf1cUgolb4QI= +github.com/CosmWasm/wasmvm v1.5.9 h1:EMSIsG4eAhgIZ6SQQs+ZWFT0ONnUjbH9FSdeBUnItoQ= +github.com/CosmWasm/wasmvm v1.5.9/go.mod h1:2qaMB5ISmYXtpkJR2jy8xxx5Ti8sntOEf1cUgolb4QI= +github.com/CosmWasm/wasmvm/v2 v2.1.0 h1:bleLhNA36hM8iPjFJsNRi9RjrQW6MtXafw2+wVjAWAE= +github.com/CosmWasm/wasmvm/v2 v2.1.0/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= @@ -670,17 +686,16 @@ github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZ github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/NibiruChain/collections v0.5.0 h1:33pXpVTe1PK/tfdZlAJF1JF7AdzGNARG+iL9G/z3X7k= -github.com/NibiruChain/collections v0.5.0/go.mod h1:43L6yjuF0BMre/mw4gqn/kUOZz1c2Y3huZ/RQfBFrOQ= -github.com/NibiruChain/cosmos-sdk v0.47.11-nibiru.3 h1:MI3c8dJjWDYvhGlgKYexu8Gg9vuaYXFG40ulirlYbx0= -github.com/NibiruChain/cosmos-sdk v0.47.11-nibiru.3/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= +github.com/NibiruChain/collections v0.50.0 h1:zjwZ17G1f/0hoKUeoljIQval0HERF8NmojfQYKEOymw= +github.com/NibiruChain/collections v0.50.0/go.mod h1:u3NETehzjViSEZLmSjps0Akd8mWVfw3FXSh8lswf5PU= +github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac h1:n95nhILCcV9m5BbCxmaDPKXhD/CD298caLbCIshEIfo= +github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2 h1:ck5YAdn2Fklelh8JfLzU9VwXWXmitkbI0ixyoXcD1U8= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY= -github.com/NibiruChain/wasmd v0.44.0-nibiru h1:b+stNdbMFsl0+o4KedXyF83qRnEpB/jCiTGZZgv2h2U= -github.com/NibiruChain/wasmd v0.44.0-nibiru/go.mod h1:inrbdsixQ0Kdu4mFUg1u7fn3XPOEkzqieGv0H/gR0ck= +github.com/NibiruChain/wasmd v0.51.0-nibiru h1:qXaxYKiWAL67PR7Ug0vN5mD/S9qKJjg/38EHkSb3TPg= +github.com/NibiruChain/wasmd v0.51.0-nibiru/go.mod h1:ImLd+hxD1Pa1Z+8b0A5C9u9Qb8tmLJeiQHNGLscDPkw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -694,8 +709,8 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vcpkIuHowELi5C8e+1yUHtoLoOUR9QU5j7Tes= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= -github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= -github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= +github.com/adlio/schema v1.3.6/go.mod h1:qkxwLgPBd1FgLRHYVCmQT/rrBr3JH38J9LjmVzWNudg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= @@ -722,15 +737,13 @@ github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.18.45/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= @@ -746,6 +759,7 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSW github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -773,12 +787,13 @@ github.com/btcsuite/btcd v0.24.2/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQheh github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/btcutil v1.1.5 h1:+wER79R5670vs/ZusMTF1yTcRYE5GUsFbdjdisflzM8= github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= @@ -795,8 +810,8 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= @@ -811,7 +826,6 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -852,10 +866,10 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= @@ -877,12 +891,10 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcju github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= -github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= -github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= -github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= -github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= -github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/cometbft/cometbft v0.38.15 h1:5veFd8k1uXM27PBg9sMO3hAfRJ3vbh4OmmLf6cVrqXg= +github.com/cometbft/cometbft v0.38.15/go.mod h1:+wh6ap6xctVG+JOHwbl8pPKZ0GeqdPYqISu7F4b43cQ= +github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= +github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -903,42 +915,41 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= -github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDzI= +github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.3.2-0.20240730185603-13c071f0b34d h1:QJK/Zr0HblNx6z1x5LXIHEblY7DCCftMkUBcjpKe1qY= -github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.3.2-0.20240730185603-13c071f0b34d/go.mod h1:5oIHokzX6RJ6q93tLcWZ7Thkrt9vrMGIz3He9HFE660= -github.com/cosmos/ibc-go/v7 v7.4.0 h1:8FqYMptvksgMvlbN4UW9jFxTXzsPyfAzEZurujXac8M= -github.com/cosmos/ibc-go/v7 v7.4.0/go.mod h1:L/KaEhzV5TGUCTfGysVgMBQtl5Dm7hHitfpk+GIeoAo= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= -github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= +github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= +github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= +github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 h1:QjCi4bJoy9AXLL1e4jqi+4rHYN0gGZAQxf937cdWhw4= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72/go.mod h1:yiulzyQAZ+Ci802z/kVQqTA3lGiSJOmDpTq7kZxOUNE= +github.com/cosmos/ibc-go/v8 v8.4.0 h1:K2PfX0AZ+1XKZytHGEMuSjQXG/MZshPb83RSTQt2+cE= +github.com/cosmos/ibc-go/v8 v8.4.0/go.mod h1:zh6x1osR0hNvEcFrC/lhGD08sMfQmr9wHVvZ/mRWMCs= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= -github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= -github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -952,17 +963,19 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= +github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= @@ -973,13 +986,13 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -1001,6 +1014,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= +github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -1017,17 +1032,15 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 h1:8NfxH2iXvJ60YRB8ChToFTUzl8awsc3cJ8CbLjGIl/A= github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/ferranbt/fastssz v0.1.2/go.mod h1:X5UPrE2u1UJjxHA8X54u04SBwdAQjG2sFtWs39YxyWs= @@ -1074,8 +1087,8 @@ github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmn github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= @@ -1088,8 +1101,8 @@ github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -1211,8 +1224,9 @@ github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2 github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -1292,15 +1306,15 @@ github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqE github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -1311,14 +1325,15 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -1330,11 +1345,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0Q github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -1349,11 +1360,17 @@ github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= @@ -1362,22 +1379,27 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= @@ -1397,6 +1419,8 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/hydrogen18/memlistener v1.0.0/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -1418,8 +1442,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+ github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -1468,8 +1492,8 @@ github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= @@ -1500,10 +1524,8 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= @@ -1557,18 +1579,15 @@ github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGw github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/radix/v3 v3.8.1/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= -github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1605,6 +1624,8 @@ github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -1628,8 +1649,12 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -1671,8 +1696,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= +github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1691,13 +1716,12 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= @@ -1733,8 +1757,8 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1743,8 +1767,8 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1755,8 +1779,8 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1766,8 +1790,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/protolambda/bls12-381-util v0.1.0/go.mod h1:cdkysJTRpeFeuUVx/TXGDQNMTiRAalk1vQw3TYTHcE4= github.com/protolambda/messagediff v1.4.0/go.mod h1:LboJp0EwIbJsePYpzh5Op/9G1/4mIztMRYzzwR0dR2M= @@ -1791,14 +1815,14 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -1812,12 +1836,14 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shamaton/msgpack/v2 v2.2.0 h1:IP1m01pHwCrMa6ZccP9B3bqxEMKMSmMVAVKk54g3L/Y= +github.com/shamaton/msgpack/v2 v2.2.0/go.mod h1:6khjYnkx73f7VQU7wjcFS9DFjs+59naVWJv1TB7qdOI= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= @@ -1837,7 +1863,6 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= @@ -1846,14 +1871,14 @@ github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcD github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1861,8 +1886,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1889,8 +1914,9 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= @@ -1904,8 +1930,8 @@ github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOd github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1988,8 +2014,8 @@ github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1U go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -2003,35 +2029,37 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -2045,7 +2073,6 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -2075,8 +2102,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= @@ -2207,8 +2234,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= -golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= +golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2240,8 +2267,8 @@ golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2262,8 +2289,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2354,6 +2381,7 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2399,9 +2427,10 @@ golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2422,8 +2451,8 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= -golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= -golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2445,8 +2474,8 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= -golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2478,6 +2507,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2539,8 +2569,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= @@ -2609,8 +2640,8 @@ google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/ google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= -google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2619,8 +2650,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -2761,12 +2790,12 @@ google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -2816,8 +2845,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2838,8 +2867,9 @@ google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= +google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2876,7 +2906,6 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 1f31fd296153c6cbbc9d92e52c8b5b7939e95782 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 25 Apr 2025 15:48:25 +0700 Subject: [PATCH 02/72] fix app and upgrade dependencies --- app/ante.go | 2 +- app/ante/fixed_gas_test.go | 3 +- app/ante/gas.go | 20 +++-- app/ante/gas_wanted_test.go | 4 +- app/ante/handler_opts.go | 6 +- app/ante/testutil_test.go | 21 +++--- app/app.go | 85 ++++++++++------------ app/app_config.go | 24 ++---- app/evmante/evmante_gas_consume_test.go | 4 +- app/evmante/evmante_handler_test.go | 2 +- app/evmante/evmante_setup_ctx.go | 4 +- app/evmante/evmante_setup_ctx_test.go | 5 +- app/evmante/evmante_validate_basic.go | 10 +-- app/evmante/evmante_validate_basic_test.go | 10 ++- app/export.go | 51 +++++++++---- app/ibc_test.go | 4 +- app/keepers.go | 74 +++++++++---------- app/keepers/all_keepers.go | 7 +- app/server/config/server_config.go | 1 - app/server/start.go | 4 +- app/simapp/sim_test.go | 20 +++-- app/simapp/state_test.go | 4 +- app/upgrades.go | 3 +- app/upgrades/types.go | 6 +- app/upgrades/v1_0_1/constants.go | 11 +-- app/upgrades/v1_0_2/constants.go | 11 +-- app/upgrades/v1_0_3/constants.go | 11 +-- app/upgrades/v1_1_0/constants.go | 11 +-- app/upgrades/v1_2_0/constants.go | 11 +-- app/upgrades/v1_3_0/constants.go | 21 +++--- app/upgrades/v1_4_0/constants.go | 11 +-- app/upgrades/v1_5_0/constants.go | 11 +-- app/upgrades/v2_0_0/constants.go | 11 +-- app/upgrades/v2_1_0/constants.go | 11 ++- app/upgrades/v2_2_0/constants.go | 11 +-- app/upgrades/v2_3_0/constants.go | 11 +-- app/wasmext/stargate_query.go | 10 +-- app/wasmext/wasm.go | 29 +++++--- app/wasmext/wasmext_test.go | 10 +-- 39 files changed, 289 insertions(+), 276 deletions(-) diff --git a/app/ante.go b/app/ante.go index 79c2d5adfe..79e900de05 100644 --- a/app/ante.go +++ b/app/ante.go @@ -5,7 +5,7 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" sdk "github.com/cosmos/cosmos-sdk/types" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" diff --git a/app/ante/fixed_gas_test.go b/app/ante/fixed_gas_test.go index fda30ae017..bd2757939d 100644 --- a/app/ante/fixed_gas_test.go +++ b/app/ante/fixed_gas_test.go @@ -7,6 +7,7 @@ import ( sdkioerrors "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" + "cosmossdk.io/store" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -26,7 +27,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() { tests := []struct { name string messages []sdk.Msg - expectedGas sdk.Gas + expectedGas store.Gas expectedErr error }{ { diff --git a/app/ante/gas.go b/app/ante/gas.go index a82a1fbef6..3f28ca94d3 100644 --- a/app/ante/gas.go +++ b/app/ante/gas.go @@ -3,43 +3,41 @@ package ante import ( "fmt" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/store" ) type fixedGasMeter struct { - consumed sdk.Gas + consumed store.Gas } // NewFixedGasMeter returns a reference to a new fixedGasMeter. -func NewFixedGasMeter(fixedGas sdk.Gas) sdk.GasMeter { +func NewFixedGasMeter(fixedGas store.Gas) store.GasMeter { return &fixedGasMeter{ consumed: fixedGas, } } -func (g *fixedGasMeter) GasConsumed() sdk.Gas { +func (g *fixedGasMeter) GasConsumed() store.Gas { return g.consumed } -func (g *fixedGasMeter) GasConsumedToLimit() sdk.Gas { +func (g *fixedGasMeter) GasConsumedToLimit() store.Gas { return g.consumed } -func (g *fixedGasMeter) Limit() sdk.Gas { +func (g *fixedGasMeter) Limit() store.Gas { return g.consumed } -func (g *fixedGasMeter) GasRemaining() storetypes.Gas { +func (g *fixedGasMeter) GasRemaining() store.Gas { return g.consumed } // ConsumeGas is a no-op because the fixed gas meter stays fixed. -func (g *fixedGasMeter) ConsumeGas(sdk.Gas, string) {} +func (g *fixedGasMeter) ConsumeGas(store.Gas, string) {} // RefundGas is a no-op because the fixed gas meter stays fixed. -func (g *fixedGasMeter) RefundGas(sdk.Gas, string) {} +func (g *fixedGasMeter) RefundGas(store.Gas, string) {} func (g *fixedGasMeter) IsPastLimit() bool { return false diff --git a/app/ante/gas_wanted_test.go b/app/ante/gas_wanted_test.go index 92b5d13436..e377ee643b 100644 --- a/app/ante/gas_wanted_test.go +++ b/app/ante/gas_wanted_test.go @@ -26,7 +26,7 @@ func (s *AnteTestSuite) TestGasWantedDecorator() { { name: "happy: tx without gas, block gas limit 1000", ctxSetup: func(deps *evmtest.TestDeps) { - cp := &tmproto.ConsensusParams{ + cp := tmproto.ConsensusParams{ Block: &tmproto.BlockParams{MaxGas: 1000}, } deps.Ctx = deps.Ctx.WithConsensusParams(cp) @@ -63,7 +63,7 @@ func (s *AnteTestSuite) TestGasWantedDecorator() { ctxSetup: func(deps *evmtest.TestDeps) { cp := &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ - MaxGas: 500, + - MaxGas: 500, }, } deps.Ctx = deps.Ctx.WithConsensusParams(cp) diff --git a/app/ante/handler_opts.go b/app/ante/handler_opts.go index 2a6783fc9a..6ab1d1bc02 100644 --- a/app/ante/handler_opts.go +++ b/app/ante/handler_opts.go @@ -1,14 +1,14 @@ package ante import ( + "cosmossdk.io/core/store" sdkioerrors "cosmossdk.io/errors" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkante "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" devgasante "github.com/NibiruChain/nibiru/v2/x/devgas/v1/ante" devgaskeeper "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" @@ -23,7 +23,7 @@ type AnteHandlerOptions struct { EvmKeeper *evmkeeper.Keeper AccountKeeper authkeeper.AccountKeeper - TxCounterStoreKey types.StoreKey + TxCounterStoreKey store.KVStoreService WasmConfig *wasmtypes.WasmConfig MaxTxGasWanted uint64 } diff --git a/app/ante/testutil_test.go b/app/ante/testutil_test.go index bfd0de75a9..81dc79ebfe 100644 --- a/app/ante/testutil_test.go +++ b/app/ante/testutil_test.go @@ -1,14 +1,13 @@ package ante_test import ( + "context" "testing" - "time" "github.com/cosmos/cosmos-sdk/x/auth/ante" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -37,11 +36,7 @@ type AnteTestSuite struct { func (suite *AnteTestSuite) SetupTest() { suite.app, _ = testapp.NewNibiruTestApp(app.GenesisState{}) chainId := "test-chain-id" - ctx := suite.app.NewContext(true, tmproto.Header{ - Height: 1, - ChainID: chainId, - Time: time.Now().UTC(), - }) + ctx := suite.app.NewContext(true) suite.ctx = ctx // Set up TxConfig @@ -50,7 +45,7 @@ func (suite *AnteTestSuite) SetupTest() { WithChainID(chainId). WithLegacyAmino(suite.app.LegacyAmino()) - err := suite.app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) + err := suite.app.AccountKeeper.Params.Set(ctx, authtypes.DefaultParams()) suite.Require().NoError(err) params := suite.app.AccountKeeper.GetParams(ctx) suite.Require().NoError(params.Validate()) @@ -81,6 +76,8 @@ func (suite *AnteTestSuite) SetupTest() { // CreateTestTx is a helper function to create a tx given multiple inputs. func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { + defaultSignMode, err := xauthsigning.APISignModeToInternal(suite.clientCtx.TxConfig.SignModeHandler().DefaultMode()) + suite.Require().NoError(err) // First round: we gather all the signer infos. We use the "set empty // signature" hack to do that. var sigsV2 []signing.SignatureV2 @@ -88,7 +85,7 @@ func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums [] sigV2 := signing.SignatureV2{ PubKey: priv.PubKey(), Data: &signing.SingleSignatureData{ - SignMode: suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), + SignMode: defaultSignMode, Signature: nil, }, Sequence: accSeqs[i], @@ -99,7 +96,7 @@ func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums [] err := acc.SetAccountNumber(uint64(i) + 100) suite.Require().NoError(err) } - err := suite.txBuilder.SetSignatures(sigsV2...) + err = suite.txBuilder.SetSignatures(sigsV2...) if err != nil { return nil, err } @@ -113,7 +110,7 @@ func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums [] Sequence: accSeqs[i], } sigV2, err := tx.SignWithPrivKey( - suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), signerData, + context.TODO(), defaultSignMode, signerData, suite.txBuilder, priv, suite.clientCtx.TxConfig, accSeqs[i]) if err != nil { return nil, err diff --git a/app/app.go b/app/app.go index 0ae2c4519c..0fad8df81d 100644 --- a/app/app.go +++ b/app/app.go @@ -9,27 +9,28 @@ import ( "path/filepath" "cosmossdk.io/depinject" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/evidence" + feegrantmodule "cosmossdk.io/x/feegrant/module" + "cosmossdk.io/x/upgrade" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" cmtos "github.com/cometbft/cometbft/libs/os" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/client/grpc/node" - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/store/streaming" - storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" @@ -40,13 +41,9 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" distr "github.com/cosmos/cosmos-sdk/x/distribution" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -56,26 +53,25 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/slashing" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" + "github.com/cosmos/ibc-go/modules/capability" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm" ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" - ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v7/modules/core" - ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v7/testing" - "github.com/cosmos/ibc-go/v7/testing/types" + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" + ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" + ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v8/modules/core" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v8/testing" + "github.com/cosmos/ibc-go/v8/testing/types" "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus" "github.com/rakyll/statik/fs" @@ -128,10 +124,6 @@ var ( distr.AppModuleBasic{}, NewGovModuleBasic( paramsclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, ), params.AppModuleBasic{}, CrisisModule{}, @@ -327,10 +319,10 @@ func NewNibiruApp( ); err != nil { panic(err) } - app.App = appBuilder.Build(logger, db, traceStore, baseAppOptions...) + app.App = appBuilder.Build(db, traceStore, baseAppOptions...) // init non-depinject keys - app.keys = sdk.NewKVStoreKeys( + app.keys = storetypes.NewKVStoreKeys( // ibc keys ibctransfertypes.StoreKey, ibcfeetypes.StoreKey, @@ -386,9 +378,8 @@ func NewNibiruApp( cryptocodec.RegisterCrypto(app.legacyAmino) // load state streaming if enabled - if _, _, err := streaming.LoadStreamingServices(app.App.BaseApp, appOpts, app.appCodec, logger, app.kvStoreKeys()); err != nil { - logger.Error("failed to load state streaming", "err", err) - os.Exit(1) + if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { + panic(err) } /**** Module Options ****/ @@ -433,7 +424,7 @@ func NewNibiruApp( ExtensionOptionChecker: func(*codectypes.Any) bool { return true }, }, IBCKeeper: app.ibcKeeper, - TxCounterStoreKey: app.keys[wasmtypes.StoreKey], + TxCounterStoreKey: runtime.NewKVStoreService(app.keys[wasmtypes.StoreKey]), WasmConfig: &wasmConfig, DevGasKeeper: &app.DevGasKeeper, DevGasBankKeeper: app.BankKeeper, @@ -465,7 +456,7 @@ func NewNibiruApp( if loadLatest { // Initialize pinned codes in wasmvm as they are not persisted there - if err := ibcwasmkeeper.InitializePinnedCodes(app.BaseApp.NewUncachedContext(true, cmtproto.Header{}), app.appCodec); err != nil { + if err := ibcwasmkeeper.InitializePinnedCodes(app.BaseApp.NewUncachedContext(true, cmtproto.Header{})); err != nil { cmtos.Exit(fmt.Sprintf("failed to initialize pinned codes %s", err)) } } @@ -477,17 +468,17 @@ func NewNibiruApp( func (app *NibiruApp) Name() string { return app.BaseApp.Name() } // BeginBlocker application updates every begin block -func (app *NibiruApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.ModuleManager.BeginBlock(ctx, req) +func (app *NibiruApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { + return app.ModuleManager.BeginBlock(ctx) } // EndBlocker application updates every end block -func (app *NibiruApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.ModuleManager.EndBlock(ctx, req) +func (app *NibiruApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { + return app.ModuleManager.EndBlock(ctx) } // InitChainer application update at chain initialization -func (app *NibiruApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { +func (app *NibiruApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { var genesisState GenesisState if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) @@ -501,8 +492,8 @@ func (app *NibiruApp) LoadHeight(height int64) error { return app.LoadVersion(height) } -func (app *NibiruApp) RegisterNodeService(clientCtx client.Context) { - node.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +func (app *NibiruApp) RegisterNodeService(clientCtx client.Context, cfg config.Config) { + node.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg) } // ModuleAccountAddrs returns all the app's module account addresses. @@ -577,7 +568,7 @@ func (app *NibiruApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.API // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. - tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + cmtservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register legacy and grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -597,7 +588,7 @@ func (app *NibiruApp) RegisterTxService(clientCtx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *NibiruApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( + cmtservice.RegisterTendermintService( clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, diff --git a/app/app_config.go b/app/app_config.go index 43943af9c4..43cc0be009 100644 --- a/app/app_config.go +++ b/app/app_config.go @@ -6,7 +6,6 @@ import ( authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" authzmodulev1 "cosmossdk.io/api/cosmos/authz/module/v1" bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" - capabilitymodulev1 "cosmossdk.io/api/cosmos/capability/module/v1" consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" crisismodulev1 "cosmossdk.io/api/cosmos/crisis/module/v1" distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" @@ -22,29 +21,28 @@ import ( "cosmossdk.io/core/appconfig" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + evidencetypes "cosmossdk.io/x/evidence/types" + "cosmossdk.io/x/feegrant" + upgradetypes "cosmossdk.io/x/upgrade/types" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/params" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" evmmodulev1 "github.com/NibiruChain/nibiru/v2/api/eth/evm/module" epochsmodulev1 "github.com/NibiruChain/nibiru/v2/api/nibiru/epochs/module" @@ -240,12 +238,6 @@ func init() { Name: crisistypes.ModuleName, Config: appconfig.WrapAny(&crisismodulev1.Module{}), }, - { - Name: capabilitytypes.ModuleName, - Config: appconfig.WrapAny(&capabilitymodulev1.Module{ - SealKeeper: true, - }), - }, { Name: slashingtypes.ModuleName, Config: appconfig.WrapAny(&slashingmodulev1.Module{}), diff --git a/app/evmante/evmante_gas_consume_test.go b/app/evmante/evmante_gas_consume_test.go index dc36d7e657..181463667f 100644 --- a/app/evmante/evmante_gas_consume_test.go +++ b/app/evmante/evmante_gas_consume_test.go @@ -3,7 +3,7 @@ package evmante_test import ( "math/big" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/nibiru/v2/app/evmante" "github.com/NibiruChain/nibiru/v2/eth" @@ -19,7 +19,7 @@ func (s *TestSuite) TestAnteDecEthGasConsume() { txSetup func(deps *evmtest.TestDeps) *evm.MsgEthereumTx wantErr string maxGasWanted uint64 - gasMeter sdk.GasMeter + gasMeter storetypes.GasMeter }{ { name: "happy: sender with funds", diff --git a/app/evmante/evmante_handler_test.go b/app/evmante/evmante_handler_test.go index 4b1591e0bf..af1427efd0 100644 --- a/app/evmante/evmante_handler_test.go +++ b/app/evmante/evmante_handler_test.go @@ -37,7 +37,7 @@ func (s *TestSuite) TestAnteHandlerEVM() { ctxSetup: func(deps *evmtest.TestDeps) { gasPrice := sdk.NewInt64Coin("unibi", 1) maxGasMicronibi := new(big.Int).Add(evmtest.GasLimitCreateContract(), big.NewInt(100)) - cp := &tmproto.ConsensusParams{ + cp := tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxGas: evm.NativeToWei(maxGasMicronibi).Int64(), }, diff --git a/app/evmante/evmante_setup_ctx.go b/app/evmante/evmante_setup_ctx.go index 10e9a57467..243dba863a 100644 --- a/app/evmante/evmante_setup_ctx.go +++ b/app/evmante/evmante_setup_ctx.go @@ -3,7 +3,7 @@ package evmante import ( sdkioerrors "cosmossdk.io/errors" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -37,7 +37,7 @@ func (esc EthSetupContextDecorator) AnteHandle( } // We need to setup an empty gas config so that the gas is consistent with Ethereum. - newCtx = ctx.WithGasMeter(sdk.NewInfiniteGasMeter()). + newCtx = ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()). WithKVGasConfig(storetypes.GasConfig{}). WithTransientKVGasConfig(storetypes.GasConfig{}) diff --git a/app/evmante/evmante_setup_ctx_test.go b/app/evmante/evmante_setup_ctx_test.go index a3b3e1b9b7..214c23a602 100644 --- a/app/evmante/evmante_setup_ctx_test.go +++ b/app/evmante/evmante_setup_ctx_test.go @@ -3,8 +3,7 @@ package evmante_test import ( "math" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/nibiru/v2/app/evmante" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" @@ -26,7 +25,7 @@ func (s *TestSuite) TestEthSetupContextDecorator() { // Check that ctx gas meter is set up to infinite ctxGasMeter := newCtx.GasMeter() - s.Require().Equal(sdk.Gas(math.MaxUint64), ctxGasMeter.GasRemaining()) + s.Require().Equal(storetypes.Gas(math.MaxUint64), ctxGasMeter.GasRemaining()) // Check that gas configs are reset to default defaultGasConfig := storetypes.GasConfig{} diff --git a/app/evmante/evmante_validate_basic.go b/app/evmante/evmante_validate_basic.go index 75662269d8..44d05755e6 100644 --- a/app/evmante/evmante_validate_basic.go +++ b/app/evmante/evmante_validate_basic.go @@ -2,8 +2,6 @@ package evmante import ( - "errors" - sdkioerrors "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -32,12 +30,6 @@ func (vbd EthValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu return next(ctx, tx, simulate) } - err := tx.ValidateBasic() - // ErrNoSignatures is fine with eth tx - if err != nil && !errors.Is(err, sdkerrors.ErrNoSignatures) { - return ctx, sdkioerrors.Wrap(err, "tx basic validation failed") - } - // For eth type cosmos tx, some fields should be verified as zero values, // since we will only verify the signature against the hash of the MsgEthereumTx.Data wrapperTx, ok := tx.(protoTxProvider) @@ -132,7 +124,7 @@ func (vbd EthValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu ) } - if !authInfo.Fee.Amount.IsEqual(txFee) { + if !authInfo.Fee.Amount.Equal(txFee) { return ctx, sdkioerrors.Wrapf( sdkerrors.ErrInvalidRequest, "invalid AuthInfo Fee Amount (%s != %s)", diff --git a/app/evmante/evmante_validate_basic_test.go b/app/evmante/evmante_validate_basic_test.go index 25807047f9..95e20888d9 100644 --- a/app/evmante/evmante_validate_basic_test.go +++ b/app/evmante/evmante_validate_basic_test.go @@ -3,9 +3,11 @@ package evmante_test import ( "math/big" + sdkmath "cosmossdk.io/math" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" + xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/common" @@ -43,7 +45,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { }, paramsSetup: func(deps *evmtest.TestDeps) evm.Params { return evm.Params{ - CreateFuntokenFee: sdk.NewInt(-1), + CreateFuntokenFee: sdkmath.NewInt(-1), } }, wantErr: "createFuntokenFee cannot be negative: -1", @@ -112,16 +114,18 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { { name: "sad: eth tx with signatures should fail", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { + defaultSignMode, err := xauthsigning.APISignModeToInternal(deps.App.GetTxConfig().SignModeHandler().DefaultMode()) + s.Require().NoError(err) txBuilder := deps.App.GetTxConfig().NewTxBuilder() sigV2 := signing.SignatureV2{ PubKey: deps.Sender.PrivKey.PubKey(), Data: &signing.SingleSignatureData{ - SignMode: deps.App.GetTxConfig().SignModeHandler().DefaultMode(), + SignMode: defaultSignMode, Signature: nil, }, Sequence: 0, } - err := txBuilder.SetSignatures(sigV2) + err = txBuilder.SetSignatures(sigV2) s.Require().NoError(err) txMsg := evmtest.HappyCreateContractTx(deps) diff --git a/app/export.go b/app/export.go index 1af179d0f0..2b8da0aeb2 100644 --- a/app/export.go +++ b/app/export.go @@ -4,8 +4,7 @@ import ( "encoding/json" "log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - + storetypes "cosmossdk.io/store/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" @@ -19,7 +18,7 @@ func (app *NibiruApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContext(true) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. @@ -29,7 +28,10 @@ func (app *NibiruApp) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + genState, err := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + if err != nil { + return servertypes.ExportedApp{}, err + } appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -73,12 +75,19 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs // withdraw all validator commission app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, valBz) return false }) // withdraw all delegator rewards - dels := app.StakingKeeper.GetAllDelegations(ctx) + dels, err := app.StakingKeeper.GetAllDelegations(ctx) + if err != nil { + panic(err) + } for _, delegation := range dels { valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) if err != nil { @@ -104,13 +113,25 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs // reinitialize all validators app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) + scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) + if err != nil { + panic(err) + } + feePool, err := app.DistrKeeper.FeePool.Get(ctx) + if err != nil { + panic(err) + } feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) - - err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + err = app.DistrKeeper.FeePool.Set(ctx, feePool) + if err != nil { + panic(err) + } + err = app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valBz) if err != nil { panic(err) } @@ -163,13 +184,13 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. store := ctx.KVStore(app.kvStoreKeys()[stakingtypes.StoreKey]) - iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) + iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) counter := int16(0) for ; iter.Valid(); iter.Next() { addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) - validator, found := app.StakingKeeper.GetValidator(ctx, addr) - if !found { + validator, err := app.StakingKeeper.GetValidator(ctx, addr) + if err != nil { panic("expected validator, not found") } @@ -184,7 +205,7 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs iter.Close() - _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + _, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { log.Fatal(err) } diff --git a/app/ibc_test.go b/app/ibc_test.go index 3da3418693..fbf81d2068 100644 --- a/app/ibc_test.go +++ b/app/ibc_test.go @@ -6,8 +6,8 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibctesting "github.com/cosmos/ibc-go/v7/testing" + transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibctesting "github.com/cosmos/ibc-go/v8/testing" "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/v2/app" diff --git a/app/keepers.go b/app/keepers.go index 2778807876..b218401282 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -2,26 +2,24 @@ package app import ( "path/filepath" - "strings" - wasmdapp "github.com/CosmWasm/wasmd/app" + evidencekeeper "cosmossdk.io/x/evidence/keeper" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - wasmvm "github.com/CosmWasm/wasmvm" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" + wasmvm "github.com/CosmWasm/wasmvm/v2" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1beta1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/params" @@ -30,29 +28,27 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - icacontroller "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" - ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" - ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" + icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" + ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibcmock "github.com/cosmos/ibc-go/v8/testing/mock" "github.com/spf13/cast" "github.com/NibiruChain/nibiru/v2/app/keepers" @@ -150,6 +146,7 @@ func (app *NibiruApp) initNonDepinjectKeepers( app.StakingKeeper, app.upgradeKeeper, app.ScopedIBCKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // IBC Fee Module keeper @@ -157,7 +154,7 @@ func (app *NibiruApp) initNonDepinjectKeepers( app.appCodec, app.keys[ibcfeetypes.StoreKey], app.ibcKeeper.ChannelKeeper, // may be replaced with IBC middleware app.ibcKeeper.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, ) @@ -168,10 +165,11 @@ func (app *NibiruApp) initNonDepinjectKeepers( /* paramSubspace */ app.getSubspace(ibctransfertypes.ModuleName), /* ibctransfertypes.ICS4Wrapper */ app.ibcFeeKeeper, /* ibctransfertypes.ChannelKeeper */ app.ibcKeeper.ChannelKeeper, - /* ibctransfertypes.PortKeeper */ &app.ibcKeeper.PortKeeper, + /* ibctransfertypes.PortKeeper */ app.ibcKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, app.ScopedTransferKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.icaControllerKeeper = icacontrollerkeeper.NewKeeper( @@ -179,9 +177,10 @@ func (app *NibiruApp) initNonDepinjectKeepers( app.getSubspace(icacontrollertypes.SubModuleName), app.ibcFeeKeeper, app.ibcKeeper.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, app.ScopedICAControllerKeeper, app.MsgServiceRouter(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.icaHostKeeper = icahostkeeper.NewKeeper( @@ -190,10 +189,11 @@ func (app *NibiruApp) initNonDepinjectKeepers( app.getSubspace(icahosttypes.SubModuleName), app.ibcFeeKeeper, app.ibcKeeper.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, app.AccountKeeper, app.ScopedICAHostKeeper, app.MsgServiceRouter(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) wasmDir := filepath.Join(homePath, "data") @@ -210,10 +210,9 @@ func (app *NibiruApp) initNonDepinjectKeepers( // assigned. // For example, if there are bindings for the x/inflation module, then the app // passed to GetWasmOpts must already have a non-nil InflationKeeper. - supportedFeatures := strings.Join(wasmdapp.AllCapabilities(), ",") // Create wasm VM outside keeper so it can be re-used in client keeper - wasmVM, err := wasmvm.NewVM(filepath.Join(wasmDir, "wasm"), supportedFeatures, wasmVmContractMemoryLimit, wasmConfig.ContractDebugMode, wasmConfig.MemoryCacheSize) + wasmVM, err := wasmvm.NewVM(filepath.Join(wasmDir, "wasm"), wasmkeeper.BuiltInCapabilities(), wasmVmContractMemoryLimit, wasmConfig.ContractDebugMode, wasmConfig.MemoryCacheSize) if err != nil { panic(err) } @@ -230,28 +229,28 @@ func (app *NibiruApp) initNonDepinjectKeepers( app.WasmMsgHandlerArgs = wmha app.WasmKeeper = wasmkeeper.NewKeeper( app.appCodec, - app.keys[wasmtypes.StoreKey], + runtime.NewKVStoreService(app.keys[wasmtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, distrkeeper.NewQuerier(app.DistrKeeper), wmha.Ics4Wrapper, // ISC4 Wrapper: fee IBC middleware wmha.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, wmha.CapabilityKeeper, wmha.PortSource, wmha.Router, app.GRPCQueryRouter(), wasmDir, wasmConfig, - supportedFeatures, + wasmkeeper.BuiltInCapabilities(), govModuleAddr, append(GetWasmOpts(*app, appOpts, wmha), wasmkeeper.WithWasmEngine(wasmVM))..., ) app.WasmClientKeeper = ibcwasmkeeper.NewKeeperWithVM( app.appCodec, - app.keys[ibcwasmtypes.StoreKey], + runtime.NewKVStoreService(app.keys[ibcwasmtypes.StoreKey]), app.ibcKeeper.ClientKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), wasmVM, @@ -342,7 +341,6 @@ func (app *NibiruApp) initNonDepinjectKeepers( govRouter. AddRoute(govtypes.RouterKey, govv1beta1types.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)) app.GovKeeper.SetLegacyRouter(govRouter) diff --git a/app/keepers/all_keepers.go b/app/keepers/all_keepers.go index 4f8446dc83..36c8447f06 100644 --- a/app/keepers/all_keepers.go +++ b/app/keepers/all_keepers.go @@ -1,21 +1,20 @@ package keepers import ( + feegrantkeeper "cosmossdk.io/x/feegrant/keeper" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" // --------------------------------------------------------------- // IBC imports - ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" + ibcmock "github.com/cosmos/ibc-go/v8/testing/mock" // --------------------------------------------------------------- // Nibiru Custom Modules diff --git a/app/server/config/server_config.go b/app/server/config/server_config.go index d9e21d07fa..d51df9205b 100644 --- a/app/server/config/server_config.go +++ b/app/server/config/server_config.go @@ -204,7 +204,6 @@ func DefaultConfig() *Config { defaultSDKConfig.API.Enable = DefaultAPIEnable defaultSDKConfig.GRPC.Enable = DefaultGRPCEnable defaultSDKConfig.GRPCWeb.Enable = DefaultGRPCWebEnable - defaultSDKConfig.Rosetta.Enable = DefaultRosettaEnable defaultSDKConfig.Telemetry.Enabled = DefaultTelemetryEnable return &Config{ diff --git a/app/server/start.go b/app/server/start.go index fd8e576629..8197618d78 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -27,7 +27,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - dbm "github.com/cometbft/cometbft-db" abciserver "github.com/cometbft/cometbft/abci/server" tcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" tmos "github.com/cometbft/cometbft/libs/os" @@ -36,6 +35,7 @@ import ( pvm "github.com/cometbft/cometbft/privval" "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/rpc/client/local" + dbm "github.com/cosmos/cosmos-db" "cosmossdk.io/tools/rosetta" crgserver "cosmossdk.io/tools/rosetta/lib/server" @@ -43,6 +43,7 @@ import ( ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" sdkioerrors "cosmossdk.io/errors" + pruningtypes "cosmossdk.io/store/pruning/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" sdkserver "github.com/cosmos/cosmos-sdk/server" @@ -50,7 +51,6 @@ import ( serverconfig "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" "github.com/cosmos/cosmos-sdk/server/types" - pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/app/simapp/sim_test.go b/app/simapp/sim_test.go index 17b8142393..9af70837df 100644 --- a/app/simapp/sim_test.go +++ b/app/simapp/sim_test.go @@ -9,24 +9,21 @@ import ( "strings" "testing" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + evidencetypes "cosmossdk.io/x/evidence/types" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" - storetypes "github.com/cosmos/cosmos-sdk/store/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -34,6 +31,7 @@ import ( simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/stretchr/testify/require" "github.com/NibiruChain/nibiru/v2/app" @@ -266,8 +264,8 @@ func TestAppImportExport(t *testing.T) { } }() - ctxA := oldApp.NewContext(true, tmproto.Header{Height: oldApp.LastBlockHeight()}) - ctxB := newApp.NewContext(true, tmproto.Header{Height: oldApp.LastBlockHeight()}) + ctxA := oldApp.NewContext(true) + ctxB := newApp.NewContext(true) newApp.ModuleManager.InitGenesis(ctxB, oldApp.AppCodec(), genesisState) newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) @@ -303,7 +301,7 @@ func TestAppImportExport(t *testing.T) { storeA := ctxA.KVStore(skp.A) storeB := ctxB.KVStore(skp.B) - failedKVAs, failedKVBs := sdk.DiffKVStores(storeA, storeB, skp.Prefixes) + failedKVAs, failedKVBs := simtestutil.DiffKVStores(storeA, storeB, skp.Prefixes) require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), skp.A, skp.B) @@ -387,7 +385,7 @@ func TestAppSimulationAfterImport(t *testing.T) { vesting.RegisterInterfaces(newApp.InterfaceRegistry()) require.Equal(t, "Nibiru", newApp.Name()) - newApp.InitChain(abci.RequestInitChain{ + newApp.InitChain(&abci.RequestInitChain{ ChainId: SimAppChainID, AppStateBytes: exported.AppState, }) diff --git a/app/simapp/state_test.go b/app/simapp/state_test.go index cfcbdc2909..fd62fcb11c 100644 --- a/app/simapp/state_test.go +++ b/app/simapp/state_test.go @@ -151,11 +151,11 @@ func AppStateRandomizedFn( // number of bonded accounts var initialStake, numInitiallyBonded int64 appParams.GetOrGenerate( - cdc, sims.StakePerAccount, &initialStake, r, + sims.StakePerAccount, &initialStake, r, func(r *rand.Rand) { initialStake = r.Int63n(1e12) }, ) appParams.GetOrGenerate( - cdc, sims.InitiallyBondedValidators, &numInitiallyBonded, r, + sims.InitiallyBondedValidators, &numInitiallyBonded, r, func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(300)) }, ) diff --git a/app/upgrades.go b/app/upgrades.go index b79274050e..cbe6c05a82 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -3,7 +3,7 @@ package app import ( "fmt" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" + upgradetypes "cosmossdk.io/x/upgrade/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" @@ -12,7 +12,6 @@ import ( govv1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/NibiruChain/nibiru/v2/app/upgrades" "github.com/NibiruChain/nibiru/v2/app/upgrades/v1_0_1" diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 2c0a58def3..a5226002e9 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -1,10 +1,10 @@ package upgrades import ( - store "github.com/cosmos/cosmos-sdk/store/types" + store "cosmossdk.io/store/types" + "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" ) type Upgrade struct { diff --git a/app/upgrades/v1_0_1/constants.go b/app/upgrades/v1_0_1/constants.go index 16ba7d6ff0..4907987d3d 100644 --- a/app/upgrades/v1_0_1/constants.go +++ b/app/upgrades/v1_0_1/constants.go @@ -1,11 +1,12 @@ package v1_0_1 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -16,7 +17,7 @@ const UpgradeName = "v1.0.1" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_0_2/constants.go b/app/upgrades/v1_0_2/constants.go index e277842419..74bbc525ac 100644 --- a/app/upgrades/v1_0_2/constants.go +++ b/app/upgrades/v1_0_2/constants.go @@ -1,11 +1,12 @@ package v1_0_2 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -16,7 +17,7 @@ const UpgradeName = "v1.0.2" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_0_3/constants.go b/app/upgrades/v1_0_3/constants.go index 96b2e96068..24b57248e1 100644 --- a/app/upgrades/v1_0_3/constants.go +++ b/app/upgrades/v1_0_3/constants.go @@ -1,11 +1,12 @@ package v1_0_3 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -16,7 +17,7 @@ const UpgradeName = "v1.0.3" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_1_0/constants.go b/app/upgrades/v1_1_0/constants.go index bd119eb7a6..15faee0687 100644 --- a/app/upgrades/v1_1_0/constants.go +++ b/app/upgrades/v1_1_0/constants.go @@ -1,11 +1,12 @@ package v1_1_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" @@ -16,7 +17,7 @@ const UpgradeName = "v1.1.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_2_0/constants.go b/app/upgrades/v1_2_0/constants.go index 0805d4b665..34fcd3fa1b 100644 --- a/app/upgrades/v1_2_0/constants.go +++ b/app/upgrades/v1_2_0/constants.go @@ -1,11 +1,12 @@ package v1_2_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -15,7 +16,7 @@ const UpgradeName = "v1.2.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_3_0/constants.go b/app/upgrades/v1_3_0/constants.go index 263817ac04..187f0edb2a 100644 --- a/app/upgrades/v1_3_0/constants.go +++ b/app/upgrades/v1_3_0/constants.go @@ -1,20 +1,22 @@ package v1_3_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -24,7 +26,8 @@ const UpgradeName = "v1.3.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(c context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(c) // set the ICS27 consensus version so InitGenesis is not run fromVM[icatypes.ModuleName] = mm.GetVersionMap()[icatypes.ModuleName] diff --git a/app/upgrades/v1_4_0/constants.go b/app/upgrades/v1_4_0/constants.go index 28d53df220..2d95e69a30 100644 --- a/app/upgrades/v1_4_0/constants.go +++ b/app/upgrades/v1_4_0/constants.go @@ -1,11 +1,12 @@ package v1_4_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -15,7 +16,7 @@ const UpgradeName = "v1.4.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_5_0/constants.go b/app/upgrades/v1_5_0/constants.go index fb15d68094..8a3e41db1b 100644 --- a/app/upgrades/v1_5_0/constants.go +++ b/app/upgrades/v1_5_0/constants.go @@ -1,11 +1,12 @@ package v1_5_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -15,7 +16,7 @@ const UpgradeName = "v1.5.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v2_0_0/constants.go b/app/upgrades/v2_0_0/constants.go index c5a2239483..030b6533eb 100644 --- a/app/upgrades/v2_0_0/constants.go +++ b/app/upgrades/v2_0_0/constants.go @@ -1,11 +1,12 @@ package v2_0_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" evmtypes "github.com/NibiruChain/nibiru/v2/x/evm" @@ -16,7 +17,7 @@ const UpgradeName = "v2.0.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v2_1_0/constants.go b/app/upgrades/v2_1_0/constants.go index f294c66a48..b77b7b1df2 100644 --- a/app/upgrades/v2_1_0/constants.go +++ b/app/upgrades/v2_1_0/constants.go @@ -1,12 +1,14 @@ package v2_1_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -16,7 +18,8 @@ const UpgradeName = "v2.1.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(c context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(c) // explicitly update the IBC 02-client params, adding the wasm client type if it is not there params := clientKeeper.GetParams(ctx) diff --git a/app/upgrades/v2_2_0/constants.go b/app/upgrades/v2_2_0/constants.go index ca0f7c0e5b..86d4d5cd1c 100644 --- a/app/upgrades/v2_2_0/constants.go +++ b/app/upgrades/v2_2_0/constants.go @@ -1,11 +1,12 @@ package v2_2_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -15,7 +16,7 @@ const UpgradeName = "v2.2.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v2_3_0/constants.go b/app/upgrades/v2_3_0/constants.go index 023bf8da3a..029c49d86a 100644 --- a/app/upgrades/v2_3_0/constants.go +++ b/app/upgrades/v2_3_0/constants.go @@ -1,11 +1,12 @@ package v2_3_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -15,7 +16,7 @@ const UpgradeName = "v2.3.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/wasmext/stargate_query.go b/app/wasmext/stargate_query.go index 2d90b6d580..6b472f8430 100644 --- a/app/wasmext/stargate_query.go +++ b/app/wasmext/stargate_query.go @@ -14,9 +14,9 @@ import ( bank "github.com/cosmos/cosmos-sdk/x/bank/types" gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" ) /* @@ -67,8 +67,8 @@ Given only the `PB_MSG.PACKAGE` and the `PB_MSG.NAME` of either the query request or response, we should know the `QueryRequest::Stargate.path` deterministically. */ -func WasmAcceptedStargateQueries() wasmkeeper.AcceptedStargateQueries { - return wasmkeeper.AcceptedStargateQueries{ +func WasmAcceptedStargateQueries() wasmkeeper.AcceptedQueries { + return wasmkeeper.AcceptedQueries{ // ibc "/ibc.core.client.v1.Query/ClientState": &ibcclienttypes.QueryClientStateResponse{}, "/ibc.core.client.v1.Query/ConsensusState": &ibcclienttypes.QueryConsensusStateResponse{}, diff --git a/app/wasmext/wasm.go b/app/wasmext/wasm.go index 0f6b9db5f9..38ecd05bdc 100644 --- a/app/wasmext/wasm.go +++ b/app/wasmext/wasm.go @@ -6,7 +6,7 @@ import ( sdkioerrors "cosmossdk.io/errors" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasm "github.com/CosmWasm/wasmd/x/wasm/types" - wasmvmtypes "github.com/CosmWasm/wasmvm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdkcodec "github.com/cosmos/cosmos-sdk/codec/types" @@ -38,13 +38,19 @@ func NibiruWasmOptions( } func (h SDKMessageHandler) handleSdkMessage(ctx sdk.Context, contractAddr sdk.Address, msg sdk.Msg) (*sdk.Result, error) { - if err := msg.ValidateBasic(); err != nil { - return nil, err + if m, ok := msg.(sdk.HasValidateBasic); ok { + if err := m.ValidateBasic(); err != nil { + return nil, err + } } // make sure this account can send it - for _, acct := range msg.GetSigners() { - if !acct.Equals(contractAddr) { + signers, _, err := h.cdc.GetMsgV1Signers(msg) + if err != nil { + return nil, err + } + for _, acct := range signers { + if !contractAddr.Equals(sdk.AccAddress(acct)) { return nil, sdkioerrors.Wrap(sdkerrors.ErrUnauthorized, "contract doesn't have permission") } } @@ -76,12 +82,14 @@ type MsgHandlerArgs struct { BankKeeper wasm.Burner Unpacker sdkcodec.AnyUnpacker PortSource wasm.ICS20TransferPortSource + Cdc codec.Codec } // SDKMessageHandler can handles messages that can be encoded into sdk.Message types and routed. type SDKMessageHandler struct { router MessageRouter encoders msgEncoder + cdc codec.Codec } // MessageRouter ADR 031 request type routing @@ -102,28 +110,29 @@ func WasmMessageHandler( ) wasmkeeper.Messenger { encoders := wasmkeeper.DefaultEncoders(args.Unpacker, args.PortSource) return wasmkeeper.NewMessageHandlerChain( - NewSDKMessageHandler(args.Router, encoders), + NewSDKMessageHandler(args.Cdc, args.Router, encoders), wasmkeeper.NewIBCRawPacketHandler(args.Ics4Wrapper, args.ChannelKeeper, args.CapabilityKeeper), wasmkeeper.NewBurnCoinMessageHandler(args.BankKeeper), ) } -func NewSDKMessageHandler(router MessageRouter, encoders msgEncoder) SDKMessageHandler { +func NewSDKMessageHandler(cdc codec.Codec, router MessageRouter, encoders msgEncoder) SDKMessageHandler { return SDKMessageHandler{ + cdc: cdc, router: router, encoders: encoders, } } -func (h SDKMessageHandler) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmvmtypes.CosmosMsg) (events []sdk.Event, data [][]byte, err error) { +func (h SDKMessageHandler) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmvmtypes.CosmosMsg) (events []sdk.Event, data [][]byte, msgResponses [][]*sdkcodec.Any, err error) { sdkMsgs, err := h.encoders.Encode(ctx, contractAddr, contractIBCPortID, msg) if err != nil { - return nil, nil, err + return nil, nil, nil, err } for _, sdkMsg := range sdkMsgs { res, err := h.handleSdkMessage(ctx, contractAddr, sdkMsg) if err != nil { - return nil, nil, err + return nil, nil, nil, err } // append data data = append(data, res.Data) diff --git a/app/wasmext/wasmext_test.go b/app/wasmext/wasmext_test.go index 2587186bad..e273223177 100644 --- a/app/wasmext/wasmext_test.go +++ b/app/wasmext/wasmext_test.go @@ -4,7 +4,7 @@ import ( "math/big" "testing" - wasmvm "github.com/CosmWasm/wasmvm/types" + wasmvm "github.com/CosmWasm/wasmvm/v2/types" sdkcodec "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -60,12 +60,12 @@ func (s *Suite) TestEvmFilter() { s.Equal("/eth.evm.v1.MsgEthereumTx", sdk.MsgTypeURL(sdkMsg)) s.T().Log("Dispatch the Eth tx msg from Wasm (unsuccessfully)") - _, _, err = wasmMsgHandler.DispatchMsg( + _, _, _, err = wasmMsgHandler.DispatchMsg( deps.Ctx, wasmContractAddr, "ibcport-unused", wasmvm.CosmosMsg{ - Stargate: &wasmvm.StargateMsg{ + Any: &wasmvm.AnyMsg{ TypeURL: sdk.MsgTypeURL(ethTxMsg), Value: protoValueBz, }, @@ -83,12 +83,12 @@ func (s *Suite) TestEvmFilter() { } protoValueBz, err = deps.App.AppCodec().Marshal(txMsg) s.NoError(err) - _, _, err = wasmMsgHandler.DispatchMsg( + _, _, _, err = wasmMsgHandler.DispatchMsg( deps.Ctx, wasmContractAddr, "ibcport-unused", wasmvm.CosmosMsg{ - Stargate: &wasmvm.StargateMsg{ + Any: &wasmvm.AnyMsg{ TypeURL: sdk.MsgTypeURL(txMsg), Value: protoValueBz, }, From 0f8bf6dd82266cf95ed34aa8f25634a79751a2bb Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 25 Apr 2025 15:50:02 +0700 Subject: [PATCH 03/72] fix tokenfactory module --- x/tokenfactory/keeper/keeper.go | 10 +- x/tokenfactory/keeper/store.go | 2 +- x/tokenfactory/keeper/wasm_test.go | 6 +- x/tokenfactory/module.go | 17 +- x/tokenfactory/module_test.go | 5 +- x/tokenfactory/simulation/genesis.go | 2 +- x/tokenfactory/types/codec.go | 6 - x/tokenfactory/types/expected_keepers.go | 37 +-- x/tokenfactory/types/tx_msgs_test.go | 366 ----------------------- 9 files changed, 41 insertions(+), 410 deletions(-) delete mode 100644 x/tokenfactory/types/tx_msgs_test.go diff --git a/x/tokenfactory/keeper/keeper.go b/x/tokenfactory/keeper/keeper.go index 40a3f42f23..003a17fd64 100644 --- a/x/tokenfactory/keeper/keeper.go +++ b/x/tokenfactory/keeper/keeper.go @@ -1,12 +1,13 @@ package keeper import ( + "context" "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/collections" @@ -78,6 +79,7 @@ func (k Keeper) GetAuthority() string { } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", tftypes.ModuleName)) +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", fmt.Sprintf("x/%s", tftypes.ModuleName)) } diff --git a/x/tokenfactory/keeper/store.go b/x/tokenfactory/keeper/store.go index 60e5a6eb11..063c5c7c1f 100644 --- a/x/tokenfactory/keeper/store.go +++ b/x/tokenfactory/keeper/store.go @@ -1,9 +1,9 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" sdkcodec "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" tftypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" diff --git a/x/tokenfactory/keeper/wasm_test.go b/x/tokenfactory/keeper/wasm_test.go index d9e8ef94db..b72bd2b0ac 100644 --- a/x/tokenfactory/keeper/wasm_test.go +++ b/x/tokenfactory/keeper/wasm_test.go @@ -14,7 +14,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - wasmvmtypes "github.com/CosmWasm/wasmvm/types" + wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types" codec "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" @@ -269,7 +269,7 @@ func (s *TestSuite) TestStargateSerde() { s.Run(tc.typeUrl, func() { pbMsg, _ := (tc.sdkMsg).(codec.ProtoMarshaler) sgMsgValue := s.encConfig.Codec.MustMarshal(pbMsg) - sgMsg := wasmvmtypes.StargateMsg{ + sgMsg := wasmvmtypes.AnyMsg{ TypeURL: tc.typeUrl, Value: sgMsgValue, } @@ -285,7 +285,7 @@ func (s *TestSuite) TestStargateSerde() { mockContractAddr := testutil.AccAddress() sdkMsgs, err := wasmEncoders.Encode(s.ctx, mockContractAddr, "mock-ibc-port", wasmvmtypes.CosmosMsg{ - Stargate: &sgMsg, + Any: &sgMsg, }, ) diff --git a/x/tokenfactory/module.go b/x/tokenfactory/module.go index cf96b51ae5..d7eb8580b3 100644 --- a/x/tokenfactory/module.go +++ b/x/tokenfactory/module.go @@ -16,12 +16,12 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + store "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdkcodec "github.com/cosmos/cosmos-sdk/codec" sdkcodectypes "github.com/cosmos/cosmos-sdk/codec/types" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -45,8 +45,9 @@ var ( _ module.AppModuleBasic = AppModuleBasic{} _ module.AppModule = AppModule{} _ module.AppModuleSimulation = AppModule{} - _ module.BeginBlockAppModule = AppModule{} - _ module.EndBlockAppModule = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} ) // ConsensusVersion defines the current module consensus version. @@ -167,23 +168,23 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // BeginBlock executes all ABCI BeginBlock logic respective to the fees module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ context.Context) error { + return nil } // EndBlock executes all ABCI EndBlock logic respective to the fee-share module. It // returns no validator updates. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(_ context.Context) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } // InitGenesis performs the fees module's genesis initialization. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc sdkcodec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc sdkcodec.JSONCodec, data json.RawMessage) { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.keeper.InitGenesis(ctx, genesisState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the fees module's exported genesis state as raw JSON bytes. @@ -198,7 +199,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // RegisterStoreDecoder implements module.AppModuleSimulation. -func (AppModule) RegisterStoreDecoder(sdk.StoreDecoderRegistry) { +func (AppModule) RegisterStoreDecoder(simtypes.StoreDecoderRegistry) { } // WeightedOperations implements module.AppModuleSimulation. diff --git a/x/tokenfactory/module_test.go b/x/tokenfactory/module_test.go index 45c2247f4f..8a924e89e3 100644 --- a/x/tokenfactory/module_test.go +++ b/x/tokenfactory/module_test.go @@ -3,7 +3,6 @@ package tokenfactory_test import ( "testing" - abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/v2/app" @@ -27,8 +26,8 @@ func (s *ModuleTestSuite) TestAppModule() { s.NotPanics(func() { s.T().Log("begin and end block") - appModule.BeginBlock(ctx, abci.RequestBeginBlock{}) - appModule.EndBlock(ctx, abci.RequestEndBlock{}) + appModule.BeginBlock(ctx) + appModule.EndBlock(ctx) s.T().Log("AppModule.ExportGenesis") cdc := bapp.AppCodec() diff --git a/x/tokenfactory/simulation/genesis.go b/x/tokenfactory/simulation/genesis.go index 389e25b5b8..8e297138cd 100644 --- a/x/tokenfactory/simulation/genesis.go +++ b/x/tokenfactory/simulation/genesis.go @@ -24,7 +24,7 @@ func GenDenomCreationGasConsume(r *rand.Rand) uint64 { func RandomizedGenState(simState *module.SimulationState) { var denomCreationGasConsume uint64 simState.AppParams.GetOrGenerate( - simState.Cdc, DenomCreationGasConsume, &denomCreationGasConsume, simState.Rand, + DenomCreationGasConsume, &denomCreationGasConsume, simState.Rand, func(r *rand.Rand) { denomCreationGasConsume = GenDenomCreationGasConsume(r) }, ) diff --git a/x/tokenfactory/types/codec.go b/x/tokenfactory/types/codec.go index 2b65cb92ec..b7c5a4f08c 100644 --- a/x/tokenfactory/types/codec.go +++ b/x/tokenfactory/types/codec.go @@ -5,7 +5,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" ) var ( @@ -18,11 +17,6 @@ func init() { RegisterLegacyAminoCodec(legacyAminoCdc) sdk.RegisterLegacyAminoCodec(legacyAminoCdc) - - // Register all Amino interfaces and concrete types on the authz Amino codec - // so that this can later be used to properly serialize MsgGrant and MsgExec - // instances. - RegisterLegacyAminoCodec(authzcodec.Amino) } // RegisterInterfaces register implementations diff --git a/x/tokenfactory/types/expected_keepers.go b/x/tokenfactory/types/expected_keepers.go index c25e9a4896..9de217b74b 100644 --- a/x/tokenfactory/types/expected_keepers.go +++ b/x/tokenfactory/types/expected_keepers.go @@ -1,46 +1,47 @@ package types import ( + context "context" + sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) type BankKeeper interface { // Methods imported from bank should be defined here - GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool) - SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata) + GetDenomMetaData(ctx context.Context, denom string) (banktypes.Metadata, bool) + SetDenomMetaData(ctx context.Context, denomMetaData banktypes.Metadata) - GetSupply(ctx sdk.Context, denom string) sdk.Coin - HasSupply(ctx sdk.Context, denom string) bool - IterateTotalSupply(ctx sdk.Context, cb func(sdk.Coin) bool) + GetSupply(ctx context.Context, denom string) sdk.Coin + HasSupply(ctx context.Context, denom string) bool + IterateTotalSupply(ctx context.Context, cb func(sdk.Coin) bool) SendCoinsFromModuleToAccount( - ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, + ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error SendCoinsFromAccountToModule( - ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, + ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error SendCoins( - ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins, + ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins, ) error - HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + HasBalance(ctx context.Context, addr sdk.AccAddress, amt sdk.Coin) bool + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin BlockedAddr(addr sdk.AccAddress) bool } type AccountKeeper interface { - SetModuleAccount(ctx sdk.Context, macc authtypes.ModuleAccountI) - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + SetModuleAccount(ctx context.Context, macc sdk.ModuleAccountI) + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI } // CommunityPoolKeeper defines the contract needed to be fulfilled for community pool interactions. type CommunityPoolKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } diff --git a/x/tokenfactory/types/tx_msgs_test.go b/x/tokenfactory/types/tx_msgs_test.go deleted file mode 100644 index 7920256275..0000000000 --- a/x/tokenfactory/types/tx_msgs_test.go +++ /dev/null @@ -1,366 +0,0 @@ -package types_test - -import ( - fmt "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - - sdkmath "cosmossdk.io/math" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/NibiruChain/nibiru/v2/x/common/testutil" - "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" -) - -type ValidateBasicTest struct { - name string - msg sdk.Msg - wantErr string -} - -func (vbt ValidateBasicTest) test() func(t *testing.T) { - var msg sdk.Msg = vbt.msg - var wantErr string = vbt.wantErr - return func(t *testing.T) { - err := msg.ValidateBasic() - if wantErr != "" { - assert.Error(t, err) - require.ErrorContains(t, err, wantErr) - } else { - require.NoError(t, err) - } - } -} - -// TestMsgCreateDenom_ValidateBasic: Tests if MsgCreateDenom is properly validated. -func TestMsgCreateDenom_ValidateBasic(t *testing.T) { - addr := testutil.AccAddress().String() - for _, tc := range []ValidateBasicTest{ - { - name: "happy", - msg: &types.MsgCreateDenom{ - Sender: addr, - Subdenom: "subdenom", - }, - wantErr: "", - }, - { - name: "sad subdenom", - msg: &types.MsgCreateDenom{ - Sender: addr, - Subdenom: "", - }, - wantErr: "empty subdenom", - }, - { - name: "sad creator", - msg: &types.MsgCreateDenom{ - Sender: "creator", - Subdenom: "subdenom", - }, - wantErr: "invalid creator", - }, - } { - t.Run(tc.name, tc.test()) - } -} - -// TestMsgChangeAdmin_ValidateBasic: Tests if MsgChangeAdmin is properly validated. -func TestMsgChangeAdmin_ValidateBasic(t *testing.T) { - sbf := testutil.AccAddress().String() - validDenom := fmt.Sprintf("tf/%s/ftt", sbf) - for _, tc := range []ValidateBasicTest{ - { - name: "happy", - msg: &types.MsgChangeAdmin{ - Sender: sbf, - Denom: validDenom, - NewAdmin: testutil.AccAddress().String(), - }, - wantErr: "", - }, - { - name: "invalid sender", - msg: &types.MsgChangeAdmin{ - Sender: "sender", - Denom: validDenom, - NewAdmin: testutil.AccAddress().String(), - }, - wantErr: "invalid sender", - }, - { - name: "invalid new admin", - msg: &types.MsgChangeAdmin{ - Sender: sbf, - Denom: validDenom, - NewAdmin: "new-admin", - }, - wantErr: "invalid new admin", - }, - { - name: "invalid denom", - msg: &types.MsgChangeAdmin{ - Sender: sbf, - Denom: "tf/", - NewAdmin: testutil.AccAddress().String(), - }, - wantErr: "denom format error", - }, - } { - t.Run(tc.name, tc.test()) - } -} - -func TestMsgUpdateModuleParams_ValidateBasic(t *testing.T) { - for _, tc := range []ValidateBasicTest{ - { - name: "happy", - msg: &types.MsgUpdateModuleParams{ - Authority: testutil.AccAddress().String(), - Params: types.DefaultModuleParams(), - }, - wantErr: "", - }, - { - name: "sad authority", - msg: &types.MsgUpdateModuleParams{ - Authority: "authority", - Params: types.DefaultModuleParams(), - }, - wantErr: "invalid authority", - }, - } { - t.Run(tc.name, tc.test()) - } -} - -func TestTxMsgInterface(t *testing.T) { - creator := testutil.AccAddress().String() - subdenom := testutil.RandLetters(4) - denomStr := fmt.Sprintf("tf/%s/%s", creator, subdenom) - for _, msg := range []legacytx.LegacyMsg{ - &types.MsgCreateDenom{ - Sender: creator, - Subdenom: subdenom, - }, - &types.MsgChangeAdmin{ - Sender: creator, - Denom: denomStr, - NewAdmin: testutil.AccAddress().String(), - }, - } { - t.Run(msg.Type(), func(t *testing.T) { - require.NotPanics(t, func() { - _ = msg.GetSigners() - _ = msg.Route() - _ = msg.Type() - _ = msg.GetSignBytes() - }) - }) - } - - for _, msg := range []sdk.Msg{ - &types.MsgUpdateModuleParams{ - Authority: testutil.GovModuleAddr().String(), - Params: types.DefaultModuleParams(), - }, - &types.MsgMint{ - Sender: creator, - Coin: sdk.NewInt64Coin(denomStr, 420), - MintTo: "", - }, - &types.MsgBurn{ - Sender: creator, - Coin: sdk.NewInt64Coin(denomStr, 420), - BurnFrom: "", - }, - } { - require.NotPanics(t, func() { - _ = msg.GetSigners() - }) - } -} - -// TestMsgMint_ValidateBasic: Tests if tx msgs MsgMint and MsgBurn are properly -// validated. -func TestMsgMint_ValidateBasic(t *testing.T) { - sbf := testutil.AccAddress().String() - validDenom := fmt.Sprintf("tf/%s/ftt", sbf) - validCoin := sdk.NewInt64Coin(validDenom, 420) - for _, tc := range []ValidateBasicTest{ - { - name: "happy", - msg: &types.MsgMint{ - Sender: sbf, - Coin: validCoin, - MintTo: "", - }, - wantErr: "", - }, - { - name: "invalid sender", - msg: &types.MsgMint{ - Sender: "sender", - Coin: validCoin, - MintTo: "", - }, - wantErr: "invalid address", - }, - { - name: "invalid denom", - msg: &types.MsgMint{ - Sender: sbf, - Coin: sdk.Coin{Denom: "tf/", Amount: sdkmath.NewInt(420)}, - MintTo: "", - }, - wantErr: "denom format error", - }, - { - name: "invalid mint to addr", - msg: &types.MsgMint{ - Sender: sbf, - Coin: validCoin, - MintTo: "mintto", - }, - wantErr: "invalid mint_to", - }, - { - name: "invalid coin", - msg: &types.MsgMint{ - Sender: sbf, - Coin: sdk.Coin{Amount: sdkmath.NewInt(-420)}, - MintTo: "", - }, - wantErr: "invalid coin", - }, - } { - t.Run(tc.name, tc.test()) - } -} - -func TestMsgBurn_ValidateBasic(t *testing.T) { - sbf := testutil.AccAddress().String() - validDenom := fmt.Sprintf("tf/%s/ftt", sbf) - validCoin := sdk.NewInt64Coin(validDenom, 420) - for _, tc := range []ValidateBasicTest{ - { - name: "happy", - msg: &types.MsgBurn{ - Sender: sbf, - Coin: validCoin, - BurnFrom: "", - }, - wantErr: "", - }, - { - name: "invalid sender", - msg: &types.MsgBurn{ - Sender: "sender", - Coin: validCoin, - BurnFrom: "", - }, - wantErr: "invalid address", - }, - { - name: "invalid denom", - msg: &types.MsgBurn{ - Sender: sbf, - Coin: sdk.Coin{Denom: "tf/", Amount: sdkmath.NewInt(420)}, - BurnFrom: "", - }, - wantErr: "denom format error", - }, - { - name: "invalid burn from addr", - msg: &types.MsgBurn{ - Sender: sbf, - Coin: validCoin, - BurnFrom: "mintto", - }, - wantErr: "invalid burn_from", - }, - { - name: "invalid coin", - msg: &types.MsgBurn{ - Sender: sbf, - Coin: sdk.Coin{Amount: sdkmath.NewInt(-420)}, - BurnFrom: "", - }, - wantErr: "invalid coin", - }, - } { - t.Run(tc.name, tc.test()) - } -} - -func TestMsgSetDenomMetadata_ValidateBasic(t *testing.T) { - sbf := testutil.AccAddress().String() - satoshi := testutil.AccAddress().String() - ubtcDenom := fmt.Sprintf("tf/%s/ubtc", satoshi) - for _, tc := range []ValidateBasicTest{ - { - name: "happy: satoshi nakamoto", - msg: &types.MsgSetDenomMetadata{ - Sender: satoshi, - Metadata: banktypes.Metadata{ - Description: "satoshi nakamoto bitcoin", - DenomUnits: []*banktypes.DenomUnit{ - {Denom: ubtcDenom, Exponent: 0}, - {Denom: "btc", Exponent: 6}, - }, - Base: ubtcDenom, - Display: "btc", - Name: "bitcoin", - Symbol: "BTC", - }, - }, - wantErr: "", - }, - - { - name: "happy: SBF", - msg: &types.MsgSetDenomMetadata{ - Sender: sbf, - Metadata: types.DenomStr(fmt.Sprintf("tf/%s/ftt", sbf)). - MustToStruct().DefaultBankMetadata(), - }, - wantErr: "", - }, - - { - name: "invalid sender", - msg: &types.MsgSetDenomMetadata{ - Sender: "notAnAddr", - Metadata: types.TFDenom{Creator: "notAnAddr", Subdenom: "abc"}. - DefaultBankMetadata(), - }, - wantErr: "invalid address", - }, - - { - name: "sad: base denom doesn't match", - msg: &types.MsgSetDenomMetadata{ - Sender: satoshi, - Metadata: banktypes.Metadata{ - Description: "satoshi nakamoto bitcoin", - DenomUnits: []*banktypes.DenomUnit{ - {Denom: ubtcDenom, Exponent: 0}, - {Denom: "wbtc", Exponent: 6}, // must be first - }, - Base: "wbtc", - Display: "wbtc", - Name: "bitcoin", - Symbol: "BTC", - }, - }, - wantErr: "metadata's first denomination unit must be the one with base denom", - }, - } { - t.Run(tc.name, tc.test()) - } -} From b2b1d2158c270d878e9815330219980dd6c82bbf Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 25 Apr 2025 15:50:12 +0700 Subject: [PATCH 04/72] partially fix modules --- x/common/testutil/action/block.go | 24 ++----- x/common/testutil/assertion/balances.go | 2 +- x/common/testutil/client_ctx.go | 4 +- x/common/testutil/sample.go | 17 ++--- x/common/testutil/testapp/testapp.go | 16 ++--- x/common/testutil/testnetwork/network.go | 19 +++--- x/common/testutil/testnetwork/start_node.go | 8 ++- x/common/testutil/testnetwork/tx.go | 2 +- x/common/testutil/testnetwork/tx_test.go | 7 +- x/common/testutil/testnetwork/util.go | 6 +- x/devgas/v1/ante/expected_keepers.go | 6 +- x/devgas/v1/client/cli/cli_test.go | 4 +- x/devgas/v1/keeper/keeper.go | 4 +- x/devgas/v1/keeper/store.go | 2 +- x/devgas/v1/module.go | 15 +++-- x/devgas/v1/module_test.go | 6 +- x/devgas/v1/simulation/genesis.go | 2 +- x/devgas/v1/types/codec.go | 13 ---- x/devgas/v1/types/expected_keepers.go | 21 +++--- x/epochs/abci.go | 4 +- x/epochs/keeper/keeper.go | 2 +- x/epochs/module.go | 10 +-- x/evm/cli/cli_setup_test.go | 2 +- x/evm/deps.go | 28 ++++---- x/evm/evmmodule/module.go | 34 ++++++---- x/evm/evmtest/signer.go | 7 +- x/evm/evmtest/tx_test.go | 3 +- x/evm/keeper/bank_extension.go | 46 ++++++++----- x/evm/keeper/evm_state.go | 2 +- x/evm/keeper/funtoken_from_coin_test.go | 48 +++++++------- x/evm/keeper/funtoken_from_erc20_test.go | 36 ++++++----- x/evm/keeper/funtoken_state.go | 2 +- x/evm/keeper/grpc_query.go | 18 +++--- x/evm/keeper/grpc_query_test.go | 12 ++-- x/evm/keeper/hooks.go | 13 ++-- x/evm/keeper/keeper.go | 6 +- x/evm/keeper/msg_ethereum_tx_test.go | 9 ++- x/evm/keeper/vm_config.go | 8 ++- x/evm/msg.go | 12 +++- x/evm/params.go | 4 +- x/evm/precompile/funtoken.go | 3 - x/evm/precompile/funtoken_test.go | 11 ++-- x/evm/precompile/oracle_test.go | 3 +- x/evm/precompile/precompile.go | 6 +- x/evm/precompile/wasm.go | 3 +- x/evm/precompile/wasm_parse.go | 3 +- x/evm/precompile/wasm_test.go | 17 ++--- x/evm/statedb/journal.go | 2 +- x/evm/statedb/journal_test.go | 5 +- x/evm/statedb/statedb.go | 2 +- x/genmsg/genesis.go | 3 - x/genmsg/integration_test.go | 5 +- x/genmsg/module.go | 6 ++ x/inflation/client/cli/tx.go | 7 +- x/inflation/genesis.go | 1 - x/inflation/keeper/hooks.go | 2 +- x/inflation/keeper/hooks_test.go | 6 +- x/inflation/keeper/inflation_test.go | 4 +- x/inflation/keeper/keeper.go | 4 +- x/inflation/module.go | 10 +-- x/inflation/types/interfaces.go | 39 +++++------ x/oracle/cli/tx.go | 11 ++-- x/oracle/keeper/ballot.go | 7 +- x/oracle/keeper/ballot_test.go | 10 +-- x/oracle/keeper/keeper.go | 10 ++- x/oracle/keeper/keeper_test.go | 19 +++--- x/oracle/keeper/msg_server.go | 5 +- x/oracle/keeper/params_test.go | 21 +++--- x/oracle/keeper/reward.go | 6 +- x/oracle/keeper/reward_test.go | 3 +- x/oracle/keeper/slash.go | 10 ++- x/oracle/keeper/slash_test.go | 34 ++++++---- x/oracle/keeper/test_utils.go | 53 ++++++++------- x/oracle/keeper/update_exchange_rates.go | 23 +++++-- x/oracle/keeper/update_exchange_rates_test.go | 20 ++++-- x/oracle/module.go | 8 +-- x/oracle/simulation/genesis.go | 10 +-- x/oracle/simulation/operations.go | 32 +++++++--- x/oracle/types/ballot_test.go | 4 +- x/oracle/types/expected_keeper.go | 39 +++++------ x/oracle/types/msgs.go | 3 +- x/oracle/types/test_utils.go | 64 ++++++++++--------- x/sudo/keeper/keeper.go | 2 +- x/sudo/module.go | 8 +-- 84 files changed, 579 insertions(+), 449 deletions(-) diff --git a/x/common/testutil/action/block.go b/x/common/testutil/action/block.go index 9b82c7f7fe..e86eb5e1f9 100644 --- a/x/common/testutil/action/block.go +++ b/x/common/testutil/action/block.go @@ -3,7 +3,6 @@ package action import ( "time" - "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -15,7 +14,7 @@ type increaseBlockNumberBy struct { } func (i increaseBlockNumberBy) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlocker(ctx, types.RequestEndBlock{Height: ctx.BlockHeight()}) + app.EndBlocker(ctx) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + i.numBlocks) @@ -70,7 +69,7 @@ func SetBlockNumber(blockNumber int64) Action { type moveToNextBlock struct{} func (m moveToNextBlock) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlock(types.RequestEndBlock{}) + app.EndBlocker(ctx) app.Commit() newHeader := tmproto.Header{ @@ -78,13 +77,10 @@ func (m moveToNextBlock) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, e Time: ctx.BlockTime().Add(time.Second * 5), } - app.BeginBlock(types.RequestBeginBlock{ - Header: newHeader, - }) + app.BeginBlocker(ctx) return app.NewContext( false, - newHeader, ).WithBlockTime(newHeader.Time), nil } @@ -97,7 +93,7 @@ type moveToNextBlockWithDuration struct { } func (m moveToNextBlockWithDuration) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlock(types.RequestEndBlock{Height: ctx.BlockHeight()}) + app.EndBlocker(ctx) app.Commit() newHeader := tmproto.Header{ @@ -105,13 +101,10 @@ func (m moveToNextBlockWithDuration) Do(app *app.NibiruApp, ctx sdk.Context) (sd Time: ctx.BlockTime().Add(m.blockDuration), } - app.BeginBlock(types.RequestBeginBlock{ - Header: newHeader, - }) + app.BeginBlocker(ctx) return app.NewContext( false, - newHeader, ).WithBlockTime(newHeader.Time), nil } @@ -126,7 +119,7 @@ type moveToNextBlockWithTime struct { } func (m moveToNextBlockWithTime) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlock(types.RequestEndBlock{Height: ctx.BlockHeight()}) + app.EndBlocker(ctx) app.Commit() newHeader := tmproto.Header{ @@ -134,13 +127,10 @@ func (m moveToNextBlockWithTime) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Co Time: m.blockTime, } - app.BeginBlock(types.RequestBeginBlock{ - Header: newHeader, - }) + app.BeginBlocker(ctx) return app.NewContext( false, - newHeader, ).WithBlockTime(newHeader.Time), nil } diff --git a/x/common/testutil/assertion/balances.go b/x/common/testutil/assertion/balances.go index e98d78d712..291934cb95 100644 --- a/x/common/testutil/assertion/balances.go +++ b/x/common/testutil/assertion/balances.go @@ -23,7 +23,7 @@ type allBalancesEqual struct { func (b allBalancesEqual) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { coins := app.BankKeeper.GetAllBalances(ctx, b.Account) - if !coins.IsEqual(b.Amount) { + if !coins.Equal(b.Amount) { return ctx, fmt.Errorf( "account %s balance not equal, expected %s, got %s", b.Account.String(), diff --git a/x/common/testutil/client_ctx.go b/x/common/testutil/client_ctx.go index 76a88332ca..8536b9685b 100644 --- a/x/common/testutil/client_ctx.go +++ b/x/common/testutil/client_ctx.go @@ -6,7 +6,7 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/types/module" @@ -21,7 +21,7 @@ import ( func SetupClientCtx(t *testing.T) context.Context { home := t.TempDir() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) appCodec := moduletestutil.MakeTestEncodingConfig().Codec diff --git a/x/common/testutil/sample.go b/x/common/testutil/sample.go index fc23896f88..89159fe7ed 100644 --- a/x/common/testutil/sample.go +++ b/x/common/testutil/sample.go @@ -3,16 +3,17 @@ package testutil import ( "math/rand" - "github.com/cosmos/cosmos-sdk/store" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/log" + "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + dbm "github.com/cosmos/cosmos-db" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -53,10 +54,10 @@ func PrivKeyAddressPairs(n int) (keys []cryptotypes.PrivKey, addrs []sdk.AccAddr } func BlankContext(storeKeyName string) sdk.Context { - storeKey := sdk.NewKVStoreKey(storeKeyName) - db := tmdb.NewMemDB() - stateStore := store.NewCommitMultiStore(db) - stateStore.MountStoreWithDB(storeKey, types.StoreTypeIAVL, db) + storeKey := storetypes.NewKVStoreKey(storeKeyName) + db := dbm.NewMemDB() + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) + stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger()) return ctx } diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index 38e71195c4..24c97c9827 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -5,12 +5,12 @@ import ( "maps" "time" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" - tmdb "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -56,7 +56,7 @@ func NewContext(nibiru *app.NibiruApp) sdk.Context { Height: 1, Time: time.Now().UTC(), } - ctx := nibiru.NewContext(false, blockHeader) + ctx := nibiru.NewContext(false) // Make sure there's a block proposer on the context. blockHeader.ProposerAddress = FirstBlockProposer(nibiru, ctx) @@ -69,8 +69,8 @@ func FirstBlockProposer( chain *app.NibiruApp, ctx sdk.Context, ) (proposerAddr sdk.ConsAddress) { maxQueryCount := uint32(10) - valopers := chain.StakingKeeper.GetValidators(ctx, maxQueryCount) - valAddrBz := valopers[0].GetOperator().Bytes() + valopers, _ := chain.StakingKeeper.GetValidators(ctx, maxQueryCount) + valAddrBz := valopers[0].GetOperator() return sdk.ConsAddress(valAddrBz) } @@ -98,7 +98,7 @@ func NewNibiruTestApp(customGenesisOverride app.GenesisState) ( ) { app := app.NewNibiruApp( log.NewNopLogger(), - tmdb.NewMemDB(), + dbm.NewMemDB(), /*traceStore=*/ nil, /*loadLatest=*/ true, /*appOpts=*/ sims.EmptyAppOptions{}, @@ -142,7 +142,7 @@ func NewNibiruTestApp(customGenesisOverride app.GenesisState) ( panic(err) } - app.InitChain(abci.RequestInitChain{ + app.InitChain(&abci.RequestInitChain{ ConsensusParams: sims.DefaultConsensusParams, AppStateBytes: stateBytes, }) @@ -258,7 +258,7 @@ func genesisStateWithValSet( MinSelfDelegation: sdkmath.ZeroInt(), } validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdkmath.LegacyOneDec())) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].String(), val.Address.String(), sdkmath.LegacyOneDec())) } // set validators and delegations genesisState[stakingtypes.ModuleName] = cdc.MustMarshalJSON( diff --git a/x/common/testutil/testnetwork/network.go b/x/common/testutil/testnetwork/network.go index ba1b5539c5..0b91b39ff9 100644 --- a/x/common/testutil/testnetwork/network.go +++ b/x/common/testutil/testnetwork/network.go @@ -13,9 +13,10 @@ import ( "time" sdkmath "cosmossdk.io/math" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/store/pruning/types" + "cosmossdk.io/log" cmtrand "github.com/cometbft/cometbft/libs/rand" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" @@ -25,8 +26,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/store/pruning/types" sdktestutil "github.com/cosmos/cosmos-sdk/testutil" + networkutil "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -201,7 +202,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error apiListenAddr = cfg.APIAddress } else { var err error - apiListenAddr, _, err = server.FreeTCPAddr() + apiListenAddr, _, _, err = networkutil.FreeTCPAddr() if err != nil { return nil, fmt.Errorf("failed to get free TCP address for API: %w", err) } @@ -217,7 +218,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error if cfg.RPCAddress != "" { tmCfg.RPC.ListenAddress = cfg.RPCAddress } else { - rpcAddr, _, err := server.FreeTCPAddr() + rpcAddr, _, _, err := networkutil.FreeTCPAddr() if err != nil { return nil, err } @@ -227,7 +228,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error if cfg.GRPCAddress != "" { appCfg.GRPC.Address = cfg.GRPCAddress } else { - _, grpcPort, err := server.FreeTCPAddr() + _, grpcPort, _, err := networkutil.FreeTCPAddr() if err != nil { return nil, err } @@ -235,17 +236,16 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error } appCfg.GRPC.Enable = true - _, grpcWebPort, err := server.FreeTCPAddr() + _, _, _, err = networkutil.FreeTCPAddr() if err != nil { return nil, err } - appCfg.GRPCWeb.Address = fmt.Sprintf("0.0.0.0:%s", grpcWebPort) appCfg.GRPCWeb.Enable = true if cfg.JSONRPCAddress != "" { appCfg.JSONRPC.Address = cfg.JSONRPCAddress } else { - _, jsonRPCPort, err := server.FreeTCPAddr() + _, jsonRPCPort, _, err := networkutil.FreeTCPAddr() if err != nil { return nil, err } @@ -257,6 +257,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error serverCtxLogger := log.NewNopLogger() if cfg.EnableTMLogging { + log.NewLogger(os.Stdout) serverCtxLogger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)) } ctx.Logger = serverCtxLogger diff --git a/x/common/testutil/testnetwork/start_node.go b/x/common/testutil/testnetwork/start_node.go index 87043116e0..d66aaea7e0 100644 --- a/x/common/testutil/testnetwork/start_node.go +++ b/x/common/testutil/testnetwork/start_node.go @@ -18,12 +18,14 @@ import ( servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" srvtypes "github.com/cosmos/cosmos-sdk/server/types" + cmtcfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/libs/log" "github.com/cometbft/cometbft/node" "github.com/cometbft/cometbft/p2p" pvm "github.com/cometbft/cometbft/privval" "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/rpc/client/local" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" ) func startNodeAndServers(cfg Config, val *Validator) error { @@ -50,9 +52,9 @@ func startNodeAndServers(cfg Config, val *Validator) error { nodeKey, proxy.NewLocalClientCreator(app), genDocProvider, - node.DefaultDBProvider, + cmtcfg.DefaultDBProvider, node.DefaultMetricsProvider(tmCfg.Instrumentation), - logger.With("module", val.Moniker), + servercmtlog.CometLoggerWrapper{Logger: logger.With("module", val.Moniker)}, ) if err != nil { return fmt.Errorf("failed to construct Node: %w", err) @@ -63,7 +65,7 @@ func startNodeAndServers(cfg Config, val *Validator) error { } val.tmNode = tmNode - val.tmNode.Logger = logger + val.tmNode.Logger = servercmtlog.CometLoggerWrapper{Logger: logger} if val.RPCAddress != "" { val.RPCClient = local.New(tmNode) diff --git a/x/common/testutil/testnetwork/tx.go b/x/common/testutil/testnetwork/tx.go index 4ca9b2de02..a3399ce7f1 100644 --- a/x/common/testutil/testnetwork/tx.go +++ b/x/common/testutil/testnetwork/tx.go @@ -165,7 +165,7 @@ func (chain *Network) BroadcastMsgs( WithAccountNumber(acc.GetAccountNumber()). WithSequence(sequence) - err = tx.Sign(txFactory, info.Name, txBuilder, true) + err = tx.Sign(context.Background(), txFactory, info.Name, txBuilder, true) if err != nil { return nil, err } diff --git a/x/common/testutil/testnetwork/tx_test.go b/x/common/testutil/testnetwork/tx_test.go index 05d57bec95..67398b8de8 100644 --- a/x/common/testutil/testnetwork/tx_test.go +++ b/x/common/testutil/testnetwork/tx_test.go @@ -4,6 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkmath "cosmossdk.io/math" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/cli" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -31,7 +32,7 @@ func (s *TestSuite) TestExecTx() { toAddr := testutil.AccAddress() sendCoin := sdk.NewCoin(denoms.NIBI, sdkmath.NewInt(69)) args := []string{fromAddr.String(), toAddr.String(), sendCoin.String()} - txResp, err := s.network.ExecTxCmd(bankcli.NewSendTxCmd(), fromAddr, args) + txResp, err := s.network.ExecTxCmd(bankcli.NewSendTxCmd(addresscodec.NewBech32Codec("nibi")), fromAddr, args) s.NoError(err) s.EqualValues(0, txResp.Code) @@ -45,7 +46,7 @@ func (s *TestSuite) TestExecTx() { KeyringBackend: &defaultOpts.KeyringBackend, SkipConfirmation: &defaultOpts.SkipConfirmation, }) - txResp, err = s.network.ExecTxCmd(bankcli.NewSendTxCmd(), fromAddr, args, opts) + txResp, err = s.network.ExecTxCmd(bankcli.NewSendTxCmd(addresscodec.NewBech32Codec("nibi")), fromAddr, args, opts) s.NoError(err) s.EqualValues(0, txResp.Code) }) @@ -54,7 +55,7 @@ func (s *TestSuite) TestExecTx() { networkNoVals := new(testnetwork.Network) *networkNoVals = *s.network networkNoVals.Validators = []*testnetwork.Validator{} - _, err := networkNoVals.ExecTxCmd(bankcli.NewTxCmd(), fromAddr, args) + _, err := networkNoVals.ExecTxCmd(bankcli.NewTxCmd(addresscodec.NewBech32Codec("nibi")), fromAddr, args) s.Error(err) s.Contains(err.Error(), "") }) diff --git a/x/common/testutil/testnetwork/util.go b/x/common/testutil/testnetwork/util.go index 605b337b48..4c8b7fd6c8 100644 --- a/x/common/testutil/testnetwork/util.go +++ b/x/common/testutil/testnetwork/util.go @@ -13,6 +13,7 @@ import ( tmtime "github.com/cometbft/cometbft/types/time" "github.com/cosmos/cosmos-sdk/client/flags" sdkcodec "github.com/cosmos/cosmos-sdk/codec" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" @@ -41,13 +42,13 @@ func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error { initCfg := genutiltypes.NewInitConfig(cfg.ChainID, gentxsDir, vals[i].NodeID, vals[i].PubKey) genFile := tmCfg.GenesisFile() - genDoc, err := cmttypes.GenesisDocFromFile(genFile) + appGenesis, err := genutiltypes.AppGenesisFromFile(genFile) if err != nil { return err } appState, err := genutil.GenAppStateFromConfig(cfg.Codec, cfg.TxConfig, - tmCfg, initCfg, *genDoc, banktypes.GenesisBalancesIterator{}, genutiltypes.DefaultMessageValidator) + tmCfg, initCfg, appGenesis, banktypes.GenesisBalancesIterator{}, genutiltypes.DefaultMessageValidator, cfg.TxConfig.SigningContext().ValidatorAddressCodec()) if err != nil { return err } @@ -129,6 +130,7 @@ func FillWalletFromValidator( val.Address, addr, balance, + addresscodec.NewBech32Codec("nibi"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewInt64Coin(feesDenom, 10000)), diff --git a/x/devgas/v1/ante/expected_keepers.go b/x/devgas/v1/ante/expected_keepers.go index f961e9705f..52a93629af 100644 --- a/x/devgas/v1/ante/expected_keepers.go +++ b/x/devgas/v1/ante/expected_keepers.go @@ -3,6 +3,8 @@ package ante // Interfaces needed for the Nibiru Chain ante handler import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" @@ -10,11 +12,11 @@ import ( type BankKeeper interface { SendCoinsFromAccountToModule( - ctx sdk.Context, senderAddr sdk.AccAddress, + ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error SendCoinsFromModuleToAccount( - ctx sdk.Context, senderModule string, + ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error } diff --git a/x/devgas/v1/client/cli/cli_test.go b/x/devgas/v1/client/cli/cli_test.go index 544948f95b..7aa23422f6 100644 --- a/x/devgas/v1/client/cli/cli_test.go +++ b/x/devgas/v1/client/cli/cli_test.go @@ -49,7 +49,7 @@ func (s *CLITestSuite) SetupSuite() { WithKeyring(s.keyring). WithTxConfig(s.encCfg.TxConfig). WithCodec(s.encCfg.Codec). - WithClient(sdktestutilcli.MockTendermintRPC{Client: rpcclientmock.Client{}}). + WithClient(sdktestutilcli.MockCometRPC{Client: rpcclientmock.Client{}}). WithAccountRetriever(sdkclient.MockAccountRetriever{}). WithOutput(io.Discard). WithChainID("test-chain") @@ -57,7 +57,7 @@ func (s *CLITestSuite) SetupSuite() { var outBuf bytes.Buffer ctxGen := func() sdkclient.Context { bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) - c := sdktestutilcli.NewMockTendermintRPC(abci.ResponseQuery{ + c := sdktestutilcli.NewMockCometRPC(abci.ResponseQuery{ Value: bz, }) return s.baseCtx.WithClient(c) diff --git a/x/devgas/v1/keeper/keeper.go b/x/devgas/v1/keeper/keeper.go index 83ce8e770b..3f0b0727fc 100644 --- a/x/devgas/v1/keeper/keeper.go +++ b/x/devgas/v1/keeper/keeper.go @@ -5,10 +5,10 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/collections" diff --git a/x/devgas/v1/keeper/store.go b/x/devgas/v1/keeper/store.go index 9327504bf4..a7218d4c54 100644 --- a/x/devgas/v1/keeper/store.go +++ b/x/devgas/v1/keeper/store.go @@ -1,9 +1,9 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" sdkcodec "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) diff --git a/x/devgas/v1/module.go b/x/devgas/v1/module.go index a4fe33ce9a..28cb0355f2 100644 --- a/x/devgas/v1/module.go +++ b/x/devgas/v1/module.go @@ -123,6 +123,12 @@ func (AppModule) Name() string { return types.ModuleName } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // RegisterInvariants registers the fees module's invariants. func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} @@ -141,13 +147,14 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // BeginBlock executes all ABCI BeginBlock logic respective to the fees module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ context.Context) error { + return nil } // EndBlock executes all ABCI EndBlock logic respective to the fee-share module. It // returns no validator updates. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(_ context.Context) error { + return nil } // InitGenesis performs the fees module's genesis initialization. It returns @@ -176,7 +183,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // RegisterStoreDecoder implements module.AppModuleSimulation. -func (AppModule) RegisterStoreDecoder(sdk.StoreDecoderRegistry) { +func (AppModule) RegisterStoreDecoder(simtypes.StoreDecoderRegistry) { } // WeightedOperations implements module.AppModuleSimulation. diff --git a/x/devgas/v1/module_test.go b/x/devgas/v1/module_test.go index 4d4a6685fc..885e15ab53 100644 --- a/x/devgas/v1/module_test.go +++ b/x/devgas/v1/module_test.go @@ -1,8 +1,6 @@ package devgas_test import ( - abci "github.com/cometbft/cometbft/abci/types" - "github.com/NibiruChain/nibiru/v2/app" devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1" devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" @@ -17,8 +15,8 @@ func (s *GenesisTestSuite) TestAppModule() { s.NotPanics(func() { s.T().Log("begin and end block") - appModule.BeginBlock(s.ctx, abci.RequestBeginBlock{}) - appModule.EndBlock(s.ctx, abci.RequestEndBlock{}) + appModule.BeginBlock(s.ctx) + appModule.EndBlock(s.ctx) s.T().Log("AppModule.ExportGenesis") cdc := s.app.AppCodec() diff --git a/x/devgas/v1/simulation/genesis.go b/x/devgas/v1/simulation/genesis.go index f0e77359b0..68a3ad687d 100644 --- a/x/devgas/v1/simulation/genesis.go +++ b/x/devgas/v1/simulation/genesis.go @@ -24,7 +24,7 @@ func GenDeveloperFeeShare(r *rand.Rand) sdkmath.LegacyDec { func RandomizedGenState(simState *module.SimulationState) { var developerFeeShare sdkmath.LegacyDec simState.AppParams.GetOrGenerate( - simState.Cdc, DeveloperFeeShare, &developerFeeShare, simState.Rand, + DeveloperFeeShare, &developerFeeShare, simState.Rand, func(r *rand.Rand) { developerFeeShare = GenDeveloperFeeShare(r) }, ) diff --git a/x/devgas/v1/types/codec.go b/x/devgas/v1/types/codec.go index ecedea2e11..4235e09da1 100644 --- a/x/devgas/v1/types/codec.go +++ b/x/devgas/v1/types/codec.go @@ -5,7 +5,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" ) var ( @@ -30,18 +29,6 @@ const ( updateFeeShareParams = "nibiru/MsgUpdateParams" ) -// NOTE: This is required for the GetSignBytes function -func init() { - RegisterLegacyAminoCodec(amino) - - sdk.RegisterLegacyAminoCodec(amino) - - // Register all Amino interfaces and concrete types on the authz Amino codec - // so that this can later be used to properly serialize MsgGrant and MsgExec - // instances. - RegisterLegacyAminoCodec(authzcodec.Amino) -} - // RegisterInterfaces register implementations func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( diff --git a/x/devgas/v1/types/expected_keepers.go b/x/devgas/v1/types/expected_keepers.go index 1592cf2bf6..993e5d8c70 100644 --- a/x/devgas/v1/types/expected_keepers.go +++ b/x/devgas/v1/types/expected_keepers.go @@ -1,32 +1,33 @@ package types import ( + context "context" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" // "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" - acctypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the expected interface needed to retrieve account info. type AccountKeeper interface { GetModuleAddress(moduleName string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, name string) acctypes.ModuleAccountI + GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI - HasAccount(ctx sdk.Context, addr sdk.AccAddress) bool - GetAccount(ctx sdk.Context, addr sdk.AccAddress) (account acctypes.AccountI) + HasAccount(ctx context.Context, addr sdk.AccAddress) bool + GetAccount(ctx context.Context, addr sdk.AccAddress) (account sdk.AccountI) } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins } // WasmKeeper defines the expected interface needed to retrieve cosmwasm contracts. type WasmKeeper interface { - GetContractInfo(ctx sdk.Context, contractAddr sdk.AccAddress) (wasmtypes.ContractInfo, error) + GetContractInfo(ctx context.Context, contractAddr sdk.AccAddress) (wasmtypes.ContractInfo, error) } diff --git a/x/epochs/abci.go b/x/epochs/abci.go index b318a2254e..90634210e3 100644 --- a/x/epochs/abci.go +++ b/x/epochs/abci.go @@ -1,6 +1,7 @@ package epochs import ( + "context" "time" "github.com/cosmos/cosmos-sdk/telemetry" @@ -11,7 +12,8 @@ import ( ) // BeginBlocker of epochs module. -func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { +func BeginBlocker(c context.Context, k keeper.Keeper) { + ctx := sdk.UnwrapSDKContext(c) defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) k.IterateEpochInfo(ctx, func(index int64, epochInfo types.EpochInfo) (stop bool) { if ctx.BlockTime().Before(epochInfo.StartTime) { diff --git a/x/epochs/keeper/keeper.go b/x/epochs/keeper/keeper.go index 8748c9c6b1..73839eafe2 100644 --- a/x/epochs/keeper/keeper.go +++ b/x/epochs/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" diff --git a/x/epochs/module.go b/x/epochs/module.go index f0c0f5ae48..1bed7d3519 100644 --- a/x/epochs/module.go +++ b/x/epochs/module.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + store "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -30,6 +30,7 @@ var ( _ module.AppModuleBasic = AppModuleBasic{} _ module.AppModule = AppModule{} _ module.AppModuleSimulation = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // ---------------------------------------------------------------------------- @@ -143,13 +144,14 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx context.Context) error { BeginBlocker(ctx, *am.keeper) + return nil } // EndBlock executes all ABCI EndBlock logic respective to the capability module. It // returns no validator updates. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(ctx sdk.Context) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -168,7 +170,7 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We } // RegisterStoreDecoder registers a decoder for supply module's types. -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { } // WeightedOperations returns the all the gov module operations with their respective weights. diff --git a/x/evm/cli/cli_setup_test.go b/x/evm/cli/cli_setup_test.go index 21b11786e7..f9ebbebbf0 100644 --- a/x/evm/cli/cli_setup_test.go +++ b/x/evm/cli/cli_setup_test.go @@ -38,7 +38,7 @@ func (s *Suite) SetupSuite() { WithKeyring(s.keyring). WithTxConfig(s.encCfg.TxConfig). WithCodec(s.encCfg.Codec). - WithClient(sdktestutilcli.MockTendermintRPC{Client: rpcclientmock.Client{}}). + WithClient(sdktestutilcli.MockCometRPC{Client: rpcclientmock.Client{}}). WithAccountRetriever(sdkclient.MockAccountRetriever{}). WithOutput(io.Discard). WithChainID("test-chain") diff --git a/x/evm/deps.go b/x/evm/deps.go index 2325def185..cdba32d9d3 100644 --- a/x/evm/deps.go +++ b/x/evm/deps.go @@ -2,6 +2,9 @@ package evm import ( + context "context" + + "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -9,30 +12,31 @@ import ( // AccountKeeper defines the expected account keeper interface type AccountKeeper interface { - NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // GetModuleAccount gets the module account from the auth account store, if the // account does not exist in the AccountKeeper, then it is created. This // differs from the "GetModuleAddress" function, which performs a pure // computation. - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI // GetModuleAddress returns an address based on the module name, however it // does not modify state at all. To create initialize the module account, // instead use "GetModuleAccount". GetModuleAddress(moduleName string) sdk.AccAddress - GetAllAccounts(ctx sdk.Context) (accounts []authtypes.AccountI) - IterateAccounts(ctx sdk.Context, cb func(account authtypes.AccountI) bool) - GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - SetAccount(ctx sdk.Context, account authtypes.AccountI) - RemoveAccount(ctx sdk.Context, account authtypes.AccountI) - GetParams(ctx sdk.Context) (params authtypes.Params) - SetModuleAccount(ctx sdk.Context, macc authtypes.ModuleAccountI) + GetAllAccounts(ctx context.Context) (accounts []sdk.AccountI) + IterateAccounts(ctx context.Context, cb func(account sdk.AccountI) bool) + GetSequence(context.Context, sdk.AccAddress) (uint64, error) + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + SetAccount(ctx context.Context, account sdk.AccountI) + RemoveAccount(ctx context.Context, account sdk.AccountI) + GetParams(ctx context.Context) (params authtypes.Params) + SetModuleAccount(ctx context.Context, macc sdk.ModuleAccountI) + AddressCodec() address.Codec } // StakingKeeper returns the historical headers kept in store. type StakingKeeper interface { - GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) - GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) + GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, bool) + GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } diff --git a/x/evm/evmmodule/module.go b/x/evm/evmmodule/module.go index 4daf3208e4..8ec589df81 100644 --- a/x/evm/evmmodule/module.go +++ b/x/evm/evmmodule/module.go @@ -7,7 +7,9 @@ import ( "fmt" "cosmossdk.io/core/appmodule" + corestore "cosmossdk.io/core/store" "cosmossdk.io/depinject" + "cosmossdk.io/log" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cast" @@ -15,11 +17,11 @@ import ( abci "github.com/cometbft/cometbft/abci/types" + store "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -46,10 +48,11 @@ import ( const consensusVersion = 1 var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} - _ module.EndBlockAppModule = AppModule{} - _ module.BeginBlockAppModule = AppModule{} + _ module.AppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the evm module. @@ -155,14 +158,15 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // BeginBlock returns the begin block for the evm module. -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { - am.keeper.BeginBlock(ctx, req) +func (am AppModule) BeginBlock(ctx context.Context) error { + am.keeper.BeginBlock(ctx) + return nil } // EndBlock returns the end blocker for the evm module. It returns no validator // updates. -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { - return am.keeper.EndBlock(ctx, req) +func (am AppModule) EndBlock(ctx context.Context) error { + return am.keeper.EndBlock(ctx) } // InitGenesis performs genesis initialization for the evm module. It returns @@ -182,7 +186,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // RegisterStoreDecoder registers a decoder for evm module's types -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) { } // GenerateGenesisState creates a randomized GenState of the evm module. @@ -210,9 +214,10 @@ func init() { type NibiruBankInputs struct { depinject.In - Config *bankmodulev1.Module - Cdc codec.Codec - Key *store.KVStoreKey + Config *bankmodulev1.Module + Cdc codec.Codec + StoreService corestore.KVStoreService + Logger log.Logger AccountKeeper banktypes.AccountKeeper @@ -252,10 +257,11 @@ func ProvideNibiruBankModule(in NibiruBankInputs) NibiruBankOutputs { nibiruBankKeeper := &evmkeeper.NibiruBankKeeper{ BaseKeeper: bankkeeper.NewBaseKeeper( in.Cdc, - in.Key, + in.StoreService, in.AccountKeeper, blockedAddresses, authority.String(), + in.Logger, ), StateDB: nil, } diff --git a/x/evm/evmtest/signer.go b/x/evm/evmtest/signer.go index c05e16afcc..cf79e1cf9b 100644 --- a/x/evm/evmtest/signer.go +++ b/x/evm/evmtest/signer.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" ) @@ -24,7 +25,7 @@ func NewSigner(sk cryptotypes.PrivKey) keyring.Signer { } // Sign signs the message using the underlying private key -func (s Signer) Sign(_ string, msg []byte) ([]byte, cryptotypes.PubKey, error) { +func (s Signer) Sign(_ string, msg []byte, signMode signing.SignMode) ([]byte, cryptotypes.PubKey, error) { if s.privKey.Type() != ethsecp256k1.KeyType { return nil, nil, fmt.Errorf( "invalid private key type for signing ethereum tx; expected %s, got %s", @@ -42,11 +43,11 @@ func (s Signer) Sign(_ string, msg []byte) ([]byte, cryptotypes.PubKey, error) { } // SignByAddress sign byte messages with a user key providing the address. -func (s Signer) SignByAddress(address sdk.Address, msg []byte) ([]byte, cryptotypes.PubKey, error) { +func (s Signer) SignByAddress(address sdk.Address, msg []byte, signMode signing.SignMode) ([]byte, cryptotypes.PubKey, error) { signer := sdk.AccAddress(s.privKey.PubKey().Address()) if !signer.Equals(address) { return nil, nil, fmt.Errorf("address mismatch: signer %s ≠ given address %s", signer, address) } - return s.Sign("", msg) + return s.Sign("", msg, signMode) } diff --git a/x/evm/evmtest/tx_test.go b/x/evm/evmtest/tx_test.go index 63cd7573d5..7afad05ce9 100644 --- a/x/evm/evmtest/tx_test.go +++ b/x/evm/evmtest/tx_test.go @@ -4,6 +4,7 @@ package evmtest_test import ( "math/big" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" @@ -18,7 +19,7 @@ func (s *Suite) TestTransferWei() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(69_420))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420))), )) randomAcc := evmtest.NewEthPrivAcc() diff --git a/x/evm/keeper/bank_extension.go b/x/evm/keeper/bank_extension.go index 04c86005f2..24f073937b 100644 --- a/x/evm/keeper/bank_extension.go +++ b/x/evm/keeper/bank_extension.go @@ -1,6 +1,9 @@ package keeper import ( + "context" + + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" @@ -27,20 +30,19 @@ func (evmKeeper *Keeper) NewStateDB( } func (bk NibiruBankKeeper) InputOutputCoins( - ctx sdk.Context, - input []banktypes.Input, + c context.Context, + input banktypes.Input, output []banktypes.Output, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { return bk.BaseKeeper.InputOutputCoins(ctx, input, output) }, func(ctx sdk.Context) { - for _, input := range input { - if findEtherBalanceChangeFromCoins(input.Coins) { - bk.SyncStateDBWithAccount(ctx, sdk.MustAccAddressFromBech32(input.Address)) - } + if findEtherBalanceChangeFromCoins(input.Coins) { + bk.SyncStateDBWithAccount(ctx, sdk.MustAccAddressFromBech32(input.Address)) } for _, output := range output { if findEtherBalanceChangeFromCoins(output.Coins) { @@ -52,11 +54,12 @@ func (bk NibiruBankKeeper) InputOutputCoins( } func (bk NibiruBankKeeper) DelegateCoins( - ctx sdk.Context, + c context.Context, delegatorAddr sdk.AccAddress, moduleBech32Addr sdk.AccAddress, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -71,11 +74,12 @@ func (bk NibiruBankKeeper) DelegateCoins( } func (bk NibiruBankKeeper) UndelegateCoins( - ctx sdk.Context, + c context.Context, delegatorAddr sdk.AccAddress, moduleBech32Addr sdk.AccAddress, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -89,7 +93,8 @@ func (bk NibiruBankKeeper) UndelegateCoins( ) } -func (bk NibiruBankKeeper) DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error { +func (bk NibiruBankKeeper) DelegateCoinsFromAccountToModule(c context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -105,7 +110,8 @@ func (bk NibiruBankKeeper) DelegateCoinsFromAccountToModule(ctx sdk.Context, sen ) } -func (bk NibiruBankKeeper) UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error { +func (bk NibiruBankKeeper) UndelegateCoinsFromModuleToAccount(c context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -122,10 +128,11 @@ func (bk NibiruBankKeeper) UndelegateCoinsFromModuleToAccount(ctx sdk.Context, s } func (bk NibiruBankKeeper) MintCoins( - ctx sdk.Context, + c context.Context, moduleName string, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -142,10 +149,11 @@ func (bk NibiruBankKeeper) MintCoins( } func (bk NibiruBankKeeper) BurnCoins( - ctx sdk.Context, + c context.Context, moduleName string, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -206,17 +214,18 @@ func (bk NibiruBankKeeper) ForceGasInvariant( return err } - ctx = ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + ctx = ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) AfterOp(ctx) return nil } func (bk NibiruBankKeeper) SendCoins( - ctx sdk.Context, + c context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -255,11 +264,12 @@ func findEtherBalanceChangeFromCoins(coins sdk.Coins) (found bool) { } func (bk NibiruBankKeeper) SendCoinsFromAccountToModule( - ctx sdk.Context, + c context.Context, senderAddr sdk.AccAddress, recipientModule string, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -277,11 +287,12 @@ func (bk NibiruBankKeeper) SendCoinsFromAccountToModule( } func (bk NibiruBankKeeper) SendCoinsFromModuleToAccount( - ctx sdk.Context, + c context.Context, senderModule string, recipientAddr sdk.AccAddress, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { @@ -299,11 +310,12 @@ func (bk NibiruBankKeeper) SendCoinsFromModuleToAccount( } func (bk NibiruBankKeeper) SendCoinsFromModuleToModule( - ctx sdk.Context, + c context.Context, senderModule string, recipientModule string, coins sdk.Coins, ) error { + ctx := sdk.UnwrapSDKContext(c) return bk.ForceGasInvariant( ctx, func(ctx sdk.Context) error { diff --git a/x/evm/keeper/evm_state.go b/x/evm/keeper/evm_state.go index 44d1411501..737f21fbeb 100644 --- a/x/evm/keeper/evm_state.go +++ b/x/evm/keeper/evm_state.go @@ -5,9 +5,9 @@ import ( "fmt" "math/big" + sdkstore "cosmossdk.io/store/types" "github.com/NibiruChain/collections" "github.com/cosmos/cosmos-sdk/codec" - sdkstore "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" diff --git a/x/evm/keeper/funtoken_from_coin_test.go b/x/evm/keeper/funtoken_from_coin_test.go index 023bb51cbc..9f510f4dd6 100644 --- a/x/evm/keeper/funtoken_from_coin_test.go +++ b/x/evm/keeper/funtoken_from_coin_test.go @@ -5,6 +5,8 @@ import ( "math/big" "testing" + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -83,7 +85,7 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { }) s.Run("happy: CreateFunToken for the bank coin", func() { - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, @@ -200,12 +202,12 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { funToken := s.fundAndCreateFunToken(deps, 100) s.T().Log("Convert bank coin to erc-20") - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()).WithEventManager(sdk.NewEventManager()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()).WithEventManager(sdk.NewEventManager()) _, err := deps.EvmKeeper.ConvertCoinToEvm( sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10)), ToEthAddr: eth.EIP55Addr{ Address: alice.EthAddr, }, @@ -222,7 +224,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { Sender: deps.Sender.NibiruAddr.String(), Erc20ContractAddress: funToken.Erc20Addr.String(), ToEthAddr: alice.EthAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10)), }, ) @@ -259,11 +261,11 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { // Check 1: module balance moduleBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, authtypes.NewModuleAddress(evm.ModuleName), evm.EVMBankDenom) - s.Require().Equal(sdk.NewInt(10), moduleBalance.Amount) + s.Require().Equal(sdkmath.NewInt(10), moduleBalance.Amount) // Check 2: Sender balance senderBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, evm.EVMBankDenom) - s.Require().Equal(sdk.NewInt(90), senderBalance.Amount) + s.Require().Equal(sdkmath.NewInt(90), senderBalance.Amount) // Check 3: erc-20 balance balance, err := deps.EvmKeeper.ERC20().BalanceOf(funToken.Erc20Addr.Address, alice.EthAddr, deps.Ctx, evmObj) @@ -275,7 +277,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(100)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(100)), ToEthAddr: eth.EIP55Addr{ Address: alice.EthAddr, }, @@ -292,7 +294,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { deps.Sender.NibiruAddr.String(), ) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ = deps.NewEVM() _, err = deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -308,11 +310,11 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { // Check 1: module balance moduleBalance = deps.App.BankKeeper.GetBalance(deps.Ctx, authtypes.NewModuleAddress(evm.ModuleName), evm.EVMBankDenom) - s.Require().True(moduleBalance.Amount.Equal(sdk.ZeroInt())) + s.Require().True(moduleBalance.Amount.Equal(sdkmath.ZeroInt())) // Check 2: Sender balance senderBalance = deps.App.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, evm.EVMBankDenom) - s.Require().Equal(sdk.NewInt(100), senderBalance.Amount) + s.Require().Equal(sdkmath.NewInt(100), senderBalance.Amount) // Check 3: erc-20 balance balance, err = deps.EvmKeeper.ERC20().BalanceOf(funToken.Erc20Addr.Address, alice.EthAddr, deps.Ctx, evmObj) @@ -320,7 +322,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { s.Require().Equal("0", balance.String()) s.T().Log("sad: Convert more erc-20 to back to bank coin, insufficient funds") - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ = deps.NewEVM() _, err = deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -378,7 +380,7 @@ func (s *FunTokenFromCoinSuite) TestNativeSendThenPrecompileSend() { deps.App.BankKeeper, deps.Ctx, testContractNibiAddr, - sdk.NewCoins(sdk.NewCoin(bankDenom, sdk.NewIntFromBigInt(sendAmt)))), + sdk.NewCoins(sdk.NewCoin(bankDenom, sdkmath.NewIntFromBigInt(sendAmt)))), ) evmtest.AssertBankBalanceEqualWithDescription( s.T(), deps, bankDenom, testContractAddr, sendAmt, "expect 10 balance", @@ -392,7 +394,7 @@ func (s *FunTokenFromCoinSuite) TestNativeSendThenPrecompileSend() { sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(bankDenom, sdk.NewIntFromBigInt(sendAmt)), + BankCoin: sdk.NewCoin(bankDenom, sdkmath.NewIntFromBigInt(sendAmt)), ToEthAddr: eth.EIP55Addr{Address: testContractAddr}, }, ) @@ -432,7 +434,7 @@ func (s *FunTokenFromCoinSuite) TestNativeSendThenPrecompileSend() { newSendAmtSendToBank, /*amount*/ ) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ = deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -478,7 +480,7 @@ func (s *FunTokenFromCoinSuite) TestNativeSendThenPrecompileSend() { newSendAmtSendToBank, /*amount*/ ) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ = deps.NewEVM() evmResp, err = deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -555,7 +557,7 @@ func (s *FunTokenFromCoinSuite) TestERC20TransferThenPrecompileSend() { sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6)), ToEthAddr: eth.EIP55Addr{Address: testContractAddr}, }, ) @@ -595,7 +597,7 @@ func (s *FunTokenFromCoinSuite) TestERC20TransferThenPrecompileSend() { big.NewInt(9e6), /*amount*/ ) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ = deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -673,7 +675,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSelfCallRevert() { sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6)), ToEthAddr: eth.EIP55Addr{Address: testContractAddr}, }, ) @@ -684,7 +686,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSelfCallRevert() { deps.App.BankKeeper, deps.Ctx, eth.EthAddrToNibiruAddr(testContractAddr), - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6))), )) evmObj, _ := deps.NewEVM() @@ -702,7 +704,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSelfCallRevert() { charles := evmtest.NewEthPrivAcc() s.T().Log("call test contract") - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ = deps.NewEVM() contractInput, err := embeds.SmartContract_TestPrecompileSelfCallRevert.ABI.Pack( "selfCallTransferFunds", @@ -796,7 +798,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSendToBankThenErc20Transfer() { sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6)), ToEthAddr: eth.EIP55Addr{Address: testContractAddr}, }, ) @@ -812,7 +814,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSendToBankThenErc20Transfer() { "attack", ) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ := deps.NewEVM() evpResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -888,7 +890,7 @@ func (s *FunTokenFromCoinSuite) fundAndCreateFunToken(deps evmtest.TestDeps, uni deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx).Add(sdk.NewCoin(bankDenom, sdk.NewInt(unibiAmount))), + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx).Add(sdk.NewCoin(bankDenom, sdkmath.NewInt(unibiAmount))), )) s.T().Log("Create FunToken from coin") diff --git a/x/evm/keeper/funtoken_from_erc20_test.go b/x/evm/keeper/funtoken_from_erc20_test.go index 64741155b1..14e9e06f9b 100644 --- a/x/evm/keeper/funtoken_from_erc20_test.go +++ b/x/evm/keeper/funtoken_from_erc20_test.go @@ -7,6 +7,8 @@ import ( "math/big" "testing" + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" gethcommon "github.com/ethereum/go-ethereum/common" @@ -75,7 +77,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), )) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) resp, err := deps.EvmKeeper.CreateFunToken( sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ @@ -204,7 +206,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { s.Run("happy: mint erc20 tokens", func() { contractInput, err := embeds.SmartContract_ERC20MinterWithMetadataUpdates.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ := deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -225,7 +227,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { s.Run("happy: send erc20 tokens to Bank", func() { contractInput, err := embeds.SmartContract_FunToken.ABI.Pack("sendToBank", deployResp.ContractAddr, big.NewInt(1), randomAcc.String()) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ := deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -246,7 +248,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { evmObj, _ := deps.NewEVM() evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, deps.Sender.EthAddr, big.NewInt(69_419), "expect nonzero balance") evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(1), "expect nonzero balance") - s.Require().Equal(sdk.NewInt(1), + s.Require().Equal(sdkmath.NewInt(1), deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount, ) }) @@ -254,7 +256,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { s.Run("sad: send too many erc20 tokens to Bank", func() { contractInput, err := embeds.SmartContract_FunToken.ABI.Pack("sendToBank", deployResp.ContractAddr, big.NewInt(70_000), randomAcc.String()) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ := deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -272,14 +274,14 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { }) s.Run("happy: send Bank tokens back to erc20", func() { - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()).WithEventManager(sdk.NewEventManager()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()).WithEventManager(sdk.NewEventManager()) _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ ToEthAddr: eth.EIP55Addr{ Address: deps.Sender.EthAddr, }, Sender: randomAcc.String(), - BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), + BankCoin: sdk.NewCoin(bankDemon, sdkmath.NewInt(1)), }, ) s.Require().NoError(err) @@ -295,7 +297,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { ToEthAddr: deps.Sender.EthAddr.String(), BankCoin: sdk.Coin{ Denom: bankDemon, - Amount: sdk.NewInt(1), + Amount: sdkmath.NewInt(1), }, }, ) @@ -338,7 +340,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, deps.Sender.EthAddr, big.NewInt(69_420), "expect nonzero balance") evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(0), "expect nonzero balance") s.Require().True( - deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount.Equal(sdk.NewInt(0)), + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount.Equal(sdkmath.NewInt(0)), ) }) @@ -349,7 +351,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { Address: deps.Sender.EthAddr, }, Sender: randomAcc.String(), - BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), + BankCoin: sdk.NewCoin(bankDemon, sdkmath.NewInt(1)), }, ) s.Require().Error(err) @@ -437,7 +439,7 @@ func (s *FunTokenFromErc20Suite) TestFunTokenFromERC20MaliciousTransfer() { s.T().Log("send erc20 tokens to cosmos") input, err := embeds.SmartContract_FunToken.ABI.Pack("sendToBank", deployResp.ContractAddr, big.NewInt(1), randomAcc.String()) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ := deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -573,7 +575,7 @@ func (s *FunTokenFromErc20Suite) TestSendERC20WithFee() { randomAcc.String(), /*to*/ ) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ := deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, @@ -594,7 +596,7 @@ func (s *FunTokenFromErc20Suite) TestSendERC20WithFee() { evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, deployResp.ContractAddr, big.NewInt(10), "expect 10 balance") evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(90), "expect 90 balance") - s.Require().Equal(sdk.NewInt(90), deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount) + s.Require().Equal(sdkmath.NewInt(90), deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount) s.T().Log("send Bank tokens back to erc20") _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), @@ -603,7 +605,7 @@ func (s *FunTokenFromErc20Suite) TestSendERC20WithFee() { Address: deps.Sender.EthAddr, }, Sender: randomAcc.String(), - BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(90)), + BankCoin: sdk.NewCoin(bankDemon, sdkmath.NewInt(90)), }, ) s.Require().NoError(err) @@ -613,8 +615,8 @@ func (s *FunTokenFromErc20Suite) TestSendERC20WithFee() { evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, deps.Sender.EthAddr, big.NewInt(981), "expect 981 balance") evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, deployResp.ContractAddr, big.NewInt(19), "expect 19 balance") evmtest.AssertERC20BalanceEqualWithDescription(s.T(), deps, evmObj, deployResp.ContractAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(0), "expect 0 balance") - s.Require().True(deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount.Equal(sdk.NewInt(0))) - s.Require().True(deps.App.BankKeeper.GetBalance(deps.Ctx, evm.EVM_MODULE_ADDRESS_NIBI, bankDemon).Amount.Equal(sdk.NewInt(0))) + s.Require().True(deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount.Equal(sdkmath.NewInt(0))) + s.Require().True(deps.App.BankKeeper.GetBalance(deps.Ctx, evm.EVM_MODULE_ADDRESS_NIBI, bankDemon).Amount.Equal(sdkmath.NewInt(0))) } type MkrMetadata struct { @@ -652,7 +654,7 @@ func (s *FunTokenFromErc20Suite) TestFindMKRMetadata() { ) s.Require().NoError(err) - deps.Ctx = deps.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) evmObj, _ := deps.NewEVM() evmResp, err := deps.EvmKeeper.CallContractWithInput( deps.Ctx, diff --git a/x/evm/keeper/funtoken_state.go b/x/evm/keeper/funtoken_state.go index c8f36fa07e..9e9a59ed7b 100644 --- a/x/evm/keeper/funtoken_state.go +++ b/x/evm/keeper/funtoken_state.go @@ -2,9 +2,9 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" sdkcodec "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 0237ffc9fe..98a0db2927 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -14,7 +14,7 @@ import ( sdkmath "cosmossdk.io/math" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/v2/eth" @@ -354,7 +354,7 @@ func (k Keeper) EstimateGasForEvmCallType( } else { // Query block gas limit params := ctx.ConsensusParams() - if params != nil && params.Block != nil && params.Block.MaxGas > 0 { + if params != (cmtproto.ConsensusParams{}) && params.Block != nil && params.Block.MaxGas > 0 { hi = uint64(params.Block.MaxGas) } else { hi = req.GasCap @@ -422,7 +422,7 @@ func (k Keeper) EstimateGasForEvmCallType( WithTransientKVGasConfig(storetypes.GasConfig{}) } // pass false to not commit StateDB - txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash().Bytes())) + txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash())) stateDB := statedb.New(ctx, &k, txConfig) evmObj := k.NewEVM(tmpCtx, evmMsg, evmCfg, nil /*tracer*/, stateDB) rsp, err = k.ApplyEvmMsg(tmpCtx, evmMsg, evmObj, false /*commit*/, txConfig.TxHash) @@ -488,7 +488,7 @@ func (k Keeper) TraceTx( ctx = ctx.WithHeaderHash(gethcommon.Hex2Bytes(req.BlockHash)) // to get the base fee we only need the block max gas in the consensus params - ctx = ctx.WithConsensusParams(&cmtproto.ConsensusParams{ + ctx = ctx.WithConsensusParams(cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{MaxGas: req.BlockMaxGas}, }) @@ -504,7 +504,7 @@ func (k Keeper) TraceTx( big.NewInt(ctx.BlockHeight()), evm.ParseBlockTimeUnixU64(ctx), ) - txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash().Bytes())) + txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash())) // gas used at this point corresponds to GetProposerAddress & // CalculateBaseFee need to reset gas meter per transaction to be consistent @@ -587,7 +587,7 @@ func (k Keeper) TraceCall( ctx = ctx.WithHeaderHash(gethcommon.Hex2Bytes(req.BlockHash)) // to get the base fee we only need the block max gas in the consensus params - ctx = ctx.WithConsensusParams(&cmtproto.ConsensusParams{ + ctx = ctx.WithConsensusParams(cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{MaxGas: req.BlockMaxGas}, }) @@ -599,7 +599,7 @@ func (k Keeper) TraceCall( evmCfg.BaseFeeWei = baseFeeMicronibi } - txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash().Bytes())) + txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash())) var tracerConfig json.RawMessage if req.TraceConfig != nil && req.TraceConfig.TracerConfig != nil { @@ -671,7 +671,7 @@ func (k Keeper) TraceBlock( WithBlockTime(req.BlockTime). WithHeaderHash(gethcommon.Hex2Bytes(req.BlockHash)). // to get the base fee we only need the block max gas in the consensus params - WithConsensusParams(&cmtproto.ConsensusParams{ + WithConsensusParams(cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{MaxGas: req.BlockMaxGas}, }) @@ -696,7 +696,7 @@ func (k Keeper) TraceBlock( txsLength := len(req.Txs) results := make([]*evm.TxTraceResult, 0, txsLength) - txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash().Bytes())) + txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash())) for i, tx := range req.Txs { result := evm.TxTraceResult{} diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index af3c2c80f2..f996a9cee4 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -216,9 +216,10 @@ func (s *Suite) TestQueryValidatorAccount() { name: "happy: default values", setup: func(deps *evmtest.TestDeps) {}, scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - valopers := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) - valAddrBz := valopers[0].GetOperator().Bytes() - _, err := sdk.ConsAddressFromBech32(valopers[0].OperatorAddress) + valopers, err := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) + s.Require().NoError(err) + valAddrBz := valopers[0].GetOperator() + _, err = sdk.ConsAddressFromBech32(valopers[0].OperatorAddress) s.ErrorContains(err, "expected nibivalcons, got nibivaloper") consAddr := sdk.ConsAddress(valAddrBz) @@ -238,8 +239,9 @@ func (s *Suite) TestQueryValidatorAccount() { name: "happy: with nonce", setup: func(deps *evmtest.TestDeps) {}, scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - valopers := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) - valAddrBz := valopers[0].GetOperator().Bytes() + valopers, err := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) + s.Require().NoError(err) + valAddrBz := valopers[0].GetOperator() consAddr := sdk.ConsAddress(valAddrBz) s.T().Log( diff --git a/x/evm/keeper/hooks.go b/x/evm/keeper/hooks.go index f42c5ae1e4..4e91172c2c 100644 --- a/x/evm/keeper/hooks.go +++ b/x/evm/keeper/hooks.go @@ -2,26 +2,29 @@ package keeper import ( - abci "github.com/cometbft/cometbft/abci/types" + "context" "github.com/NibiruChain/nibiru/v2/eth" "github.com/NibiruChain/nibiru/v2/x/evm" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcoretypes "github.com/ethereum/go-ethereum/core/types" ) // BeginBlock hook for the EVM module. -func (k *Keeper) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {} +func (k *Keeper) BeginBlock(ctx context.Context) error { + return nil +} // EndBlock also retrieves the bloom filter value from the transient store and commits it to the -func (k *Keeper) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - ctx = ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) +func (k *Keeper) EndBlock(c context.Context) error { + ctx := sdk.UnwrapSDKContext(c).WithGasMeter(storetypes.NewInfiniteGasMeter()) bloom := gethcoretypes.BytesToBloom(k.EvmState.GetBlockBloomTransient(ctx).Bytes()) _ = ctx.EventManager().EmitTypedEvent(&evm.EventBlockBloom{ Bloom: eth.BloomToHex(bloom), }) // The bloom logic doesn't update the validator set. - return []abci.ValidatorUpdate{} + return nil } diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index c5c945daa9..e3c843873b 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -7,10 +7,10 @@ import ( "github.com/ethereum/go-ethereum/core/vm" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" @@ -111,7 +111,7 @@ func HandleOutOfGasPanic(err *error, format string) func() { return func() { if r := recover(); r != nil { switch r.(type) { - case sdk.ErrorOutOfGas: + case storetypes.ErrorOutOfGas: *err = vm.ErrOutOfGas default: panic(r) diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index e2c5e67c25..d0e799440d 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -242,12 +242,11 @@ func (s *Suite) TestEthereumTx_ABCI() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(69_420))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420))), )) - blockHeader := deps.Ctx.BlockHeader() // blockHeader := tmproto.Header{Height: deps.Ctx.BlockHeight()} - deps.App.BeginBlock(abci.RequestBeginBlock{Header: blockHeader}) + deps.App.BeginBlocker(deps.Ctx) to := evmtest.NewEthPrivAcc() evmTxMsg, err := evmtest.TxTransferWei{ Deps: &deps, @@ -262,9 +261,9 @@ func (s *Suite) TestEthereumTx_ABCI() { txBz, err := deps.App.GetTxConfig().TxEncoder()(blockTx) s.Require().NoError(err) - deliverTxResp := deps.App.DeliverTx(abci.RequestDeliverTx{Tx: txBz}) + deliverTxResp := deps.App.DeliverTx(txBz) s.Require().True(deliverTxResp.IsOK(), "%#v", deliverTxResp) - deps.App.EndBlock(abci.RequestEndBlock{Height: deps.Ctx.BlockHeight()}) + deps.App.EndBlocker(deps.Ctx) { r := deliverTxResp diff --git a/x/evm/keeper/vm_config.go b/x/evm/keeper/vm_config.go index 141f723a56..baa5573c56 100644 --- a/x/evm/keeper/vm_config.go +++ b/x/evm/keeper/vm_config.go @@ -60,7 +60,13 @@ func (k Keeper) GetCoinbaseAddress(ctx sdk.Context) common.Address { return common.Address{} } - return common.BytesToAddress(validator.GetOperator()) + addr, err := sdk.ValAddressFromBech32(validator.GetOperator()) + // TODO: handle error + if err != nil { + panic(err) + } + + return common.BytesToAddress(addr) } // ParseProposerAddr returns current block proposer's address when provided diff --git a/x/evm/msg.go b/x/evm/msg.go index faa8f61d9b..88f0f605b0 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -16,9 +16,11 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/cosmos/cosmos-sdk/x/auth/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + protov2 "google.golang.org/protobuf/proto" "github.com/NibiruChain/nibiru/v2/eth" @@ -186,6 +188,10 @@ func (msg *MsgEthereumTx) GetMsgs() []sdk.Msg { return []sdk.Msg{msg} } +func (msg *MsgEthereumTx) GetMsgsV2() ([]protov2.Message, error) { + return nil, errors.New("not implemented") +} + // GetSigners returns the expected signers for an Ethereum transaction message. // For such a message, there should exist only a single 'signer'. // @@ -230,7 +236,7 @@ func (msg *MsgEthereumTx) Sign(ethSigner gethcore.Signer, keyringSigner keyring. tx := msg.AsTransaction() txHash := ethSigner.Hash(tx) - sig, _, err := keyringSigner.SignByAddress(from, txHash.Bytes()) + sig, _, err := keyringSigner.SignByAddress(from, txHash.Bytes(), signing.SignMode_SIGN_MODE_TEXTUAL) if err != nil { return err } @@ -343,7 +349,7 @@ func (msg *MsgEthereumTx) UnmarshalBinary(b []byte) error { } // BuildTx builds the Cosmos-SDK [signing.Tx] from ethereum tx ([MsgEthereumTx]) -func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (signing.Tx, error) { +func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (authsigning.Tx, error) { builder, ok := b.(authtx.ExtensionOptionsTxBuilder) if !ok { return nil, errors.New("unsupported builder") diff --git a/x/evm/params.go b/x/evm/params.go index c8369649c8..42949c83ae 100644 --- a/x/evm/params.go +++ b/x/evm/params.go @@ -6,8 +6,8 @@ import ( sdkioerrors "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" - channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v8/modules/core/24-host" "github.com/ethereum/go-ethereum/core/vm" "golang.org/x/exp/slices" diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index e7a7eebb49..7cffe55749 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -727,9 +727,6 @@ func (p precompileFunToken) bankMsgSend( ToAddress: toBech32.String(), Amount: coin, } - if err := bankMsg.ValidateBasic(); err != nil { - return nil, err - } if _, err := bankkeeper.NewMsgServerImpl(p.evmKeeper.Bank).Send( sdk.WrapSDKContext(ctx), bankMsg, ); err != nil { diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index e8f46a9e28..ded466e35a 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -5,6 +5,7 @@ import ( "math/big" "testing" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" @@ -126,7 +127,7 @@ func (s *FuntokenSuite) TestHappyPath() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(69_420))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420))), )) s.Run("IFunToken.bankBalance()", func() { @@ -156,7 +157,7 @@ func (s *FuntokenSuite) TestHappyPath() { sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(69_420)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420)), ToEthAddr: eth.EIP55Addr{ Address: deps.Sender.EthAddr, }, @@ -272,7 +273,7 @@ func (s *FuntokenSuite) TestPrecompileLocalGas() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(funtoken.BankDenom, sdk.NewInt(1000))), + sdk.NewCoins(sdk.NewCoin(funtoken.BankDenom, sdkmath.NewInt(1000))), )) }) @@ -281,7 +282,7 @@ func (s *FuntokenSuite) TestPrecompileLocalGas() { sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(funtoken.BankDenom, sdk.NewInt(1000)), + BankCoin: sdk.NewCoin(funtoken.BankDenom, sdkmath.NewInt(1000)), ToEthAddr: eth.EIP55Addr{ Address: contractAddr, }, @@ -372,7 +373,7 @@ func (s *FuntokenSuite) TestSendToEvm_MadeFromCoin() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(bankDenom, sdk.NewInt(1234))), + sdk.NewCoins(sdk.NewCoin(bankDenom, sdkmath.NewInt(1234))), ) s.Require().NoError(err) diff --git a/x/evm/precompile/oracle_test.go b/x/evm/precompile/oracle_test.go index affb7b6662..0b48d201b7 100644 --- a/x/evm/precompile/oracle_test.go +++ b/x/evm/precompile/oracle_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" @@ -84,7 +85,7 @@ func (s *OracleSuite) TestOracle_HappyPath() { // 69 seconds + 420 nanoseconds === 69000 milliseconds for the // return value from the UnixMilli() function deps.Ctx = deps.Ctx.WithBlockTime(time.Unix(69, 420)).WithBlockHeight(69) - deps.App.OracleKeeper.SetPrice(deps.Ctx, "unibi:uusd", sdk.MustNewDecFromStr("0.067")) + deps.App.OracleKeeper.SetPrice(deps.Ctx, "unibi:uusd", sdkmath.LegacyMustNewDecFromStr("0.067")) resp, err := runQuery(deps.Ctx) s.NoError(err) diff --git a/x/evm/precompile/precompile.go b/x/evm/precompile/precompile.go index d812437b9e..6a6862a925 100644 --- a/x/evm/precompile/precompile.go +++ b/x/evm/precompile/precompile.go @@ -17,8 +17,8 @@ import ( "bytes" "fmt" + store "cosmossdk.io/store/types" "github.com/NibiruChain/collections" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gethabi "github.com/ethereum/go-ethereum/accounts/abi" gethcommon "github.com/ethereum/go-ethereum/common" @@ -209,7 +209,7 @@ func OnRunStart( } // Switching to a local gas meter to enforce gas limit check for a precompile - cacheCtx = cacheCtx.WithGasMeter(sdk.NewGasMeter(gasLimit)). + cacheCtx = cacheCtx.WithGasMeter(store.NewGasMeter(gasLimit)). WithKVGasConfig(store.KVGasConfig()). WithTransientKVGasConfig(store.TransientGasConfig()) @@ -244,7 +244,7 @@ func HandleOutOfGasPanic(err *error) func() { return func() { if r := recover(); r != nil { switch r.(type) { - case sdk.ErrorOutOfGas: + case store.ErrorOutOfGas: *err = vm.ErrOutOfGas default: panic(r) diff --git a/x/evm/precompile/wasm.go b/x/evm/precompile/wasm.go index 56f869e284..4679d289a2 100644 --- a/x/evm/precompile/wasm.go +++ b/x/evm/precompile/wasm.go @@ -3,6 +3,7 @@ package precompile import ( "fmt" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/core/tracing" @@ -330,7 +331,7 @@ func (p precompileWasm) executeMulti( for _, fund := range m.Funds { funds = append(funds, sdk.Coin{ Denom: fund.Denom, - Amount: sdk.NewIntFromBigInt(fund.Amount), + Amount: sdkmath.NewIntFromBigInt(fund.Amount), }) } respBz, e := p.Wasm.Execute(ctx, wasmContract, callerBech32, m.MsgArgs, funds) diff --git a/x/evm/precompile/wasm_parse.go b/x/evm/precompile/wasm_parse.go index 270050798c..5fbc3b8ce7 100644 --- a/x/evm/precompile/wasm_parse.go +++ b/x/evm/precompile/wasm_parse.go @@ -4,6 +4,7 @@ import ( "fmt" "math/big" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" wasm "github.com/CosmWasm/wasmd/x/wasm/types" @@ -43,7 +44,7 @@ func parseFundsArg(arg any) (funds sdk.Coins, err error) { // as an argument during the execution of a transaction. sdk.Coin{ Denom: coin.Denom, - Amount: sdk.NewIntFromBigInt(coin.Amount), + Amount: sdkmath.NewIntFromBigInt(coin.Amount), }, ) } diff --git a/x/evm/precompile/wasm_test.go b/x/evm/precompile/wasm_test.go index f91387d986..7e53ceff36 100644 --- a/x/evm/precompile/wasm_test.go +++ b/x/evm/precompile/wasm_test.go @@ -419,7 +419,7 @@ func (s *WasmSuite) TestExecuteMultiValidation() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(100))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(100))), )) wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) @@ -630,7 +630,7 @@ func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack4() { deps.App.BankKeeper, deps.Ctx, eth.EthAddrToNibiruAddr(testContractAddr), - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6))), )) }) @@ -704,7 +704,7 @@ func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack5() { deps.App.BankKeeper, deps.Ctx, eth.EthAddrToNibiruAddr(testContractAddr), - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6))), )) }) @@ -714,15 +714,15 @@ func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack5() { deps.App.BankKeeper, deps.Ctx, validator.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6))), )) createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(validator.NibiruAddr), + sdk.ValAddress(validator.NibiruAddr).String(), validator.PrivKey.PubKey(), - sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(10e6)), + sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6)), stakingtypes.NewDescription("validator0", "", "", "", ""), - stakingtypes.NewCommissionRates(sdk.NewDec(1), sdk.NewDec(1), sdk.NewDec(1)), + stakingtypes.NewCommissionRates(sdkmath.LegacyNewDec(1), sdkmath.LegacyNewDec(1), sdkmath.LegacyNewDec(1)), sdkmath.OneInt(), ) s.Require().NoError(err) @@ -760,7 +760,8 @@ func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack5() { wasmContractBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, wasmContract, evm.EVMBankDenom) s.Require().Equal(wasmContractBalance.Amount.BigInt(), big.NewInt(0)) - delegations := deps.App.StakingKeeper.GetAllDelegatorDelegations(deps.Ctx, wasmContract) + delegations, err := deps.App.StakingKeeper.GetAllDelegatorDelegations(deps.Ctx, wasmContract) + s.Require().NoError(err) s.Require().Equal(len(delegations), 1) s.Require().Equal(sdk.ValAddress(validator.NibiruAddr).String(), delegations[0].ValidatorAddress) diff --git a/x/evm/statedb/journal.go b/x/evm/statedb/journal.go index c7174e8bba..a67c640c74 100644 --- a/x/evm/statedb/journal.go +++ b/x/evm/statedb/journal.go @@ -21,7 +21,7 @@ import ( "math/big" "sort" - store "github.com/cosmos/cosmos-sdk/store/types" + store "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/holiman/uint256" diff --git a/x/evm/statedb/journal_test.go b/x/evm/statedb/journal_test.go index d052a0a1bc..4cf065fcf5 100644 --- a/x/evm/statedb/journal_test.go +++ b/x/evm/statedb/journal_test.go @@ -6,6 +6,7 @@ import ( "strings" "testing" + sdkmath "cosmossdk.io/math" "github.com/MakeNowJust/heredoc/v2" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/core/vm" @@ -87,7 +88,7 @@ func (s *Suite) TestContractCallsAnotherContract() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(69_420))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420))), )) deployResp, err := evmtest.DeployContract( @@ -166,7 +167,7 @@ func (s *Suite) TestJournalReversion() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(69_420))), + sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420))), )) s.T().Log("Set up helloworldcounter.wasm") diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index 16bad98cae..63e66280a8 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -22,7 +22,7 @@ import ( "math/big" "sort" - store "github.com/cosmos/cosmos-sdk/store/types" + store "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/stateless" diff --git a/x/genmsg/genesis.go b/x/genmsg/genesis.go index 7e1a994150..e2c73a1f84 100644 --- a/x/genmsg/genesis.go +++ b/x/genmsg/genesis.go @@ -16,9 +16,6 @@ func anyToMsg(ir types.InterfaceRegistry, anyMsg *types.Any) (sdk.Msg, error) { if err != nil { return nil, err } - if err = sdkMsg.ValidateBasic(); err != nil { - return nil, err - } return sdkMsg, nil } diff --git a/x/genmsg/integration_test.go b/x/genmsg/integration_test.go index 1af0509667..2b54559933 100644 --- a/x/genmsg/integration_test.go +++ b/x/genmsg/integration_test.go @@ -3,7 +3,6 @@ package genmsg_test import ( "testing" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -48,9 +47,7 @@ func TestGenmsgInGenesis(t *testing.T) { ) app, _ := testapp.NewNibiruTestApp(appGenesis) - ctx := app.NewContext(false, tmproto.Header{ - Height: 1, - }) + ctx := app.NewContext(false) balance, err := app.BankKeeper.Balance(ctx, &banktypes.QueryBalanceRequest{ Address: recvAddr.String(), diff --git a/x/genmsg/module.go b/x/genmsg/module.go index 98ff076c65..f48872fb80 100644 --- a/x/genmsg/module.go +++ b/x/genmsg/module.go @@ -38,6 +38,12 @@ type AppModule struct { func (a AppModule) Name() string { return ModuleName } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (a AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (a AppModule) IsAppModule() {} + func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(new(v1.GenesisState)) } diff --git a/x/inflation/client/cli/tx.go b/x/inflation/client/cli/tx.go index b9303762ff..7345696883 100644 --- a/x/inflation/client/cli/tx.go +++ b/x/inflation/client/cli/tx.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" "github.com/NibiruChain/nibiru/v2/x/inflation/types" @@ -135,17 +134,17 @@ $ nibid tx oracle edit-params --staking-proportion 0.6 --community-pool-proporti } if epochsPerPeriod, _ := cmd.Flags().GetUint64("epochs-per-period"); epochsPerPeriod != 0 { - epochsPerPeriodInt := sdk.NewIntFromUint64(epochsPerPeriod) + epochsPerPeriodInt := sdkmath.NewIntFromUint64(epochsPerPeriod) msg.EpochsPerPeriod = &epochsPerPeriodInt } if periodsPerYear, _ := cmd.Flags().GetUint64("periods-per-year"); periodsPerYear != 0 { - periodsPerYearInt := sdk.NewIntFromUint64(periodsPerYear) + periodsPerYearInt := sdkmath.NewIntFromUint64(periodsPerYear) msg.PeriodsPerYear = &periodsPerYearInt } if maxPeriod, _ := cmd.Flags().GetUint64("max-period"); maxPeriod != 0 { - maxPeriodInt := sdk.NewIntFromUint64(maxPeriod) + maxPeriodInt := sdkmath.NewIntFromUint64(maxPeriod) msg.MaxPeriod = &maxPeriodInt } diff --git a/x/inflation/genesis.go b/x/inflation/genesis.go index 07c47b0eca..5bb84a9073 100644 --- a/x/inflation/genesis.go +++ b/x/inflation/genesis.go @@ -12,7 +12,6 @@ func InitGenesis( ctx sdk.Context, k keeper.Keeper, ak types.AccountKeeper, - _ types.StakingKeeper, data types.GenesisState, ) { // Ensure inflation module account is set on genesis diff --git a/x/inflation/keeper/hooks.go b/x/inflation/keeper/hooks.go index 5c8dbbe36e..d4cff766a4 100644 --- a/x/inflation/keeper/hooks.go +++ b/x/inflation/keeper/hooks.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" - "github.com/armon/go-metrics" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/hashicorp/go-metrics" "github.com/NibiruChain/nibiru/v2/x/common/denoms" epochstypes "github.com/NibiruChain/nibiru/v2/x/epochs/types" diff --git a/x/inflation/keeper/hooks_test.go b/x/inflation/keeper/hooks_test.go index 891a39ab87..6e60899e0a 100644 --- a/x/inflation/keeper/hooks_test.go +++ b/x/inflation/keeper/hooks_test.go @@ -28,9 +28,11 @@ func TestEpochIdentifierAfterEpochEnd(t *testing.T) { params.InflationEnabled = true nibiruApp.InflationKeeper.Params.Set(ctx, params) - feePoolOld := nibiruApp.DistrKeeper.GetFeePool(ctx) + feePoolOld, err := nibiruApp.DistrKeeper.FeePool.Get(ctx) + require.NoError(t, err) nibiruApp.EpochsKeeper.AfterEpochEnd(ctx, epochstypes.DayEpochID, 1) - feePoolNew := nibiruApp.DistrKeeper.GetFeePool(ctx) + feePoolNew, err := nibiruApp.DistrKeeper.FeePool.Get(ctx) + require.NoError(t, err) require.Greater(t, feePoolNew.CommunityPool.AmountOf(denoms.NIBI).BigInt().Uint64(), feePoolOld.CommunityPool.AmountOf(denoms.NIBI).BigInt().Uint64()) diff --git a/x/inflation/keeper/inflation_test.go b/x/inflation/keeper/inflation_test.go index 0aee3a51da..c3f8f94655 100644 --- a/x/inflation/keeper/inflation_test.go +++ b/x/inflation/keeper/inflation_test.go @@ -105,7 +105,9 @@ func TestMintAndAllocateInflation(t *testing.T) { denoms.NIBI, ) - balanceCommunityPool := nibiruApp.DistrKeeper.GetFeePoolCommunityCoins(ctx) + communityPool, err := nibiruApp.DistrKeeper.FeePool.Get(ctx) + require.NoError(t, err) + balanceCommunityPool := communityPool.CommunityPool require.NoError(t, err, tc.name) assert.Equal(t, diff --git a/x/inflation/keeper/keeper.go b/x/inflation/keeper/keeper.go index e4274e6b0b..6f96c5189f 100644 --- a/x/inflation/keeper/keeper.go +++ b/x/inflation/keeper/keeper.go @@ -1,10 +1,10 @@ package keeper import ( + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/v2/x/inflation/types" diff --git a/x/inflation/module.go b/x/inflation/module.go index d05a3e4053..3b38ce2aca 100644 --- a/x/inflation/module.go +++ b/x/inflation/module.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + store "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -136,12 +136,12 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // BeginBlock returns the begin blocker for the inflation module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(_ context.Context) { } // EndBlock returns the end blocker for the inflation module. It returns no validator // updates. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(_ context.Context) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -151,7 +151,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.keeper, am.ak, am.sk, genesisState) + InitGenesis(ctx, am.keeper, am.ak, genesisState) return []abci.ValidatorUpdate{} } @@ -177,7 +177,7 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.Weight } // RegisterStoreDecoder registers a decoder for inflation module's types. -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) { } // WeightedOperations doesn't return any inflation module operation. diff --git a/x/inflation/types/interfaces.go b/x/inflation/types/interfaces.go index 1ab6ed971b..d36eb5ce48 100644 --- a/x/inflation/types/interfaces.go +++ b/x/inflation/types/interfaces.go @@ -1,49 +1,50 @@ package types // noalias import ( + context "context" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the contract required for account APIs. type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI - GetAccount(sdk.Context, sdk.AccAddress) types.AccountI - SetAccount(sdk.Context, types.AccountI) + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI + GetAccount(context.Context, sdk.AccAddress) sdk.AccountI + SetAccount(context.Context, sdk.AccountI) } // BankKeeper defines the contract needed to be fulfilled for banking and supply // dependencies. type BankKeeper interface { - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoinsFromAccountToModule( - ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, + ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error - MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error - HasSupply(ctx sdk.Context, denom string) bool - GetSupply(ctx sdk.Context, denom string) sdk.Coin + MintCoins(ctx context.Context, name string, amt sdk.Coins) error + BurnCoins(ctx context.Context, name string, amt sdk.Coins) error + HasSupply(ctx context.Context, denom string) bool + GetSupply(ctx context.Context, denom string) sdk.Coin } // DistrKeeper defines the contract needed to be fulfilled for distribution keeper type DistrKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } // StakingKeeper expected staking keeper type StakingKeeper interface { // BondedRatio the fraction of the staking tokens which are currently bonded - BondedRatio(ctx sdk.Context) sdkmath.LegacyDec - StakingTokenSupply(ctx sdk.Context) sdkmath.Int - TotalBondedTokens(ctx sdk.Context) sdkmath.Int + BondedRatio(ctx context.Context) (sdkmath.LegacyDec, error) + StakingTokenSupply(ctx context.Context) (sdkmath.Int, error) + TotalBondedTokens(ctx context.Context) (sdkmath.Int, error) } type SudoKeeper interface { - GetRootAddr(ctx sdk.Context) (sdk.AccAddress, error) - CheckPermissions(contract sdk.AccAddress, ctx sdk.Context) error + GetRootAddr(ctx context.Context) (sdk.AccAddress, error) + CheckPermissions(contract sdk.AccAddress, ctx context.Context) error } diff --git a/x/oracle/cli/tx.go b/x/oracle/cli/tx.go index edff316bf0..c7e75904f4 100644 --- a/x/oracle/cli/tx.go +++ b/x/oracle/cli/tx.go @@ -5,6 +5,7 @@ import ( "strings" "time" + "cosmossdk.io/math" "github.com/NibiruChain/nibiru/v2/x/common/asset" "github.com/NibiruChain/nibiru/v2/x/oracle/types" @@ -247,7 +248,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if voteThreshold, _ := cmd.Flags().GetString("vote-threshold"); voteThreshold != "" { - voteThresholdDec, err := sdk.NewDecFromStr(voteThreshold) + voteThresholdDec, err := math.LegacyNewDecFromStr(voteThreshold) if err != nil { return err } @@ -256,7 +257,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if rewardBand, _ := cmd.Flags().GetString("reward-band"); rewardBand != "" { - rewardBandDec, err := sdk.NewDecFromStr(rewardBand) + rewardBandDec, err := math.LegacyNewDecFromStr(rewardBand) if err != nil { return err } @@ -265,7 +266,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if slashFraction, _ := cmd.Flags().GetString("slash-fraction"); slashFraction != "" { - slashFractionDec, err := sdk.NewDecFromStr(slashFraction) + slashFractionDec, err := math.LegacyNewDecFromStr(slashFraction) if err != nil { return err } @@ -278,7 +279,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if minValidPerWindow, _ := cmd.Flags().GetString("min-valid-per-window"); minValidPerWindow != "" { - minValidPerWindowDec, err := sdk.NewDecFromStr(minValidPerWindow) + minValidPerWindowDec, err := math.LegacyNewDecFromStr(minValidPerWindow) if err != nil { return err } @@ -296,7 +297,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if validatorFeeRatio, _ := cmd.Flags().GetString("validator-fee-ratio"); validatorFeeRatio != "" { - validatorFeeRatioDec, err := sdk.NewDecFromStr(validatorFeeRatio) + validatorFeeRatioDec, err := math.LegacyNewDecFromStr(validatorFeeRatio) if err != nil { return err } diff --git a/x/oracle/keeper/ballot.go b/x/oracle/keeper/ballot.go index 5647cdbea4..0dd1cb8889 100644 --- a/x/oracle/keeper/ballot.go +++ b/x/oracle/keeper/ballot.go @@ -110,8 +110,13 @@ func (k Keeper) removeInvalidVotes( pairVotes map[asset.Pair]types.ExchangeRateVotes, whitelistedPairs set.Set[asset.Pair], ) { + totalTokenBonded, err := k.StakingKeeper.TotalBondedTokens(ctx) + if err != nil { + // TODO: Handle error + panic(err) + } totalBondedPower := sdk.TokensToConsensusPower( - k.StakingKeeper.TotalBondedTokens(ctx), k.StakingKeeper.PowerReduction(ctx), + totalTokenBonded, k.StakingKeeper.PowerReduction(ctx), ) // Iterate through sorted keys for deterministic ordering. diff --git a/x/oracle/keeper/ballot_test.go b/x/oracle/keeper/ballot_test.go index d19d075839..bc6576a4f2 100644 --- a/x/oracle/keeper/ballot_test.go +++ b/x/oracle/keeper/ballot_test.go @@ -10,7 +10,6 @@ import ( "github.com/NibiruChain/collections" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/staking" fuzz "github.com/google/gofuzz" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -36,7 +35,8 @@ func TestGroupVotesByPair(t *testing.T) { require.NoError(t, err) _, err = sh.CreateValidator(fixture.Ctx, NewTestMsgCreateValidator(ValAddrs[2], ValPubKeys[2], amt)) require.NoError(t, err) - staking.EndBlocker(fixture.Ctx, &fixture.StakingKeeper) + _, err = fixture.StakingKeeper.EndBlocker(fixture.Ctx) + require.NoError(t, err) pairBtc := asset.Registry.Pair(denoms.BTC, denoms.NUSD) pairEth := asset.Registry.Pair(denoms.ETH, denoms.NUSD) @@ -108,7 +108,8 @@ func TestClearVotesAndPrevotes(t *testing.T) { require.NoError(t, err) _, err = sh.CreateValidator(fixture.Ctx, NewTestMsgCreateValidator(ValAddrs[2], ValPubKeys[2], amt)) require.NoError(t, err) - staking.EndBlocker(fixture.Ctx, &fixture.StakingKeeper) + _, err = fixture.StakingKeeper.EndBlocker(fixture.Ctx) + require.NoError(t, err) btcVotes := types.ExchangeRateVotes{ types.NewExchangeRateVote(sdkmath.LegacyNewDec(17), asset.Registry.Pair(denoms.BTC, denoms.NUSD), ValAddrs[0], power), @@ -216,7 +217,8 @@ func TestTallyMissCount(t *testing.T) { require.NoError(t, err) _, err = sh.CreateValidator(fixture.Ctx, NewTestMsgCreateValidator(ValAddrs[2], ValPubKeys[2], amt)) require.NoError(t, err) - staking.EndBlocker(fixture.Ctx, &fixture.StakingKeeper) + _, err = fixture.StakingKeeper.EndBlocker(fixture.Ctx) + require.NoError(t, err) pairBtc := asset.Registry.Pair(denoms.BTC, denoms.NUSD) pairEth := asset.Registry.Pair(denoms.ETH, denoms.NUSD) diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 3e5d74f2c2..9f22dd75a1 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -4,11 +4,11 @@ import ( "fmt" "time" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdkioerrors "cosmossdk.io/errors" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -118,7 +118,11 @@ func (k Keeper) ValidateFeeder( } // Check that the given validator is in the active set for consensus. - if val := k.StakingKeeper.Validator(ctx, validatorAddr); val == nil || !val.IsBonded() { + val, err := k.StakingKeeper.Validator(ctx, validatorAddr) + if err != nil { + return err + } + if val == nil || !val.IsBonded() { return sdkioerrors.Wrapf( stakingtypes.ErrNoValidatorFound, "validator %s is not active set", validatorAddr.String()) diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index 2aeed42b31..19eff0dd96 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -6,7 +6,6 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" ) @@ -25,18 +24,24 @@ func TestValidateFeeder(t *testing.T) { require.NoError(t, err) _, err = sh.CreateValidator(ctx, NewTestMsgCreateValidator(addr1, val1, amt)) require.NoError(t, err) - staking.EndBlocker(ctx, &input.StakingKeeper) + input.StakingKeeper.EndBlocker(ctx) + params, err := input.StakingKeeper.GetParams(ctx) + require.NoError(t, err) require.Equal( t, input.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)), - sdk.NewCoins(sdk.NewCoin(input.StakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))), + sdk.NewCoins(sdk.NewCoin(params.BondDenom, InitTokens.Sub(amt))), ) - require.Equal(t, amt, input.StakingKeeper.Validator(ctx, addr).GetBondedTokens()) + validator, err := input.StakingKeeper.GetValidator(ctx, addr) + require.NoError(t, err) + require.Equal(t, amt, validator.GetBondedTokens()) require.Equal( t, input.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr1)), - sdk.NewCoins(sdk.NewCoin(input.StakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))), + sdk.NewCoins(sdk.NewCoin(params.BondDenom, InitTokens.Sub(amt))), ) - require.Equal(t, amt, input.StakingKeeper.Validator(ctx, addr1).GetBondedTokens()) + validator1, err := input.StakingKeeper.GetValidator(ctx, addr1) + require.NoError(t, err) + require.Equal(t, amt, validator1.GetBondedTokens()) require.NoError(t, input.OracleKeeper.ValidateFeeder(input.Ctx, sdk.AccAddress(addr), sdk.ValAddress(addr))) require.NoError(t, input.OracleKeeper.ValidateFeeder(input.Ctx, sdk.AccAddress(addr1), sdk.ValAddress(addr1))) @@ -47,8 +52,6 @@ func TestValidateFeeder(t *testing.T) { require.Error(t, input.OracleKeeper.ValidateFeeder(input.Ctx, Addrs[2], addr)) // only active validators can do oracle votes - validator, found := input.StakingKeeper.GetValidator(input.Ctx, addr) - require.True(t, found) validator.Status = stakingtypes.Unbonded input.StakingKeeper.SetValidator(input.Ctx, validator) require.Error(t, input.OracleKeeper.ValidateFeeder(input.Ctx, sdk.AccAddress(addr1), addr)) diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index 9e4fefa502..e6f1766741 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -155,7 +155,10 @@ func (ms msgServer) DelegateFeedConsent( } // Check the delegator is a validator - val := ms.StakingKeeper.Validator(ctx, operatorAddr) + val, err := ms.StakingKeeper.Validator(ctx, operatorAddr) + if err != nil { + return nil, err + } if val == nil { return nil, sdkioerrors.Wrap(stakingtypes.ErrNoValidatorFound, msg.Operator) } diff --git a/x/oracle/keeper/params_test.go b/x/oracle/keeper/params_test.go index 4e791b3bb0..3662cbeecc 100644 --- a/x/oracle/keeper/params_test.go +++ b/x/oracle/keeper/params_test.go @@ -5,7 +5,6 @@ import ( "time" sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/NibiruChain/nibiru/v2/x/common/asset" @@ -60,11 +59,11 @@ func TestMergeOracleParams(t *testing.T) { // baseParams votePeriod := uint64(10) - voteThreshold := sdk.NewDecWithPrec(33, 2) - changedVoteThreshold := sdk.NewDecWithPrec(50, 2) + voteThreshold := sdkmath.LegacyNewDecWithPrec(33, 2) + changedVoteThreshold := sdkmath.LegacyNewDecWithPrec(50, 2) - oracleRewardBand := sdk.NewDecWithPrec(1, 2) - changedRewardBand := sdk.NewDecWithPrec(2, 2) + oracleRewardBand := sdkmath.LegacyNewDecWithPrec(1, 2) + changedRewardBand := sdkmath.LegacyNewDecWithPrec(2, 2) whitelist := []asset.Pair{ asset.Registry.Pair(denoms.BTC, denoms.NUSD), @@ -75,14 +74,14 @@ func TestMergeOracleParams(t *testing.T) { asset.Registry.Pair(denoms.ADA, denoms.NUSD), } - slashFraction := sdk.NewDecWithPrec(1, 2) - changedSlashFraction := sdk.NewDecWithPrec(2, 2) + slashFraction := sdkmath.LegacyNewDecWithPrec(1, 2) + changedSlashFraction := sdkmath.LegacyNewDecWithPrec(2, 2) slashWindow := uint64(1000) changedSlashWindow := uint64(2000) - minValidPerWindow := sdk.NewDecWithPrec(1, 4) - changedMinValidPerWindow := sdk.NewDecWithPrec(2, 4) + minValidPerWindow := sdkmath.LegacyNewDecWithPrec(1, 4) + changedMinValidPerWindow := sdkmath.LegacyNewDecWithPrec(2, 4) twapLoopbackWindow := time.Duration(1000) changedTwapLoopbackWindow := time.Duration(2000) @@ -90,8 +89,8 @@ func TestMergeOracleParams(t *testing.T) { minVoters := uint64(4) chagedMinVoters := uint64(5) - minFeeRatio := sdk.NewDecWithPrec(1, 2) - changedMinFeeRatio := sdk.NewDecWithPrec(2, 2) + minFeeRatio := sdkmath.LegacyNewDecWithPrec(1, 2) + changedMinFeeRatio := sdkmath.LegacyNewDecWithPrec(2, 2) expirationBlocks := uint64(100) changedExpirationBlocks := uint64(200) diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go index 76669cd21c..57023160e3 100644 --- a/x/oracle/keeper/reward.go +++ b/x/oracle/keeper/reward.go @@ -43,7 +43,11 @@ func (k Keeper) rewardWinners( var distributedRewards sdk.Coins for _, validatorPerformance := range validatorPerformances { - validator := k.StakingKeeper.Validator(ctx, validatorPerformance.ValAddress) + validator, err := k.StakingKeeper.Validator(ctx, validatorPerformance.ValAddress) + // TODO: Handle error + if err != nil { + return + } if validator == nil { continue } diff --git a/x/oracle/keeper/reward_test.go b/x/oracle/keeper/reward_test.go index 11a65434cb..9eb8583237 100644 --- a/x/oracle/keeper/reward_test.go +++ b/x/oracle/keeper/reward_test.go @@ -49,7 +49,8 @@ func TestKeeperRewardsDistributionMultiVotePeriods(t *testing.T) { fixture.OracleKeeper.UpdateExchangeRates(fixture.Ctx) for valIndex := 0; valIndex < validators; valIndex++ { - distributionRewards := fixture.DistrKeeper.GetValidatorOutstandingRewards(fixture.Ctx, ValAddrs[0]) + distributionRewards, err := fixture.DistrKeeper.GetValidatorOutstandingRewards(fixture.Ctx, ValAddrs[0]) + require.NoError(t, err) truncatedGot, _ := distributionRewards.Rewards. QuoDec(sdkmath.LegacyNewDec(int64(i))). // outstanding rewards will count for the previous vote period too, so we divide it by current period TruncateDecimal() // NOTE: not applying this on truncatedExpected because of rounding the test fails diff --git a/x/oracle/keeper/slash.go b/x/oracle/keeper/slash.go index eb521357bc..d8b35c6746 100644 --- a/x/oracle/keeper/slash.go +++ b/x/oracle/keeper/slash.go @@ -32,18 +32,22 @@ func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) { // Penalize the validator whose the valid vote rate is smaller than min threshold if validVoteRate.LT(minValidPerWindow) { - validator := k.StakingKeeper.Validator(ctx, operator) + validator, err := k.StakingKeeper.Validator(ctx, operator) + if err != nil { + // TODO: Handle error + panic(err) + } if validator.IsBonded() && !validator.IsJailed() { consAddr, err := validator.GetConsAddr() if err != nil { - k.Logger(ctx).Error("fail to get consensus address", "validator", validator.GetOperator().String()) + k.Logger(ctx).Error("fail to get consensus address", "validator", validator.GetOperator()) continue } k.slashingKeeper.Slash( ctx, consAddr, slashFraction, validator.GetConsensusPower(powerReduction), distributionHeight, ) - k.Logger(ctx).Info("oracle slash", "validator", consAddr.String(), "fraction", slashFraction.String()) + k.Logger(ctx).Info("oracle slash", "validator", consAddr, "fraction", slashFraction.String()) k.slashingKeeper.Jail(ctx, consAddr) } } diff --git a/x/oracle/keeper/slash_test.go b/x/oracle/keeper/slash_test.go index 190a8d5946..e4670a8a72 100644 --- a/x/oracle/keeper/slash_test.go +++ b/x/oracle/keeper/slash_test.go @@ -7,7 +7,6 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" @@ -32,18 +31,25 @@ func TestSlashAndResetMissCounters(t *testing.T) { require.NoError(t, err) _, err = sh.CreateValidator(ctx, NewTestMsgCreateValidator(addr1, val1, amt)) require.NoError(t, err) - staking.EndBlocker(ctx, &input.StakingKeeper) + _, err = input.StakingKeeper.EndBlocker(ctx) + require.NoError(t, err) + params, err := input.StakingKeeper.GetParams(ctx) + require.NoError(t, err) require.Equal( t, input.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)), - sdk.NewCoins(sdk.NewCoin(input.StakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))), + sdk.NewCoins(sdk.NewCoin(params.BondDenom, InitTokens.Sub(amt))), ) - require.Equal(t, amt, input.StakingKeeper.Validator(ctx, addr).GetBondedTokens()) + validator, err := input.StakingKeeper.GetValidator(ctx, addr) + require.NoError(t, err) + require.Equal(t, amt, validator.GetBondedTokens()) require.Equal( t, input.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr1)), - sdk.NewCoins(sdk.NewCoin(input.StakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))), + sdk.NewCoins(sdk.NewCoin(params.BondDenom, InitTokens.Sub(amt))), ) - require.Equal(t, amt, input.StakingKeeper.Validator(ctx, addr1).GetBondedTokens()) + validator1, err := input.StakingKeeper.GetValidator(ctx, addr1) + require.NoError(t, err) + require.Equal(t, amt, validator1.GetBondedTokens()) votePeriodsPerWindow := sdkmath.LegacyNewDec(int64(input.OracleKeeper.SlashWindow(input.Ctx))).QuoInt64(int64(input.OracleKeeper.VotePeriod(input.Ctx))).TruncateInt64() slashFraction := input.OracleKeeper.SlashFraction(input.Ctx) @@ -51,9 +57,9 @@ func TestSlashAndResetMissCounters(t *testing.T) { // Case 1, no slash input.OracleKeeper.MissCounters.Insert(input.Ctx, ValAddrs[0], uint64(votePeriodsPerWindow-minValidVotes)) input.OracleKeeper.SlashAndResetMissCounters(input.Ctx) - staking.EndBlocker(input.Ctx, &input.StakingKeeper) + _, err = input.StakingKeeper.EndBlocker(ctx) + require.NoError(t, err) - validator, _ := input.StakingKeeper.GetValidator(input.Ctx, ValAddrs[0]) require.Equal(t, amt, validator.GetBondedTokens()) // Case 2, slash @@ -131,7 +137,8 @@ func TestInvalidVotesSlashing(t *testing.T) { require.Equal(t, i+1, input.OracleKeeper.MissCounters.GetOr(input.Ctx, ValAddrs[1], 0)) } - validator := input.StakingKeeper.Validator(input.Ctx, ValAddrs[1]) + validator, err := input.StakingKeeper.Validator(input.Ctx, ValAddrs[1]) + require.NoError(t, err) require.Equal(t, testStakingAmt, validator.GetBondedTokens()) // one more miss vote will inccur ValAddrs[1] slashing @@ -160,7 +167,8 @@ func TestInvalidVotesSlashing(t *testing.T) { input.OracleKeeper.SlashAndResetMissCounters(input.Ctx) // input.OracleKeeper.UpdateExchangeRates(input.Ctx) - validator = input.StakingKeeper.Validator(input.Ctx, ValAddrs[1]) + validator, err = input.StakingKeeper.Validator(input.Ctx, ValAddrs[1]) + require.NoError(t, err) require.Equal(t, sdkmath.LegacyOneDec().Sub(slashFraction).MulInt(testStakingAmt).TruncateInt(), validator.GetBondedTokens()) } @@ -200,7 +208,8 @@ func TestWhitelistSlashing(t *testing.T) { } t.Log("valoper0 should not be slashed") - validator := input.StakingKeeper.Validator(input.Ctx, ValAddrs[0]) + validator, err := input.StakingKeeper.Validator(input.Ctx, ValAddrs[0]) + require.NoError(t, err) require.Equal(t, testStakingAmt, validator.GetBondedTokens()) } @@ -264,6 +273,7 @@ func TestAbstainSlashing(t *testing.T) { require.Equal(t, uint64(0), input.OracleKeeper.MissCounters.GetOr(input.Ctx, ValAddrs[1], 0)) } - validator := input.StakingKeeper.Validator(input.Ctx, ValAddrs[1]) + validator, err := input.StakingKeeper.Validator(input.Ctx, ValAddrs[1]) + require.NoError(t, err) require.Equal(t, testStakingAmt, validator.GetBondedTokens()) } diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index 50b65e8bae..3f91fd36dd 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -5,28 +5,30 @@ import ( "testing" "time" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/nibiru/v2/x/common/denoms" "github.com/NibiruChain/nibiru/v2/x/oracle/types" "github.com/NibiruChain/nibiru/v2/x/sudo" sudokeeper "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" - dbm "github.com/cometbft/cometbft-db" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/secp256k1" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/std" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -135,20 +137,20 @@ type TestFixture struct { // CreateTestFixture nolint // Creates a base app, with 5 accounts, func CreateTestFixture(t *testing.T) TestFixture { - keyAcc := sdk.NewKVStoreKey(authtypes.StoreKey) - keyBank := sdk.NewKVStoreKey(banktypes.StoreKey) - keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) - tKeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) - keyOracle := sdk.NewKVStoreKey(types.StoreKey) - keyStaking := sdk.NewKVStoreKey(stakingtypes.StoreKey) - keySlashing := sdk.NewKVStoreKey(slashingtypes.StoreKey) - keyDistr := sdk.NewKVStoreKey(distrtypes.StoreKey) - keySudo := sdk.NewKVStoreKey(sudotypes.StoreKey) + keyAcc := storetypes.NewKVStoreKey(authtypes.StoreKey) + keyBank := storetypes.NewKVStoreKey(banktypes.StoreKey) + keyParams := storetypes.NewKVStoreKey(paramstypes.StoreKey) + tKeyParams := storetypes.NewTransientStoreKey(paramstypes.TStoreKey) + keyOracle := storetypes.NewKVStoreKey(types.StoreKey) + keyStaking := storetypes.NewKVStoreKey(stakingtypes.StoreKey) + keySlashing := storetypes.NewKVStoreKey(slashingtypes.StoreKey) + keyDistr := storetypes.NewKVStoreKey(distrtypes.StoreKey) + keySudo := storetypes.NewKVStoreKey(sudotypes.StoreKey) govModuleAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) + ms := store.NewCommitMultiStore(db, nil, nil) ctx := sdk.NewContext(ms, tmproto.Header{Time: time.Now().UTC(), Height: 1}, false, log.NewNopLogger()) encodingConfig := MakeEncodingConfig(t) appCodec, legacyAmino := encodingConfig.Codec, encodingConfig.Amino @@ -182,18 +184,20 @@ func CreateTestFixture(t *testing.T) TestFixture { accountKeeper := authkeeper.NewAccountKeeper( appCodec, - keyAcc, + runtime.NewKVStoreService(keyAcc), authtypes.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), sdk.GetConfig().GetBech32AccountAddrPrefix(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) bankKeeper := bankkeeper.NewBaseKeeper( appCodec, - keyBank, + runtime.NewKVStoreService(keyBank), accountKeeper, blackListAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + log.NewNopLogger(), ) totalSupply := sdk.NewCoins(sdk.NewCoin(denoms.NIBI, InitTokens.MulRaw(int64(len(Addrs)*10)))) @@ -201,29 +205,31 @@ func CreateTestFixture(t *testing.T) TestFixture { stakingKeeper := stakingkeeper.NewKeeper( appCodec, - keyStaking, + runtime.NewKVStoreService(keyStaking), accountKeeper, bankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), ) stakingParams := stakingtypes.DefaultParams() stakingParams.BondDenom = denoms.NIBI stakingKeeper.SetParams(ctx, stakingParams) - slashingKeeper := slashingkeeper.NewKeeper(appCodec, legacyAmino, keySlashing, stakingKeeper, govModuleAddr) + slashingKeeper := slashingkeeper.NewKeeper(appCodec, legacyAmino, runtime.NewKVStoreService(keySlashing), stakingKeeper, govModuleAddr) distrKeeper := distrkeeper.NewKeeper( appCodec, - keyDistr, + runtime.NewKVStoreService(keyDistr), accountKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - distrKeeper.SetFeePool(ctx, distrtypes.InitialFeePool()) + distrKeeper.FeePool.Set(ctx, distrtypes.InitialFeePool()) distrParams := distrtypes.DefaultParams() distrParams.CommunityTax = sdkmath.LegacyNewDecWithPrec(2, 2) - distrKeeper.SetParams(ctx, distrParams) + distrKeeper.Params.Set(ctx, distrParams) stakingKeeper.SetHooks(stakingtypes.NewMultiStakingHooks(distrKeeper.Hooks())) feeCollectorAcc := authtypes.NewEmptyModuleAccount(authtypes.FeeCollectorName) @@ -285,7 +291,7 @@ func NewTestMsgCreateValidator( ) *stakingtypes.MsgCreateValidator { commission := stakingtypes.NewCommissionRates(sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec()) msg, _ := stakingtypes.NewMsgCreateValidator( - address, pubKey, sdk.NewCoin(denoms.NIBI, amt), + address.String(), pubKey, sdk.NewCoin(denoms.NIBI, amt), stakingtypes.Description{}, commission, sdkmath.OneInt(), ) @@ -338,7 +344,8 @@ func Setup(t *testing.T) (TestFixture, types.MsgServer) { require.NoError(t, err) _, err = sh.CreateValidator(fixture.Ctx, NewTestMsgCreateValidator(ValAddrs[4], ValPubKeys[4], testStakingAmt)) require.NoError(t, err) - staking.EndBlocker(fixture.Ctx, &fixture.StakingKeeper) + _, err = fixture.StakingKeeper.EndBlocker(fixture.Ctx) + require.NoError(t, err) return fixture, h } diff --git a/x/oracle/keeper/update_exchange_rates.go b/x/oracle/keeper/update_exchange_rates.go index 177b4eaba2..212130c31e 100644 --- a/x/oracle/keeper/update_exchange_rates.go +++ b/x/oracle/keeper/update_exchange_rates.go @@ -130,23 +130,34 @@ func (k Keeper) clearExchangeRates(ctx sdk.Context, pairVotes map[asset.Pair]typ func (k Keeper) newValidatorPerformances(ctx sdk.Context) types.ValidatorPerformances { validatorPerformances := make(map[string]types.ValidatorPerformance) - maxValidators := k.StakingKeeper.MaxValidators(ctx) + maxValidators, err := k.StakingKeeper.MaxValidators(ctx) + if err != nil { + // TODO: Handle error + panic(err) + } powerReduction := k.StakingKeeper.PowerReduction(ctx) - iterator := k.StakingKeeper.ValidatorsPowerStoreIterator(ctx) + iterator, err := k.StakingKeeper.ValidatorsPowerStoreIterator(ctx) + if err != nil { + k.Logger(ctx).Error("failed to get validators power store iterator", "error", err) + panic(err) + } defer iterator.Close() for i := 0; iterator.Valid() && i < int(maxValidators); iterator.Next() { - validator := k.StakingKeeper.Validator(ctx, iterator.Value()) - + validator, err := k.StakingKeeper.Validator(ctx, iterator.Value()) + if err != nil { + // TODO: Handle error + panic(err) + } // exclude not bonded if !validator.IsBonded() { continue } valAddr := validator.GetOperator() - validatorPerformances[valAddr.String()] = types.NewValidatorPerformance( - validator.GetConsensusPower(powerReduction), valAddr, + validatorPerformances[valAddr] = types.NewValidatorPerformance( + validator.GetConsensusPower(powerReduction), sdk.ValAddress(valAddr), ) i++ } diff --git a/x/oracle/keeper/update_exchange_rates_test.go b/x/oracle/keeper/update_exchange_rates_test.go index 4076593aff..42f37ca1a6 100644 --- a/x/oracle/keeper/update_exchange_rates_test.go +++ b/x/oracle/keeper/update_exchange_rates_test.go @@ -171,8 +171,10 @@ func TestOracleTally(t *testing.T) { validatorPerformances := make(types.ValidatorPerformances) for _, valAddr := range valAddrs { + val, err := stakingKeeper.Validator(fixture.Ctx, valAddr) + assert.NoError(t, err) validatorPerformances[valAddr.String()] = types.NewValidatorPerformance( - stakingKeeper.Validator(fixture.Ctx, valAddr).GetConsensusPower(sdk.DefaultPowerReduction), + val.GetConsensusPower(sdk.DefaultPowerReduction), valAddr, ) } @@ -187,8 +189,10 @@ func TestOracleTally(t *testing.T) { expectedValidatorPerformances := make(types.ValidatorPerformances) for _, valAddr := range valAddrs { + val, err := stakingKeeper.Validator(fixture.Ctx, valAddr) + assert.NoError(t, err) expectedValidatorPerformances[valAddr.String()] = types.NewValidatorPerformance( - stakingKeeper.Validator(fixture.Ctx, valAddr).GetConsensusPower(sdk.DefaultPowerReduction), + val.GetConsensusPower(sdk.DefaultPowerReduction), valAddr, ) } @@ -373,13 +377,17 @@ func TestOracleExchangeRate(t *testing.T) { expectedRewardAmt := sdk.NewDecCoinsFromCoins(ethUsdRewards, atomUsdRewards). QuoDec(sdkmath.LegacyNewDec(8)). // total votes MulDec(sdkmath.LegacyNewDec(2)) // votes won by val1 and val2 - rewards := input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[0]) + rewards, err := input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[0]) + assert.NoError(t, err) assert.Equalf(t, expectedRewardAmt, rewards.Rewards, "%s <-> %s", expectedRewardAmt, rewards.Rewards) - rewards = input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[1]) + rewards, err = input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[1]) + assert.NoError(t, err) assert.Equalf(t, expectedRewardAmt, rewards.Rewards, "%s <-> %s", expectedRewardAmt, rewards.Rewards) - rewards = input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[2]) + rewards, err = input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[2]) + assert.NoError(t, err) assert.Equalf(t, expectedRewardAmt, rewards.Rewards, "%s <-> %s", expectedRewardAmt, rewards.Rewards) - rewards = input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[3]) + rewards, err = input.DistrKeeper.GetValidatorOutstandingRewards(input.Ctx.WithBlockHeight(2), ValAddrs[3]) + assert.NoError(t, err) assert.Equalf(t, expectedRewardAmt, rewards.Rewards, "%s <-> %s", expectedRewardAmt, rewards.Rewards) } diff --git a/x/oracle/module.go b/x/oracle/module.go index f7dff89ac7..b5afe38c29 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -16,10 +16,10 @@ import ( abci "github.com/cometbft/cometbft/abci/types" + store "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -164,10 +164,10 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns the begin blocker for the oracle module. -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} +func (AppModule) BeginBlock(_ sdk.Context) {} // EndBlock returns the end blocker for the oracle module. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(ctx sdk.Context) []abci.ValidatorUpdate { EndBlocker(ctx, am.keeper) return []abci.ValidatorUpdate{} } @@ -188,7 +188,7 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.Weight } // RegisterStoreDecoder registers a decoder for oracle module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) } diff --git a/x/oracle/simulation/genesis.go b/x/oracle/simulation/genesis.go index 676a3da6d3..b2af50089d 100644 --- a/x/oracle/simulation/genesis.go +++ b/x/oracle/simulation/genesis.go @@ -64,31 +64,31 @@ func GenMinValidPerWindow(r *rand.Rand) sdkmath.LegacyDec { func RandomizedGenState(simState *module.SimulationState) { var voteThreshold sdkmath.LegacyDec simState.AppParams.GetOrGenerate( - simState.Cdc, voteThresholdKey, &voteThreshold, simState.Rand, + voteThresholdKey, &voteThreshold, simState.Rand, func(r *rand.Rand) { voteThreshold = GenVoteThreshold(r) }, ) var rewardBand sdkmath.LegacyDec simState.AppParams.GetOrGenerate( - simState.Cdc, rewardBandKey, &rewardBand, simState.Rand, + rewardBandKey, &rewardBand, simState.Rand, func(r *rand.Rand) { rewardBand = GenRewardBand(r) }, ) var slashFraction sdkmath.LegacyDec simState.AppParams.GetOrGenerate( - simState.Cdc, slashFractionKey, &slashFraction, simState.Rand, + slashFractionKey, &slashFraction, simState.Rand, func(r *rand.Rand) { slashFraction = GenSlashFraction(r) }, ) var slashWindow uint64 simState.AppParams.GetOrGenerate( - simState.Cdc, slashWindowKey, &slashWindow, simState.Rand, + slashWindowKey, &slashWindow, simState.Rand, func(r *rand.Rand) { slashWindow = GenSlashWindow(r) }, ) var minValidPerWindow sdkmath.LegacyDec simState.AppParams.GetOrGenerate( - simState.Cdc, minValidPerWindowKey, &minValidPerWindow, simState.Rand, + minValidPerWindowKey, &minValidPerWindow, simState.Rand, func(r *rand.Rand) { minValidPerWindow = GenMinValidPerWindow(r) }, ) diff --git a/x/oracle/simulation/operations.go b/x/oracle/simulation/operations.go index dce4a13952..1576909d31 100644 --- a/x/oracle/simulation/operations.go +++ b/x/oracle/simulation/operations.go @@ -52,19 +52,19 @@ func WeightedOperations( weightMsgAggregateExchangeRateVote int weightMsgDelegateFeedConsent int ) - appParams.GetOrGenerate(cdc, OpWeightMsgAggregateExchangeRatePrevote, &weightMsgAggregateExchangeRatePrevote, nil, + appParams.GetOrGenerate(OpWeightMsgAggregateExchangeRatePrevote, &weightMsgAggregateExchangeRatePrevote, nil, func(_ *rand.Rand) { weightMsgAggregateExchangeRatePrevote = params.DefaultWeightMsgSend * 2 }, ) - appParams.GetOrGenerate(cdc, OpWeightMsgAggregateExchangeRateVote, &weightMsgAggregateExchangeRateVote, nil, + appParams.GetOrGenerate(OpWeightMsgAggregateExchangeRateVote, &weightMsgAggregateExchangeRateVote, nil, func(_ *rand.Rand) { weightMsgAggregateExchangeRateVote = params.DefaultWeightMsgSend * 2 }, ) - appParams.GetOrGenerate(cdc, OpWeightMsgDelegateFeedConsent, &weightMsgDelegateFeedConsent, nil, + appParams.GetOrGenerate(OpWeightMsgDelegateFeedConsent, &weightMsgDelegateFeedConsent, nil, func(_ *rand.Rand) { weightMsgDelegateFeedConsent = params.DefaultWeightMsgDelegate // TODO: temp fix }, @@ -96,7 +96,10 @@ func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.Ba address := sdk.ValAddress(simAccount.Address) // ensure the validator exists - val := k.StakingKeeper.Validator(ctx, address) + val, err := k.StakingKeeper.Validator(ctx, address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + } if val == nil || !val.IsBonded() { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "unable to find validator"), nil, nil } @@ -146,7 +149,7 @@ func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.Ba voteHashMap[address.String()] = exchangeRatesStr - return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil + return simtypes.NewOperationMsg(msg, true, ""), nil, nil } } @@ -160,7 +163,10 @@ func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankK address := sdk.ValAddress(simAccount.Address) // ensure the validator exists - val := k.StakingKeeper.Validator(ctx, address) + val, err := k.StakingKeeper.Validator(ctx, address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + } if val == nil || !val.IsBonded() { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRateVote, "unable to find validator"), nil, nil } @@ -215,7 +221,7 @@ func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankK return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil + return simtypes.NewOperationMsg(msg, true, ""), nil, nil } } @@ -232,13 +238,19 @@ func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, account := ak.GetAccount(ctx, simAccount.Address) // ensure the validator exists - val := k.StakingKeeper.Validator(ctx, valAddress) + val, err := k.StakingKeeper.Validator(ctx, valAddress) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + } if val == nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDelegateFeedConsent, "unable to find validator"), nil, nil } // ensure the target address is not a validator - val2 := k.StakingKeeper.Validator(ctx, delegateValAddress) + val2, err := k.StakingKeeper.Validator(ctx, delegateValAddress) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + } if val2 != nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDelegateFeedConsent, "unable to delegate to validator"), nil, nil } @@ -272,6 +284,6 @@ func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil + return simtypes.NewOperationMsg(msg, true, ""), nil, nil } } diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go index f562f0c0dc..f4b020c753 100644 --- a/x/oracle/types/ballot_test.go +++ b/x/oracle/types/ballot_test.go @@ -132,7 +132,9 @@ func TestPBPower(t *testing.T) { totalPower := int64(0) for i := 0; i < len(sk.Validators()); i++ { - power := sk.Validator(ctx, valAccAddrs[i]).GetConsensusPower(sdk.DefaultPowerReduction) + validator, err := sk.Validator(ctx, valAccAddrs[i]) + require.NoError(t, err) + power := validator.GetConsensusPower(sdk.DefaultPowerReduction) vote := types.NewExchangeRateVote( sdkmath.LegacyZeroDec(), asset.Registry.Pair(denoms.ETH, denoms.NUSD), diff --git a/x/oracle/types/expected_keeper.go b/x/oracle/types/expected_keeper.go index a84e47cc08..c010ad050e 100644 --- a/x/oracle/types/expected_keeper.go +++ b/x/oracle/types/expected_keeper.go @@ -1,50 +1,53 @@ package types import ( + context "context" + + corestore "cosmossdk.io/core/store" + "cosmossdk.io/math" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // StakingKeeper is expected keeper for staking module type StakingKeeper interface { - Validator(ctx sdk.Context, address sdk.ValAddress) stakingtypes.ValidatorI // get validator by operator address; nil when validator not found - TotalBondedTokens(sdk.Context) sdkmath.Int // total bonded tokens within the validator set - Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdkmath.LegacyDec) sdkmath.Int // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction - Jail(sdk.Context, sdk.ConsAddress) // jail a validator - ValidatorsPowerStoreIterator(ctx sdk.Context) sdk.Iterator // an iterator for the current validator power store - MaxValidators(sdk.Context) uint32 // MaxValidators returns the maximum amount of bonded validators - PowerReduction(ctx sdk.Context) (res sdkmath.Int) + Validator(ctx context.Context, address sdk.ValAddress) (stakingtypes.ValidatorI, error) // get validator by operator address; nil when validator not found + TotalBondedTokens(context.Context) (sdkmath.Int, error) // total bonded tokens within the validator set + Slash(context.Context, sdk.ConsAddress, int64, int64, sdkmath.LegacyDec) (sdkmath.Int, error) // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction + Jail(context.Context, sdk.ConsAddress) error // jail a validator + ValidatorsPowerStoreIterator(ctx context.Context) (corestore.Iterator, error) // an iterator for the current validator power store + MaxValidators(context.Context) (uint32, error) // MaxValidators returns the maximum amount of bonded validators + PowerReduction(ctx context.Context) (res sdkmath.Int) } type SlashingKeeper interface { - Slash(ctx sdk.Context, consAddr sdk.ConsAddress, fraction sdkmath.LegacyDec, power int64, height int64) - Jail(sdk.Context, sdk.ConsAddress) + Slash(ctx context.Context, consAddr sdk.ConsAddress, fraction math.LegacyDec, power int64, height int64) error + Jail(context.Context, sdk.ConsAddress) error } // DistributionKeeper is expected keeper for distribution module type DistributionKeeper interface { - AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) + AllocateTokensToValidator(ctx context.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) error // only used for simulation - GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) sdk.DecCoins + GetValidatorOutstandingRewardsCoins(ctx context.Context, val sdk.ValAddress) (sdk.DecCoins, error) } // AccountKeeper is expected keeper for auth module type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // only used for simulation } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToModule(ctx context.Context, senderModule string, recipientModule string, amt sdk.Coins) error // only used for simulation - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins } type SudoKeeper interface { diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go index ecaf3c6cca..4f2b52f99e 100644 --- a/x/oracle/types/msgs.go +++ b/x/oracle/types/msgs.go @@ -5,6 +5,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkioerrors "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -139,7 +140,7 @@ func (msg MsgAggregateExchangeRateVote) ValidateBasic() error { for _, exchangeRate := range exchangeRates { // Check overflow bit length - if exchangeRate.ExchangeRate.BigInt().BitLen() > 255+sdk.DecimalPrecisionBits { + if exchangeRate.ExchangeRate.BigInt().BitLen() > 255+sdkmath.LegacyDecimalPrecisionBits { return sdkioerrors.Wrap(ErrInvalidExchangeRate, "overflow") } } diff --git a/x/oracle/types/test_utils.go b/x/oracle/types/test_utils.go index ce0a08f4fe..5fad3fd166 100644 --- a/x/oracle/types/test_utils.go +++ b/x/oracle/types/test_utils.go @@ -2,11 +2,13 @@ package types import ( + context "context" "math" "math/rand" "time" sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -37,7 +39,7 @@ func GenerateRandomTestCase() (rates []float64, valAddrs []sdk.ValAddress, staki valAddrs = append(valAddrs, valAddr) power := rand.Int63()%1000 + 1 - mockValidator := NewMockValidator(valAddr, power) + mockValidator := NewMockValidator(valAddr.String(), power) mockValidators = append(mockValidators, mockValidator) } @@ -66,47 +68,49 @@ func (sk DummyStakingKeeper) Validators() []MockValidator { } // Validator nolint -func (sk DummyStakingKeeper) Validator(ctx sdk.Context, address sdk.ValAddress) stakingtypes.ValidatorI { +func (sk DummyStakingKeeper) Validator(ctx context.Context, address sdk.ValAddress) (stakingtypes.ValidatorI, error) { for _, validator := range sk.validators { - if validator.GetOperator().Equals(address) { - return validator + if sdk.ValAddress(validator.GetOperator()).Equals(address) { + return validator, nil } } - return nil + return nil, nil } // TotalBondedTokens nolint -func (DummyStakingKeeper) TotalBondedTokens(_ sdk.Context) sdk.Int { - return sdkmath.ZeroInt() +func (DummyStakingKeeper) TotalBondedTokens(_ context.Context) (sdkmath.Int, error) { + return sdkmath.ZeroInt(), nil } // Slash nolint -func (DummyStakingKeeper) Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdkmath.LegacyDec) sdkmath.Int { - return sdkmath.ZeroInt() +func (DummyStakingKeeper) Slash(context.Context, sdk.ConsAddress, int64, int64, sdkmath.LegacyDec) (sdkmath.Int, error) { + return sdkmath.ZeroInt(), nil } // ValidatorsPowerStoreIterator nolint -func (DummyStakingKeeper) ValidatorsPowerStoreIterator(ctx sdk.Context) sdk.Iterator { - return sdk.KVStoreReversePrefixIterator(nil, nil) +func (DummyStakingKeeper) ValidatorsPowerStoreIterator(ctx context.Context) (storetypes.Iterator, error) { + return storetypes.KVStoreReversePrefixIterator(nil, nil), nil } // Jail nolint -func (DummyStakingKeeper) Jail(sdk.Context, sdk.ConsAddress) { +func (DummyStakingKeeper) Jail(context.Context, sdk.ConsAddress) error { + return nil } // GetLastValidatorPower nolint -func (sk DummyStakingKeeper) GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) (power int64) { - return sk.Validator(ctx, operator).GetConsensusPower(sdk.DefaultPowerReduction) +func (sk DummyStakingKeeper) GetLastValidatorPower(ctx context.Context, operator sdk.ValAddress) (power int64) { + validator, _ := sk.Validator(ctx, operator) + return validator.GetConsensusPower(sdk.DefaultPowerReduction) } // MaxValidators returns the maximum amount of bonded validators -func (DummyStakingKeeper) MaxValidators(sdk.Context) uint32 { - return 100 +func (DummyStakingKeeper) MaxValidators(context.Context) (uint32, error) { + return 100, nil } // PowerReduction - is the amount of staking tokens required for 1 unit of consensus-engine power -func (DummyStakingKeeper) PowerReduction(ctx sdk.Context) (res sdk.Int) { +func (DummyStakingKeeper) PowerReduction(ctx context.Context) (res sdkmath.Int) { res = sdk.DefaultPowerReduction return } @@ -114,7 +118,7 @@ func (DummyStakingKeeper) PowerReduction(ctx sdk.Context) (res sdk.Int) { // MockValidator nolint type MockValidator struct { power int64 - valOperAddr sdk.ValAddress + valOperAddr string } var _ stakingtypes.ValidatorI = MockValidator{} @@ -125,24 +129,24 @@ func (MockValidator) GetStatus() stakingtypes.BondStatus { return stakingty func (MockValidator) IsBonded() bool { return true } func (MockValidator) IsUnbonded() bool { return false } func (MockValidator) IsUnbonding() bool { return false } -func (v MockValidator) GetOperator() sdk.ValAddress { return v.valOperAddr } +func (v MockValidator) GetOperator() string { return v.valOperAddr } func (MockValidator) ConsPubKey() (cryptotypes.PubKey, error) { return nil, nil } func (MockValidator) TmConsPublicKey() (tmprotocrypto.PublicKey, error) { return tmprotocrypto.PublicKey{}, nil } -func (MockValidator) GetConsAddr() (sdk.ConsAddress, error) { return nil, nil } -func (v MockValidator) GetTokens() sdk.Int { +func (MockValidator) GetConsAddr() ([]byte, error) { return nil, nil } +func (v MockValidator) GetTokens() sdkmath.Int { return sdk.TokensFromConsensusPower(v.power, sdk.DefaultPowerReduction) } -func (v MockValidator) GetBondedTokens() sdk.Int { +func (v MockValidator) GetBondedTokens() sdkmath.Int { return sdk.TokensFromConsensusPower(v.power, sdk.DefaultPowerReduction) } -func (v MockValidator) GetConsensusPower(powerReduction sdk.Int) int64 { return v.power } -func (v *MockValidator) SetConsensusPower(power int64) { v.power = power } -func (v MockValidator) GetCommission() sdkmath.LegacyDec { return sdkmath.LegacyZeroDec() } -func (v MockValidator) GetMinSelfDelegation() sdk.Int { return sdkmath.OneInt() } -func (v MockValidator) GetDelegatorShares() sdkmath.LegacyDec { return sdkmath.LegacyNewDec(v.power) } +func (v MockValidator) GetConsensusPower(powerReduction sdkmath.Int) int64 { return v.power } +func (v *MockValidator) SetConsensusPower(power int64) { v.power = power } +func (v MockValidator) GetCommission() sdkmath.LegacyDec { return sdkmath.LegacyZeroDec() } +func (v MockValidator) GetMinSelfDelegation() sdkmath.Int { return sdkmath.OneInt() } +func (v MockValidator) GetDelegatorShares() sdkmath.LegacyDec { return sdkmath.LegacyNewDec(v.power) } func (v MockValidator) TokensFromShares(sdkmath.LegacyDec) sdkmath.LegacyDec { return sdkmath.LegacyZeroDec() } @@ -155,15 +159,15 @@ func (v MockValidator) TokensFromSharesRoundUp(sdkmath.LegacyDec) sdkmath.Legacy return sdkmath.LegacyZeroDec() } -func (v MockValidator) SharesFromTokens(amt sdk.Int) (sdkmath.LegacyDec, error) { +func (v MockValidator) SharesFromTokens(amt sdkmath.Int) (sdkmath.LegacyDec, error) { return sdkmath.LegacyZeroDec(), nil } -func (v MockValidator) SharesFromTokensTruncated(amt sdk.Int) (sdkmath.LegacyDec, error) { +func (v MockValidator) SharesFromTokensTruncated(amt sdkmath.Int) (sdkmath.LegacyDec, error) { return sdkmath.LegacyZeroDec(), nil } -func NewMockValidator(valAddr sdk.ValAddress, power int64) MockValidator { +func NewMockValidator(valAddr string, power int64) MockValidator { return MockValidator{ power: power, valOperAddr: valAddr, diff --git a/x/sudo/keeper/keeper.go b/x/sudo/keeper/keeper.go index d1999ee051..c2fcaefa0a 100644 --- a/x/sudo/keeper/keeper.go +++ b/x/sudo/keeper/keeper.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "cosmossdk.io/store/types" "github.com/NibiruChain/collections" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/v2/x/common/set" diff --git a/x/sudo/module.go b/x/sudo/module.go index 3c6bda3581..f49cfbadc6 100644 --- a/x/sudo/module.go +++ b/x/sudo/module.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + store "cosmossdk.io/store/types" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -158,11 +158,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} +func (am AppModule) BeginBlock(_ context.Context) {} // EndBlock executes all ABCI EndBlock logic respective to the capability module. It // returns no validator updates. -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(_ context.Context) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -176,7 +176,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // RegisterStoreDecoder implements module.AppModuleSimulation. -func (AppModule) RegisterStoreDecoder(sdk.StoreDecoderRegistry) { +func (AppModule) RegisterStoreDecoder(simtypes.StoreDecoderRegistry) { } // WeightedOperations implements module.AppModuleSimulation. From 15a2606e17e59f8a6e0daab2c1c07b1e20745e0e Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 25 Apr 2025 15:50:42 +0700 Subject: [PATCH 05/72] partially fix cmd --- cmd/nibid/cmd/decode_base64_test.go | 4 ++-- cmd/nibid/cmd/genaccounts_test.go | 4 ++-- cmd/nibid/cmd/init.go | 25 +++++++++++++++---------- cmd/nibid/cmd/root.go | 4 ++-- cmd/nibid/cmd/testnet.go | 9 +++++---- cmd/nibid/cmd/testnet_test.go | 4 ++-- cmd/nibid/main.go | 11 +++-------- 7 files changed, 31 insertions(+), 30 deletions(-) diff --git a/cmd/nibid/cmd/decode_base64_test.go b/cmd/nibid/cmd/decode_base64_test.go index 96c1366087..cda8e49901 100644 --- a/cmd/nibid/cmd/decode_base64_test.go +++ b/cmd/nibid/cmd/decode_base64_test.go @@ -6,7 +6,7 @@ import ( "github.com/NibiruChain/nibiru/v2/app" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" @@ -28,7 +28,7 @@ func TestBase64Decode(t *testing.T) { t.Run(tc.name, func(t *testing.T) { home := t.TempDir() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) appCodec := app.MakeEncodingConfig().Codec diff --git a/cmd/nibid/cmd/genaccounts_test.go b/cmd/nibid/cmd/genaccounts_test.go index 060f0ce4d7..b539407e1c 100644 --- a/cmd/nibid/cmd/genaccounts_test.go +++ b/cmd/nibid/cmd/genaccounts_test.go @@ -7,7 +7,7 @@ import ( "github.com/NibiruChain/nibiru/v2/app" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" @@ -38,7 +38,7 @@ func TestAddGenesisAccountCmd(t *testing.T) { t.Run(tc.name, func(t *testing.T) { home := t.TempDir() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) appCodec := app.MakeEncodingConfig().Codec diff --git a/cmd/nibid/cmd/init.go b/cmd/nibid/cmd/init.go index af74aead21..b51f26b7ef 100644 --- a/cmd/nibid/cmd/init.go +++ b/cmd/nibid/cmd/init.go @@ -10,18 +10,19 @@ import ( cmtcfg "github.com/cometbft/cometbft/config" cmtcli "github.com/cometbft/cometbft/libs/cli" cmtrand "github.com/cometbft/cometbft/libs/rand" - cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client" sdkflags "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/genutil" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/go-bip39" ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibctypes "github.com/cosmos/ibc-go/v7/modules/core/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibctypes "github.com/cosmos/ibc-go/v8/modules/core/types" pkgerrors "github.com/pkg/errors" "github.com/spf13/cobra" @@ -140,24 +141,28 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { return pkgerrors.Wrap(err, "Failed to marshal default genesis state") } - genDoc := &cmttypes.GenesisDoc{} + appGenesis := &genutiltypes.AppGenesis{} if _, err := os.Stat(genFile); err != nil { if !os.IsNotExist(err) { return err } } else { - genDoc, err = cmttypes.GenesisDocFromFile(genFile) + appGenesis, err = genutiltypes.AppGenesisFromFile(genFile) if err != nil { return pkgerrors.Wrap(err, "Failed to read genesis doc from file") } } - genDoc.ChainID = chainID - genDoc.Validators = nil - genDoc.AppState = appState - genDoc.InitialHeight = initHeight + appGenesis.AppName = version.AppName + appGenesis.AppVersion = version.Version + appGenesis.ChainID = chainID + appGenesis.Consensus = &genutiltypes.ConsensusGenesis{ + Validators: nil, + } + appGenesis.AppState = appState + appGenesis.InitialHeight = initHeight - if err = genutil.ExportGenesisFile(genDoc, genFile); err != nil { + if err = genutil.ExportGenesisFile(appGenesis, genFile); err != nil { return pkgerrors.Wrap(err, "Failed to export genesis file") } diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index 6bc09f720c..bb15d2ee15 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -5,9 +5,9 @@ import ( "io" "os" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" cmtcli "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" diff --git a/cmd/nibid/cmd/testnet.go b/cmd/nibid/cmd/testnet.go index 2fdee84368..1ec8ff5e03 100644 --- a/cmd/nibid/cmd/testnet.go +++ b/cmd/nibid/cmd/testnet.go @@ -212,7 +212,7 @@ func InitTestnet( valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr), + sdk.ValAddress(addr).String(), valPubKeys[i], sdk.NewCoin(denoms.NIBI, valTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), @@ -237,7 +237,7 @@ func InitTestnet( WithKeybase(kb). WithTxConfig(clientCtx.TxConfig) - if err := tx.Sign(txFactory, nodeDirName, txBuilder, true); err != nil { + if err := tx.Sign(clientCtx.CmdContext, txFactory, nodeDirName, txBuilder, true); err != nil { return err } @@ -337,7 +337,7 @@ func collectGenFiles( nodeID, valPubKey := nodeIDs[i], valPubKeys[i] initCfg := genutiltypes.NewInitConfig(chainID, gentxsDir, nodeID, valPubKey) - genDoc, err := cmttypes.GenesisDocFromFile(nodeConfig.GenesisFile()) + appGenesis, err := genutiltypes.AppGenesisFromFile(nodeConfig.GenesisFile()) if err != nil { return err } @@ -347,9 +347,10 @@ func collectGenFiles( clientCtx.TxConfig, nodeConfig, initCfg, - *genDoc, + appGenesis, genBalIterator, genutiltypes.DefaultMessageValidator, + clientCtx.TxConfig.SigningContext().ValidatorAddressCodec(), ) if err != nil { return err diff --git a/cmd/nibid/cmd/testnet_test.go b/cmd/nibid/cmd/testnet_test.go index 6c141124f3..d21bc9436b 100644 --- a/cmd/nibid/cmd/testnet_test.go +++ b/cmd/nibid/cmd/testnet_test.go @@ -7,7 +7,7 @@ import ( "github.com/NibiruChain/nibiru/v2/app" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" @@ -22,7 +22,7 @@ func Test_TestnetCmd(t *testing.T) { home := t.TempDir() encodingConfig := app.MakeEncodingConfig() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) err = genutiltest.ExecInitCmd(app.ModuleBasics, home, encodingConfig.Codec) diff --git a/cmd/nibid/main.go b/cmd/nibid/main.go index 381e603f19..0cc893ba8c 100644 --- a/cmd/nibid/main.go +++ b/cmd/nibid/main.go @@ -1,9 +1,9 @@ package main import ( + "fmt" "os" - "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/NibiruChain/nibiru/v2/app" @@ -14,12 +14,7 @@ func main() { rootCmd, _ := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { - switch e := err.(type) { - case server.ErrorCode: - os.Exit(e.Code) - - default: - os.Exit(1) - } + fmt.Fprintln(rootCmd.OutOrStderr(), err) + os.Exit(1) } } From 271b4682a275e566379954912b15f36b04d42889 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 25 Apr 2025 15:51:54 +0700 Subject: [PATCH 06/72] use ExecTxResult --- eth/indexer.go | 2 +- eth/indexer/evm_tx_indexer.go | 4 ++-- eth/rpc/events_parser.go | 2 +- eth/rpc/events_parser_test.go | 16 ++++++++-------- eth/rpc/rpc.go | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eth/indexer.go b/eth/indexer.go index fc60ac727d..4b6e5052ac 100644 --- a/eth/indexer.go +++ b/eth/indexer.go @@ -11,7 +11,7 @@ import ( type EVMTxIndexer interface { // LastIndexedBlock returns -1 if indexer db is empty LastIndexedBlock() (int64, error) - IndexBlock(*cmttypes.Block, []*abci.ResponseDeliverTx) error + IndexBlock(*cmttypes.Block, []*abci.ExecTxResult) error // GetByTxHash returns nil if tx not found. GetByTxHash(common.Hash) (*TxResult, error) diff --git a/eth/indexer/evm_tx_indexer.go b/eth/indexer/evm_tx_indexer.go index 24c0728872..9af266690c 100644 --- a/eth/indexer/evm_tx_indexer.go +++ b/eth/indexer/evm_tx_indexer.go @@ -5,10 +5,10 @@ import ( "fmt" sdkioerrors "cosmossdk.io/errors" - dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/libs/log" cmttypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -47,7 +47,7 @@ func NewEVMTxIndexer(db dbm.DB, logger log.Logger, clientCtx client.Context) *EV // - Parses eth Tx infos from cosmos-sdk events for every TxResult // - Iterates over all the messages of the Tx // - Builds and stores indexer.TxResult based on parsed events for every message -func (indexer *EVMTxIndexer) IndexBlock(block *cmttypes.Block, txResults []*abci.ResponseDeliverTx) error { +func (indexer *EVMTxIndexer) IndexBlock(block *cmttypes.Block, txResults []*abci.ExecTxResult) error { height := block.Header.Height batch := indexer.db.NewBatch() diff --git a/eth/rpc/events_parser.go b/eth/rpc/events_parser.go index ea15f025f0..5d2cbb7c13 100644 --- a/eth/rpc/events_parser.go +++ b/eth/rpc/events_parser.go @@ -37,7 +37,7 @@ type ParsedTxs struct { } // ParseTxResult parses eth tx info from the ABCI events of Eth tx msgs -func ParseTxResult(result *abci.ResponseDeliverTx, tx sdk.Tx) (*ParsedTxs, error) { +func ParseTxResult(result *abci.ExecTxResult, tx sdk.Tx) (*ParsedTxs, error) { // Parsed txs is the structure being populated from the events // So far (until we allow ethereum_txs as cosmos tx messages) it'll have single tx parsedTxs := &ParsedTxs{ diff --git a/eth/rpc/events_parser_test.go b/eth/rpc/events_parser_test.go index 91a8913941..51c48cf6e9 100644 --- a/eth/rpc/events_parser_test.go +++ b/eth/rpc/events_parser_test.go @@ -19,7 +19,7 @@ func TestParseTxResult(t *testing.T) { type TestCase struct { name string - txResp abci.ResponseDeliverTx + txResp abci.ExecTxResult wantEthTxs []*ParsedTx wantErr bool } @@ -27,7 +27,7 @@ func TestParseTxResult(t *testing.T) { testCases := []TestCase{ { name: "happy: valid single pending_ethereum_tx event", - txResp: abci.ResponseDeliverTx{ + txResp: abci.ExecTxResult{ Events: []abci.Event{ pendingEthereumTxEvent(txHashOne.Hex(), 0), }, @@ -44,7 +44,7 @@ func TestParseTxResult(t *testing.T) { }, { name: "happy: two valid pending_ethereum_tx events", - txResp: abci.ResponseDeliverTx{ + txResp: abci.ExecTxResult{ Events: []abci.Event{ pendingEthereumTxEvent(txHashOne.Hex(), 0), pendingEthereumTxEvent(txHashTwo.Hex(), 1), @@ -68,7 +68,7 @@ func TestParseTxResult(t *testing.T) { }, { name: "happy: one pending_ethereum_tx and one EventEthereumTx", - txResp: abci.ResponseDeliverTx{ + txResp: abci.ExecTxResult{ Events: []abci.Event{ pendingEthereumTxEvent(txHashOne.Hex(), 0), ethereumTxEvent(txHashOne.Hex(), 0, 21000, false), @@ -86,7 +86,7 @@ func TestParseTxResult(t *testing.T) { }, { name: "happy: two pending_ethereum_tx and one EventEthereumTx", - txResp: abci.ResponseDeliverTx{ + txResp: abci.ExecTxResult{ Events: []abci.Event{ pendingEthereumTxEvent(txHashOne.Hex(), 0), pendingEthereumTxEvent(txHashTwo.Hex(), 1), @@ -112,7 +112,7 @@ func TestParseTxResult(t *testing.T) { }, { name: "happy: one pending_ethereum_tx and one EventEthereumTx failed", - txResp: abci.ResponseDeliverTx{ + txResp: abci.ExecTxResult{ Events: []abci.Event{ pendingEthereumTxEvent(txHashOne.Hex(), 0), ethereumTxEvent(txHashOne.Hex(), 0, 21000, true), @@ -130,7 +130,7 @@ func TestParseTxResult(t *testing.T) { }, { name: "sad: EventEthereumTx without pending_ethereum_tx", - txResp: abci.ResponseDeliverTx{ + txResp: abci.ExecTxResult{ Events: []abci.Event{ ethereumTxEvent(txHashOne.Hex(), 0, 21000, false), }, @@ -140,7 +140,7 @@ func TestParseTxResult(t *testing.T) { }, { name: "sad: no events", - txResp: abci.ResponseDeliverTx{ + txResp: abci.ExecTxResult{ Events: []abci.Event{}, }, wantEthTxs: []*ParsedTx{}, diff --git a/eth/rpc/rpc.go b/eth/rpc/rpc.go index 2bd8926b4b..fd31e52c8a 100644 --- a/eth/rpc/rpc.go +++ b/eth/rpc/rpc.go @@ -232,7 +232,7 @@ func NewRPCTxFromMsgEthTx( // // Exclude from Block (Not Valid Enough): // - Exclude unsuccessful tx with any other error but ExceedBlockGasLimit -func TxIsValidEnough(res *abci.ResponseDeliverTx) (condition bool, reason string) { +func TxIsValidEnough(res *abci.ExecTxResult) (condition bool, reason string) { if res.Code == 0 { return true, "tx succeeded" } else if strings.Contains(res.Log, ErrExceedBlockGasLimit) { From a88048debb26b1d2760b6571aa14d04784e27313 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 25 Apr 2025 16:05:47 +0700 Subject: [PATCH 07/72] fix cmd --- cmd/nibid/cmd/root.go | 9 ++++----- go.mod | 3 +++ go.sum | 6 ++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index bb15d2ee15..8c642f0f81 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -6,6 +6,7 @@ import ( "os" "cosmossdk.io/log" + confixcmd "cosmossdk.io/tools/confix/cmd" cmtcli "github.com/cometbft/cometbft/libs/cli" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" @@ -125,7 +126,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { cmtcli.NewCompletionCmd(rootCmd, true), testnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), - config.Cmd(), + confixcmd.ConfigCommand(), pruning.Cmd(a.newApp, app.DefaultNodeHome), ) @@ -138,7 +139,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( - rpc.StatusCommand(), + sdkserver.StatusCommand(), genesisCommand( encodingConfig, oraclecli.AddGenesisPricefeederDelegationCmd(app.DefaultNodeHome), @@ -146,7 +147,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { ), queryCommand(), txCommand(), - keys.Commands(app.DefaultNodeHome), + keys.Commands(), // EVM Tx Indexer force catch up command server.NewEVMTxIndexCmd(), @@ -185,9 +186,7 @@ func queryCommand() *cobra.Command { } rootQueryCmd.AddCommand( - authcmd.GetAccountCmd(), rpc.ValidatorCommand(), - rpc.BlockCommand(), authcmd.QueryTxsByEventsCmd(), authcmd.QueryTxCmd(), ) diff --git a/go.mod b/go.mod index 9330930f41..e645668d74 100644 --- a/go.mod +++ b/go.mod @@ -59,6 +59,7 @@ require ( cosmossdk.io/depinject v1.1.0 cosmossdk.io/log v1.4.1 cosmossdk.io/store v1.1.1 + cosmossdk.io/tools/confix v0.1.1 cosmossdk.io/tools/rosetta v0.2.1 cosmossdk.io/x/evidence v0.1.1 cosmossdk.io/x/feegrant v0.1.1 @@ -125,6 +126,8 @@ require ( github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect + github.com/creachadair/atomicfile v0.3.1 // indirect + github.com/creachadair/tomledit v0.0.24 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect diff --git a/go.sum b/go.sum index 2aab291572..f6b5cb7a54 100644 --- a/go.sum +++ b/go.sum @@ -621,6 +621,8 @@ cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0 cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY= cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= +cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= @@ -950,6 +952,10 @@ github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLR github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= +github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= +github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= +github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= From cb42e3451ef8a337fbfc45c8c73fd7092ac6eff7 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 28 Apr 2025 17:01:38 +0700 Subject: [PATCH 08/72] fix DecodeBase64Cmd --- cmd/nibid/cmd/decode_base64.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/nibid/cmd/decode_base64.go b/cmd/nibid/cmd/decode_base64.go index 8625070c39..f7a053f9fb 100644 --- a/cmd/nibid/cmd/decode_base64.go +++ b/cmd/nibid/cmd/decode_base64.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" sdkcodec "github.com/cosmos/cosmos-sdk/codec" - wasmvm "github.com/CosmWasm/wasmvm/types" + wasmvm "github.com/CosmWasm/wasmvm/v2/types" ) // YieldStargateMsgs takes a byte slice of JSON data and converts it into a slice @@ -26,7 +26,7 @@ import ( // - sgMsgs []wasmvm.StargateMsg: A slice of wasmvm.StargateMsg objects parsed // from the provided JSON data. // - err error: An error object, which is nil if the operation is successful. -func YieldStargateMsgs(jsonBz []byte) (sgMsgs []wasmvm.StargateMsg, err error) { +func YieldStargateMsgs(jsonBz []byte) (sgMsgs []wasmvm.AnyMsg, err error) { var data any if err := json.Unmarshal(jsonBz, &data); err != nil { return sgMsgs, err @@ -48,12 +48,12 @@ func YieldStargateMsgs(jsonBz []byte) (sgMsgs []wasmvm.StargateMsg, err error) { // - msgs *[]wasmvm.StargateMsg: Mutable reference to a slice of protobuf // messages. These are potentially altered in place if the value is an // encoded base 64 string. -func parseStargateMsgs(jsonData any, msgs *[]wasmvm.StargateMsg) { +func parseStargateMsgs(jsonData any, msgs *[]wasmvm.AnyMsg) { switch v := jsonData.(type) { case map[string]any: if typeURL, ok := v["type_url"].(string); ok { if value, ok := v["value"].(string); ok { - *msgs = append(*msgs, wasmvm.StargateMsg{ + *msgs = append(*msgs, wasmvm.AnyMsg{ TypeURL: typeURL, Value: []byte(value), }) From 6d5dd50e3b638422166af87cbf35fb6b4c66ccd9 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 28 Apr 2025 17:01:57 +0700 Subject: [PATCH 09/72] fix testnetwork --- x/common/testutil/testnetwork/network.go | 40 ++++++++++++--- x/common/testutil/testnetwork/start_node.go | 54 ++++++++------------- 2 files changed, 53 insertions(+), 41 deletions(-) diff --git a/x/common/testutil/testnetwork/network.go b/x/common/testutil/testnetwork/network.go index 0b91b39ff9..a1b98bb425 100644 --- a/x/common/testutil/testnetwork/network.go +++ b/x/common/testutil/testnetwork/network.go @@ -8,13 +8,15 @@ import ( "fmt" "net/url" "os" + "os/signal" "path/filepath" "sync" + "syscall" "time" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" "cosmossdk.io/store/pruning/types" - "cosmossdk.io/log" cmtrand "github.com/cometbft/cometbft/libs/rand" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" @@ -258,7 +260,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error serverCtxLogger := log.NewNopLogger() if cfg.EnableTMLogging { log.NewLogger(os.Stdout) - serverCtxLogger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)) + serverCtxLogger = log.NewLogger(os.Stdout) } ctx.Logger = serverCtxLogger @@ -281,13 +283,13 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error tmCfg.Moniker = nodeDirName monikers[valIdx] = nodeDirName - proxyAddr, _, err := server.FreeTCPAddr() + proxyAddr, _, _, err := networkutil.FreeTCPAddr() if err != nil { return nil, err } tmCfg.ProxyApp = proxyAddr - p2pAddr, _, err := server.FreeTCPAddr() + p2pAddr, _, _, err := networkutil.FreeTCPAddr() if err != nil { return nil, err } @@ -356,7 +358,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error } createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr), + sdk.ValAddress(addr).String(), valPubKeys[valIdx], sdk.NewCoin(cfg.BondDenom, cfg.BondedTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), @@ -390,7 +392,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error WithKeybase(kb). WithTxConfig(cfg.TxConfig) - err = tx.Sign(txFactory, nodeDirName, txBuilder, true) + err = tx.Sign(context.Background(), txFactory, nodeDirName, txBuilder, true) if err != nil { return nil, err } @@ -463,7 +465,7 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error // Ensure we cleanup incase any test was abruptly halted (e.g. SIGINT) as // any defer in a test would not be called. - server.TrapSignal(network.Cleanup) + trapSignal(network.Cleanup) return network, err } @@ -638,3 +640,27 @@ func (n *Network) keyBaseAndInfoForAddr(addr sdk.AccAddress) (keyring.Keyring, * return nil, nil, fmt.Errorf("address not found in any of the known validators keyrings: %s", addr.String()) } + +// trapSignal traps SIGINT and SIGTERM and calls os.Exit once a signal is received. +func trapSignal(cleanupFunc func()) { + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) + + go func() { + sig := <-sigs + + if cleanupFunc != nil { + cleanupFunc() + } + exitCode := 128 + + switch sig { + case syscall.SIGINT: + exitCode += int(syscall.SIGINT) + case syscall.SIGTERM: + exitCode += int(syscall.SIGTERM) + } + + os.Exit(exitCode) + }() +} diff --git a/x/common/testutil/testnetwork/start_node.go b/x/common/testutil/testnetwork/start_node.go index d66aaea7e0..4aad9e6105 100644 --- a/x/common/testutil/testnetwork/start_node.go +++ b/x/common/testutil/testnetwork/start_node.go @@ -1,12 +1,12 @@ package testnetwork import ( + "context" "fmt" - "os" - "time" sdkioerrors "cosmossdk.io/errors" - db "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + db "github.com/cosmos/cosmos-db" "github.com/ethereum/go-ethereum/ethclient" "github.com/NibiruChain/nibiru/v2/app/server" @@ -14,12 +14,10 @@ import ( "github.com/NibiruChain/nibiru/v2/eth/rpc/backend" "github.com/NibiruChain/nibiru/v2/eth/rpc/rpcapi" - "github.com/cosmos/cosmos-sdk/server/api" + sdkserver "github.com/cosmos/cosmos-sdk/server" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" - srvtypes "github.com/cosmos/cosmos-sdk/server/types" cmtcfg "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/libs/log" "github.com/cometbft/cometbft/node" "github.com/cometbft/cometbft/p2p" pvm "github.com/cometbft/cometbft/privval" @@ -30,7 +28,7 @@ import ( func startNodeAndServers(cfg Config, val *Validator) error { logger := val.Ctx.Logger - evmServerCtxLogger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) + evmServerCtxLogger := sdkserver.NewDefaultContext() tmCfg := val.Ctx.Config tmCfg.Instrumentation.Prometheus = false @@ -44,13 +42,14 @@ func startNodeAndServers(cfg Config, val *Validator) error { } app := cfg.AppConstructor(*val) + cmtApp := sdkserver.NewCometABCIWrapper(app) genDocProvider := node.DefaultGenesisDocProviderFunc(tmCfg) tmNode, err := node.NewNode( tmCfg, pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile()), nodeKey, - proxy.NewLocalClientCreator(app), + proxy.NewLocalClientCreator(cmtApp), genDocProvider, cmtcfg.DefaultDBProvider, node.DefaultMetricsProvider(tmCfg.Instrumentation), @@ -85,44 +84,31 @@ func startNodeAndServers(cfg Config, val *Validator) error { val.EthRpc_NET = rpcapi.NewImplNetAPI(val.ClientCtx) } - if val.APIAddress != "" { - apiSrv := api.New(val.ClientCtx, logger.With("module", "api-server")) - app.RegisterAPIRoutes(apiSrv, val.AppConfig.API) - - errCh := make(chan error) + // We'll need a RPC client if the validator exposes a gRPC or REST endpoint. + if val.APIAddress != "" || val.AppConfig.GRPC.Enable { + val.ClientCtx = val.ClientCtx. + WithClient(val.RPCClient) - go func() { - if err := apiSrv.Start(val.AppConfig.Config); err != nil { - errCh <- err - } - }() + app.RegisterTxService(val.ClientCtx) + app.RegisterTendermintService(val.ClientCtx) + app.RegisterNodeService(val.ClientCtx, val.AppConfig.Config) + } - select { - case err := <-errCh: + if val.AppConfig.GRPC.Enable { + grpcSrv, err := servergrpc.NewGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC) + if err != nil { return err - case <-time.After(srvtypes.ServerStartTime): // assume server started successfully } - val.api = apiSrv - } - - if val.AppConfig.GRPC.Enable { - grpcSrv, err := servergrpc.StartGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC) + err = servergrpc.StartGRPCServer(context.Background(), logger.With(log.ModuleKey, "grpc-server"), val.AppConfig.GRPC, grpcSrv) if err != nil { return err } val.grpc = grpcSrv - - if val.AppConfig.GRPCWeb.Enable { - val.grpcWeb, err = servergrpc.StartGRPCWeb(grpcSrv, val.AppConfig.Config) - if err != nil { - return err - } - } } - val.Ctx.Logger = evmServerCtxLogger + val.Ctx.Logger = evmServerCtxLogger.Logger useEthJsonRPC := val.AppConfig.JSONRPC.Enable && val.AppConfig.JSONRPC.Address != "" if useEthJsonRPC { From e08d07be0ba0dca1ed5a98faeab491d42e9c7aa7 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 28 Apr 2025 17:02:28 +0700 Subject: [PATCH 10/72] fix evm unit test --- x/evm/keeper/msg_ethereum_tx_test.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index d0e799440d..b49305fcf3 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -18,8 +18,6 @@ import ( "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) @@ -259,15 +257,11 @@ func (s *Suite) TestEthereumTx_ABCI() { blockTx, err := evmTxMsg.BuildTx(txBuilder, evm.EVMBankDenom) s.Require().NoError(err) - txBz, err := deps.App.GetTxConfig().TxEncoder()(blockTx) + gasInfo, _, err := deps.App.SimDeliver(deps.App.GetTxConfig().TxEncoder(), blockTx) s.Require().NoError(err) - deliverTxResp := deps.App.DeliverTx(txBz) - s.Require().True(deliverTxResp.IsOK(), "%#v", deliverTxResp) deps.App.EndBlocker(deps.Ctx) - { - r := deliverTxResp - s.EqualValuesf(21000, r.GasUsed, "%d", r.GasUsed) - s.EqualValuesf(21000, r.GasWanted, "%d", r.GasWanted) - } + s.EqualValuesf(21000, gasInfo.GasUsed, "%d", gasInfo.GasUsed) + s.EqualValuesf(21000, gasInfo.GasWanted, "%d", gasInfo.GasWanted) + } From 62656f363c04ba1c59671ac773ef351d8fe16f1a Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 28 Apr 2025 17:03:44 +0700 Subject: [PATCH 11/72] fix start cmd and rosseta config --- app/server/config/server_config.go | 95 +++++- app/server/evm_tx_indexer_cli.go | 10 +- app/server/flags.go | 10 +- app/server/json_rpc.go | 14 +- app/server/start.go | 491 ++++++++++++++--------------- 5 files changed, 352 insertions(+), 268 deletions(-) diff --git a/app/server/config/server_config.go b/app/server/config/server_config.go index d51df9205b..bae0398013 100644 --- a/app/server/config/server_config.go +++ b/app/server/config/server_config.go @@ -7,6 +7,8 @@ import ( "path" "time" + sdkmath "cosmossdk.io/math" + tracerslogger "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/spf13/viper" @@ -15,7 +17,9 @@ import ( sdkioerrors "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/server/config" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/rosetta" ) const ( @@ -94,12 +98,26 @@ const ( // DefaultGasAdjustment value to use as default in gas-adjustment flag DefaultGasAdjustment = 1.2 + // DefaultRosettaBlockchain defines the default blockchain name for the rosetta server + DefaultRosettaBlockchain = "nibiru" + + // DefaultRosettaNetwork defines the default network name for the rosetta server + DefaultRosettaNetwork = "nibiru" + + // DefaultRosettaGasToSuggest defines the default gas to suggest for the rosetta server + DefaultRosettaGasToSuggest = 300_000 + + // DefaultRosettaDenomToSuggest defines the default denom for fee suggestion + DefaultRosettaDenomToSuggest = "unibi" + // DefaultZeroCopy is the default value that defines if // the zero-copied slices must be retained beyond current block's execution // the sdk address cache will be disabled if zero-copy is enabled DefaultZeroCopy = false ) +var DefaultRosettaGasPrices = sdk.NewDecCoins(sdk.NewDecCoin(DefaultRosettaDenomToSuggest, sdkmath.NewInt(4_000_000))) + var evmTracers = []string{"json", "markdown", "struct", "access_list"} // Config defines the server's top level configuration. It includes the default app config @@ -110,6 +128,7 @@ type Config struct { EVM EVMConfig `mapstructure:"evm"` JSONRPC JSONRPCConfig `mapstructure:"json-rpc"` TLS TLSConfig `mapstructure:"tls"` + Rosetta RosettaConfig `mapstructure:"rosetta"` } // EVMConfig defines the application configuration values for the EVM. @@ -172,6 +191,13 @@ type TLSConfig struct { KeyPath string `mapstructure:"key-path"` } +// RosettaConfig defines configuration for the Rosetta server. +type RosettaConfig struct { + rosetta.Config + // Enable defines if the Rosetta server should be enabled. + Enable bool `mapstructure:"enable"` +} + // AppConfig helps to override default appConfig template and configs. // return "", nil if no custom configuration is required for the application. func AppConfig(denom string) (string, any) { @@ -193,7 +219,7 @@ func AppConfig(denom string) (string, any) { customAppConfig.Config.MinGasPrices = "0" + denom } - customAppTemplate := config.DefaultConfigTemplate + DefaultConfigTemplate + customAppTemplate := config.DefaultConfigTemplate + DefaultConfigTemplate + DefaultRosettaConfigTemplate return customAppTemplate, *customAppConfig } @@ -211,6 +237,7 @@ func DefaultConfig() *Config { EVM: *DefaultEVMConfig(), JSONRPC: *DefaultJSONRPCConfig(), TLS: *DefaultTLSConfig(), + Rosetta: *DefaultRosettaConfig(), } } @@ -333,6 +360,26 @@ func DefaultTLSConfig() *TLSConfig { } } +// DefaultEVMConfig returns the default EVM configuration +func DefaultRosettaConfig() *RosettaConfig { + return &RosettaConfig{ + Config: rosetta.Config{ + Blockchain: DefaultRosettaBlockchain, + Network: DefaultRosettaNetwork, + TendermintRPC: rosetta.DefaultCometEndpoint, + GRPCEndpoint: rosetta.DefaultGRPCEndpoint, + Addr: rosetta.DefaultAddr, + Retries: rosetta.DefaultRetries, + Offline: rosetta.DefaultOffline, + EnableFeeSuggestion: rosetta.DefaultEnableFeeSuggestion, + GasToSuggest: DefaultRosettaGasToSuggest, + DenomToSuggest: DefaultRosettaDenomToSuggest, + GasPrices: DefaultRosettaGasPrices, + }, + Enable: DefaultRosettaEnable, + } +} + // Validate returns an error if the TLS certificate and key file extensions are invalid. func (c TLSConfig) Validate() error { certExt := path.Ext(c.CertificatePath) @@ -492,3 +539,49 @@ certificate-path = "{{ .TLS.CertificatePath }}" # Key path defines the key.pem file path for the TLS configuration. key-path = "{{ .TLS.KeyPath }}" ` +const DefaultRosettaConfigTemplate = ` +############################################################################### +### Rosetta Configuration ### +############################################################################### + +[rosetta] + +# Enable defines if the Rosetta API server should be enabled. +enable = {{ .Rosetta.Enable }} + +# Address defines the Rosetta API server to listen on. +address = "{{ .Rosetta.Config.Addr }}" + +# Network defines the name of the blockchain that will be returned by Rosetta. +blockchain = "{{ .Rosetta.Config.Blockchain }}" + +# Network defines the name of the network that will be returned by Rosetta. +network = "{{ .Rosetta.Config.Network }}" + +# TendermintRPC defines the endpoint to connect to CometBFT RPC, +# specifying 'tcp://' before is not required, usually it's at port 26657 +tendermint-rpc = "{{ .Rosetta.Config.TendermintRPC }}" + +# GRPCEndpoint defines the cosmos application gRPC endpoint +# usually it is located at 9090 port +grpc-endpoint = "{{ .Rosetta.Config.GRPCEndpoint }}" + +# Retries defines the number of retries when connecting to the node before failing. +retries = {{ .Rosetta.Config.Retries }} + +# Offline defines if Rosetta server should run in offline mode. +offline = {{ .Rosetta.Config.Offline }} + +# EnableFeeSuggestion indicates to use fee suggestion when 'construction/metadata' is called without gas limit and price. +enable-fee-suggestion = {{ .Rosetta.Config.EnableFeeSuggestion }} + +# GasToSuggest defines gas limit when calculating the fee +gas-to-suggest = {{ .Rosetta.Config.GasToSuggest }} + +# DenomToSuggest defines the defult denom for fee suggestion. +# Price must be in minimum-gas-prices. +denom-to-suggest = "{{ .Rosetta.Config.DenomToSuggest }}" + +# GasPrices defines the gas prices for fee suggestion +gas-prices = "{{ .Rosetta.Config.GasPrices }}" +` \ No newline at end of file diff --git a/app/server/evm_tx_indexer_cli.go b/app/server/evm_tx_indexer_cli.go index 0aa0e7180f..6aa9c7a406 100644 --- a/app/server/evm_tx_indexer_cli.go +++ b/app/server/evm_tx_indexer_cli.go @@ -9,7 +9,7 @@ import ( "github.com/NibiruChain/nibiru/v2/eth/indexer" - tmnode "github.com/cometbft/cometbft/node" + cmtcfg "github.com/cometbft/cometbft/config" sm "github.com/cometbft/cometbft/state" tmstore "github.com/cometbft/cometbft/store" "github.com/cosmos/cosmos-sdk/client" @@ -48,7 +48,7 @@ nibid evm-tx-index last-indexed latest evmTxIndexer := indexer.NewEVMTxIndexer(evmIndexerDB, logger.With("module", "evmindex"), clientCtx) - tmdb, err := tmnode.DefaultDBProvider(&tmnode.DBContext{ID: "blockstore", Config: cfg}) + tmdb, err := cmtcfg.DefaultDBProvider(&cmtcfg.DBContext{ID: "blockstore", Config: cfg}) if err != nil { return err } @@ -98,7 +98,7 @@ nibid evm-tx-index last-indexed latest if fromBlock > toBlock { return fmt.Errorf("minBlockNumber must be less or equal to maxBlockNumber") } - stateDB, err := tmnode.DefaultDBProvider(&tmnode.DBContext{ID: "state", Config: cfg}) + stateDB, err := cmtcfg.DefaultDBProvider(&cmtcfg.DBContext{ID: "state", Config: cfg}) if err != nil { return err } @@ -112,11 +112,11 @@ nibid evm-tx-index last-indexed latest if block == nil { return fmt.Errorf("block not found %d", height) } - blockResults, err := stateStore.LoadABCIResponses(height) + blockResults, err := stateStore.LoadFinalizeBlockResponse(height) if err != nil { return err } - if err := evmTxIndexer.IndexBlock(block, blockResults.DeliverTxs); err != nil { + if err := evmTxIndexer.IndexBlock(block, blockResults.TxResults); err != nil { return err } fmt.Println(height) diff --git a/app/server/flags.go b/app/server/flags.go index 7cfb993ca1..52b5711ba3 100644 --- a/app/server/flags.go +++ b/app/server/flags.go @@ -9,11 +9,11 @@ import ( // Tendermint/cosmos-sdk full-node start flags const ( - WithTendermint = "with-tendermint" - Address = "address" - Transport = "transport" - TraceStore = "trace-store" - CPUProfile = "cpu-profile" + WithComet = "with-comet" + Address = "address" + Transport = "transport" + TraceStore = "trace-store" + CPUProfile = "cpu-profile" // The type of database for application and snapshots databases AppDBBackend = "app-db-backend" ) diff --git a/app/server/json_rpc.go b/app/server/json_rpc.go index 21bec288f7..b013ea6350 100644 --- a/app/server/json_rpc.go +++ b/app/server/json_rpc.go @@ -13,13 +13,15 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/server/types" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" gethlog "github.com/ethereum/go-ethereum/log" gethrpc "github.com/ethereum/go-ethereum/rpc" srvconfig "github.com/NibiruChain/nibiru/v2/app/server/config" ) +const ServerStartTime = 5 * time.Second + // StartJSONRPC starts the JSON-RPC server func StartJSONRPC( ctx *server.Context, @@ -29,11 +31,11 @@ func StartJSONRPC( config *srvconfig.Config, indexer eth.EVMTxIndexer, ) (*http.Server, chan struct{}, error) { - tmWsClientForRPCApi := ConnectTmWS(tmRPCAddr, tmEndpoint, ctx.Logger) + tmWsClientForRPCApi := ConnectTmWS(tmRPCAddr, tmEndpoint, servercmtlog.CometLoggerWrapper{Logger: ctx.Logger}) // Configure the go-ethereum logger to sync with the ctx.Logger gethLogger := gethlog.NewLogger(&LogHandler{ - CmtLogger: ctx.Logger.With("module", "geth"), + CmtLogger: servercmtlog.CometLoggerWrapper{Logger: ctx.Logger.With("module", "geth")}, }) gethlog.SetDefault(gethLogger) @@ -96,14 +98,14 @@ func StartJSONRPC( case err := <-errCh: ctx.Logger.Error("failed to boot JSON-RPC server", "error", err.Error()) return nil, nil, err - case <-time.After(types.ServerStartTime): // assume JSON RPC server started successfully + case <-time.After(ServerStartTime): // assume JSON RPC server started successfully } ctx.Logger.Info("Starting JSON WebSocket server", "address", config.JSONRPC.WsAddress) // allocate separate WS connection to Tendermint - tmWsClientForRPCWs := ConnectTmWS(tmRPCAddr, tmEndpoint, ctx.Logger) - wsSrv := rpcapi.NewWebsocketsServer(clientCtx, ctx.Logger, tmWsClientForRPCWs, config) + tmWsClientForRPCWs := ConnectTmWS(tmRPCAddr, tmEndpoint, servercmtlog.CometLoggerWrapper{Logger: ctx.Logger}) + wsSrv := rpcapi.NewWebsocketsServer(clientCtx, servercmtlog.CometLoggerWrapper{Logger: ctx.Logger}, tmWsClientForRPCWs, config) wsSrv.Start() return httpSrv, httpSrvDone, nil } diff --git a/app/server/start.go b/app/server/start.go index 8197618d78..352c3df272 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -7,10 +7,7 @@ import ( "net" "net/http" "os" - "os/signal" "path/filepath" - "runtime/pprof" - "syscall" "time" "github.com/NibiruChain/nibiru/v2/app/server/config" @@ -21,15 +18,17 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/telemetry" + "github.com/cosmos/rosetta" "github.com/spf13/cobra" + "golang.org/x/sync/errgroup" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" abciserver "github.com/cometbft/cometbft/abci/server" tcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" - tmos "github.com/cometbft/cometbft/libs/os" + cmtcfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/node" "github.com/cometbft/cometbft/p2p" pvm "github.com/cometbft/cometbft/privval" @@ -37,9 +36,6 @@ import ( "github.com/cometbft/cometbft/rpc/client/local" dbm "github.com/cosmos/cosmos-db" - "cosmossdk.io/tools/rosetta" - crgserver "cosmossdk.io/tools/rosetta/lib/server" - ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" sdkioerrors "cosmossdk.io/errors" @@ -50,6 +46,7 @@ import ( "github.com/cosmos/cosmos-sdk/server/api" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -121,12 +118,10 @@ which accepts a path for the resulting pprof file. return err } - withTM, _ := cmd.Flags().GetBool(WithTendermint) + withTM, _ := cmd.Flags().GetBool(WithComet) if !withTM { - serverCtx.Logger.Info("starting ABCI without Tendermint") - return wrapCPUProfile(serverCtx, func() error { - return startStandAlone(serverCtx, opts) - }) + serverCtx.Logger.Info("starting ABCI without CometBFT") + return startStandAlone(serverCtx, opts) } serverCtx.Logger.Info("Unlocking keyring") @@ -140,22 +135,23 @@ which accepts a path for the resulting pprof file. } } - serverCtx.Logger.Info("starting ABCI with Tendermint") + serverCtx.Logger.Info("starting ABCI with CometBFT") // amino is needed here for backwards compatibility of REST routes - err = startInProcess(serverCtx, clientCtx, opts) - errCode, ok := err.(sdkserver.ErrorCode) - if !ok { + if err := startInProcess(serverCtx, clientCtx, opts); err != nil { return err } - serverCtx.Logger.Debug(fmt.Sprintf("received quit signal: %d", errCode.Code)) + serverCtx.Logger.Debug("received quit signal") + if err != nil { + serverCtx.Logger.Error(fmt.Sprintf("error on quit: %s", err.Error())) + } return nil }, } cmd.Flags().String(flags.FlagHome, opts.DefaultNodeHome, "The application home directory") - cmd.Flags().Bool(WithTendermint, true, "Run abci app embedded in-process with tendermint") + cmd.Flags().Bool(WithComet, true, "Run abci app embedded in-process with CometBFT") cmd.Flags().String(Address, "tcp://0.0.0.0:26658", "Listen address") cmd.Flags().String(Transport, "socket", "Transport protocol: socket, grpc") cmd.Flags().String(TraceStore, "", "Enable KVStore tracing to an output file") @@ -177,7 +173,6 @@ which accepts a path for the resulting pprof file. cmd.Flags().Bool(GRPCEnable, config.DefaultGRPCEnable, "Define if the gRPC server should be enabled") cmd.Flags().String(GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") cmd.Flags().Bool(GRPCWebEnable, config.DefaultGRPCWebEnable, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") - cmd.Flags().String(GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") cmd.Flags().Bool(RPCEnable, config.DefaultAPIEnable, "Defines if Cosmos-sdk REST server should be enabled") cmd.Flags().Bool(EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)") @@ -213,38 +208,38 @@ which accepts a path for the resulting pprof file. return cmd } -func startStandAlone(ctx *sdkserver.Context, opts StartOptions) error { - addr := ctx.Viper.GetString(Address) - transport := ctx.Viper.GetString(Transport) - home := ctx.Viper.GetString(flags.FlagHome) +func startStandAlone(svrCtx *sdkserver.Context, opts StartOptions) error { + addr := svrCtx.Viper.GetString(Address) + transport := svrCtx.Viper.GetString(Transport) + home := svrCtx.Viper.GetString(flags.FlagHome) - db, err := openDB(home, sdkserver.GetAppDBBackend(ctx.Viper)) + db, err := openDB(home, sdkserver.GetAppDBBackend(svrCtx.Viper)) if err != nil { return err } defer func() { if err := db.Close(); err != nil { - ctx.Logger.Error("error closing db", "error", err.Error()) + svrCtx.Logger.Error("error closing db", "error", err.Error()) } }() - traceWriterFile := ctx.Viper.GetString(TraceStore) + traceWriterFile := svrCtx.Viper.GetString(TraceStore) traceWriter, err := openTraceWriter(traceWriterFile) if err != nil { return err } - app := opts.AppCreator(ctx.Logger, db, traceWriter, ctx.Viper) + app := opts.AppCreator(svrCtx.Logger, db, traceWriter, svrCtx.Viper) - conf, err := config.GetConfig(ctx.Viper) + conf, err := config.GetConfig(svrCtx.Viper) if err != nil { - ctx.Logger.Error("failed to get server config", "error", err.Error()) + svrCtx.Logger.Error("failed to get server config", "error", err.Error()) return err } if err := conf.ValidateBasic(); err != nil { - ctx.Logger.Error("invalid server config", "error", err.Error()) + svrCtx.Logger.Error("invalid server config", "error", err.Error()) return err } @@ -253,35 +248,39 @@ func startStandAlone(ctx *sdkserver.Context, opts StartOptions) error { return err } - svr, err := abciserver.NewServer(addr, transport, app) + cmtApp := sdkserver.NewCometABCIWrapper(app) + svr, err := abciserver.NewServer(addr, transport, cmtApp) if err != nil { return fmt.Errorf("error creating listener: %v", err) } - svr.SetLogger(ctx.Logger.With("server", "abci")) + svr.SetLogger(servercmtlog.CometLoggerWrapper{Logger: svrCtx.Logger.With("server", "abci")}) + g, ctx := getCtx(svrCtx, false) - err = svr.Start() - if err != nil { - tmos.Exit(err.Error()) - } - - defer func() { - if err = svr.Stop(); err != nil { - tmos.Exit(err.Error()) + g.Go(func() error { + if err := svr.Start(); err != nil { + svrCtx.Logger.Error("failed to start out-of-process ABCI server", "err", err) + return err } - }() - // Wait for SIGINT or SIGTERM signal - return sdkserver.WaitForQuitSignals() + // Wait for the calling process to be canceled or close the provided context, + // so we can gracefully stop the ABCI server. + <-ctx.Done() + svrCtx.Logger.Info("stopping the ABCI server...") + return svr.Stop() + }) + + return g.Wait() } // legacyAminoCdc is used for the legacy REST API -func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts StartOptions) (err error) { - cfg := ctx.Config +func startInProcess(svrCtx *sdkserver.Context, clientCtx client.Context, opts StartOptions) (err error) { + cfg := svrCtx.Config home := cfg.RootDir - logger := ctx.Logger + logger := svrCtx.Logger + g, ctx := getCtx(svrCtx, true) - db, err := openDB(home, sdkserver.GetAppDBBackend(ctx.Viper)) + db, err := openDB(home, sdkserver.GetAppDBBackend(svrCtx.Viper)) if err != nil { logger.Error("failed to open DB", "error", err.Error()) return err @@ -289,18 +288,18 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start defer func() { if err := db.Close(); err != nil { - ctx.Logger.With("error", err).Error("error closing db") + svrCtx.Logger.With("error", err).Error("error closing db") } }() - traceWriterFile := ctx.Viper.GetString(TraceStore) + traceWriterFile := svrCtx.Viper.GetString(TraceStore) traceWriter, err := openTraceWriter(traceWriterFile) if err != nil { logger.Error("failed to open trace writer", "error", err.Error()) return err } - conf, err := config.GetConfig(ctx.Viper) + conf, err := config.GetConfig(svrCtx.Viper) if err != nil { logger.Error("failed to get server config", "error", err.Error()) return err @@ -311,7 +310,7 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start return err } - app := opts.AppCreator(ctx.Logger, db, traceWriter, ctx.Viper) + app := opts.AppCreator(svrCtx.Logger, db, traceWriter, svrCtx.Viper) nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile()) if err != nil { @@ -323,25 +322,26 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start var ( tmNode *node.Node - gRPCOnly = ctx.Viper.GetBool(GRPCOnly) + gRPCOnly = svrCtx.Viper.GetBool(GRPCOnly) ) if gRPCOnly { - logger.Info("starting node in query only mode; Tendermint is disabled") + logger.Info("starting node in query only mode; CometBFT is disabled") conf.GRPC.Enable = true conf.JSONRPC.EnableIndexer = false } else { - logger.Info("starting node with ABCI Tendermint in-process") + logger.Info("starting node with ABCI CometBFT in-process") + cmtApp := sdkserver.NewCometABCIWrapper(app) tmNode, err = node.NewNode( cfg, pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), nodeKey, - proxy.NewLocalClientCreator(app), + proxy.NewLocalClientCreator(cmtApp), genDocProvider, - node.DefaultDBProvider, + cmtcfg.DefaultDBProvider, node.DefaultMetricsProvider(cfg.Instrumentation), - ctx.Logger.With("server", "node"), + servercmtlog.CometLoggerWrapper{Logger: svrCtx.Logger.With("server", "node")}, ) if err != nil { logger.Error("failed init node", "error", err.Error()) @@ -368,7 +368,7 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start app.RegisterTxService(clientCtx) app.RegisterTendermintService(clientCtx) - app.RegisterNodeService(clientCtx) + app.RegisterNodeService(clientCtx, conf.Config) } metrics, err := startTelemetry(conf) @@ -378,18 +378,18 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start // Enable metrics if JSONRPC is enabled and --metrics is passed // Flag not added in config to avoid user enabling in config without passing in CLI - if conf.JSONRPC.Enable && ctx.Viper.GetBool(JSONRPCEnableMetrics) { + if conf.JSONRPC.Enable && svrCtx.Viper.GetBool(JSONRPCEnableMetrics) { ethmetricsexp.Setup(conf.JSONRPC.MetricsAddress) } var evmIdxer eth.EVMTxIndexer if conf.JSONRPC.EnableIndexer { - idxDB, err := OpenIndexerDB(home, sdkserver.GetAppDBBackend(ctx.Viper)) + idxDB, err := OpenIndexerDB(home, sdkserver.GetAppDBBackend(svrCtx.Viper)) if err != nil { logger.Error("failed to open evm indexer DB", "error", err.Error()) return err } - evmTxIndexer, evmIndexerService, err := OpenEVMIndexer(ctx, idxDB, clientCtx) + evmTxIndexer, evmIndexerService, err := OpenEVMIndexer(svrCtx, idxDB, clientCtx) if err != nil { logger.Error("failed starting evm indexer service", "error", err.Error()) return err @@ -397,7 +397,7 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start evmIdxer = evmTxIndexer defer func() { if err := evmIndexerService.Stop(); err != nil { - ctx.Logger.Error("failed to stop evm indexer service", "error", err.Error()) + svrCtx.Logger.Error("failed to stop evm indexer service", "error", err.Error()) } }() } @@ -411,118 +411,25 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start clientCtx = clientCtx. WithHomeDir(home). WithChainID(genDoc.ChainID) - - // Set `GRPCClient` to `clientCtx` to enjoy concurrent grpc query. - // only use it if gRPC server is enabled. - if conf.GRPC.Enable { - _, port, err := net.SplitHostPort(conf.GRPC.Address) - if err != nil { - return sdkioerrors.Wrapf(err, "invalid grpc address %s", conf.GRPC.Address) - } - - maxSendMsgSize := conf.GRPC.MaxSendMsgSize - if maxSendMsgSize == 0 { - maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize - } - - maxRecvMsgSize := conf.GRPC.MaxRecvMsgSize - if maxRecvMsgSize == 0 { - maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize - } - - grpcAddress := fmt.Sprintf("127.0.0.1:%s", port) - - // If grpc is enabled, configure grpc rpcClient for grpc gateway and json-rpc. - grpcClient, err := grpc.Dial( - grpcAddress, - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultCallOptions( - grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), - grpc.MaxCallRecvMsgSize(maxRecvMsgSize), - grpc.MaxCallSendMsgSize(maxSendMsgSize), - ), - ) - if err != nil { - return err - } - - clientCtx = clientCtx.WithGRPCClient(grpcClient) - ctx.Logger.Debug("gRPC rpcClient assigned to rpcClient context", "address", grpcAddress) - } } - var apiSrv *api.Server - if conf.API.Enable { - apiSrv = api.New(clientCtx, ctx.Logger.With("server", "api")) - app.RegisterAPIRoutes(apiSrv, conf.API) - - if conf.Telemetry.Enabled { - apiSrv.SetTelemetry(metrics) - } - - errCh := make(chan error) - go func() { - if err := apiSrv.Start(conf.Config); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } - - defer apiSrv.Close() + grpcSrv, clientCtx, err := startGrpcServer(ctx, svrCtx, clientCtx, g, conf.GRPC, app) + if err != nil { + return err } - - var ( - grpcSrv *grpc.Server - grpcWebSrv *http.Server - ) - - if conf.GRPC.Enable { - grpcSrv, err = servergrpc.StartGRPCServer(clientCtx, app, conf.GRPC) - if err != nil { - return err - } - defer grpcSrv.Stop() - if conf.GRPCWeb.Enable { - grpcWebSrv, err = servergrpc.StartGRPCWeb(grpcSrv, conf.Config) - if err != nil { - ctx.Logger.Error("failed to start grpc-web http server", "error", err.Error()) - return err - } - - defer func() { - if err := grpcWebSrv.Close(); err != nil { - logger.Error("failed to close the grpc-web http server", "error", err.Error()) - } - }() - } + if grpcSrv != nil { + defer grpcSrv.GracefulStop() } - var ( - httpSrv *http.Server - httpSrvDone chan struct{} - ) + apiSrv := startAPIServer(ctx, svrCtx, clientCtx, g, conf.Config, app, grpcSrv, metrics) - if conf.JSONRPC.Enable { - genDoc, err := genDocProvider() - if err != nil { - return err - } + if apiSrv != nil { + defer apiSrv.Close() + } - clientCtx := clientCtx.WithChainID(genDoc.ChainID) + clientCtx, httpSrv, httpSrvDone, err := startJSONRPCServer(svrCtx, clientCtx, g, conf, genDocProvider, cfg.RPC.ListenAddress, evmIdxer) - tmEndpoint := "/websocket" - tmRPCAddr := cfg.RPC.ListenAddress - httpSrv, httpSrvDone, err = StartJSONRPC( - ctx, clientCtx, tmRPCAddr, tmEndpoint, &conf, evmIdxer, - ) - if err != nil { - return err - } + if httpSrv != nil { defer func() { shutdownCtx, cancelFn := context.WithTimeout(context.Background(), 10*time.Second) defer cancelFn() @@ -542,60 +449,16 @@ func startInProcess(ctx *sdkserver.Context, clientCtx client.Context, opts Start // we do not need to start Rosetta or handle any Tendermint related processes. if gRPCOnly { // wait for signal capture and gracefully return - return sdkserver.WaitForQuitSignals() + return g.Wait() } - var rosettaSrv crgserver.Server - if conf.Rosetta.Enable { - offlineMode := conf.Rosetta.Offline - - // If GRPC is not enabled rosetta cannot work in online mode, so it works in - // offline mode. - if !conf.GRPC.Enable { - offlineMode = true - } - - minGasPrices, err := sdk.ParseDecCoins(conf.MinGasPrices) - if err != nil { - ctx.Logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) - return err - } - - conf := &rosetta.Config{ - Blockchain: conf.Rosetta.Blockchain, - Network: conf.Rosetta.Network, - TendermintRPC: ctx.Config.RPC.ListenAddress, - GRPCEndpoint: conf.GRPC.Address, - Addr: conf.Rosetta.Address, - Retries: conf.Rosetta.Retries, - Offline: offlineMode, - GasToSuggest: conf.Rosetta.GasToSuggest, - EnableFeeSuggestion: conf.Rosetta.EnableFeeSuggestion, - GasPrices: minGasPrices.Sort(), - Codec: clientCtx.Codec.(*codec.ProtoCodec), - InterfaceRegistry: clientCtx.InterfaceRegistry, - } - - rosettaSrv, err = rosetta.ServerFromConfig(conf) - if err != nil { - return err - } - - errCh := make(chan error) - go func() { - if err := rosettaSrv.Start(); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } + if err := startRosettaServer(svrCtx, clientCtx, g, conf); err != nil { + return err } - // Wait for SIGINT or SIGTERM signal - return sdkserver.WaitForQuitSignals() + + // wait for signal capture and gracefully return + // we are guaranteed to be waiting for the "ListenForQuitSignals" goroutine. + return g.Wait() } // OpenIndexerDB opens the custom eth indexer db, using the same db backend as the main app @@ -611,7 +474,7 @@ func OpenEVMIndexer( evmIndexer := indexer.NewEVMTxIndexer(indexerDb, idxLogger, clientCtx) evmIndexerService := NewEVMIndexerService(evmIndexer, clientCtx.Client.(cmtrpcclient.Client)) - evmIndexerService.SetLogger(idxLogger) + evmIndexerService.SetLogger(servercmtlog.CometLoggerWrapper{Logger: idxLogger}) errCh := make(chan error) go func() { @@ -622,7 +485,7 @@ func OpenEVMIndexer( select { case err := <-errCh: return nil, nil, err - case <-time.After(types.ServerStartTime): // assume server started successfully + case <-time.After(ServerStartTime): // assume server started successfully } return evmIndexer, evmIndexerService, nil } @@ -647,47 +510,173 @@ func startTelemetry(cfg config.Config) (*telemetry.Metrics, error) { return telemetry.New(cfg.Telemetry) } -// WaitForQuitSignals waits for SIGINT and SIGTERM and returns. -func WaitForQuitSignals() sdkserver.ErrorCode { - sigs := make(chan os.Signal, 1) - signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) - sig := <-sigs - return sdkserver.ErrorCode{Code: int(sig.(syscall.Signal)) + 128} +func getCtx(svrCtx *sdkserver.Context, block bool) (*errgroup.Group, context.Context) { + ctx, cancelFn := context.WithCancel(context.Background()) + g, ctx := errgroup.WithContext(ctx) + // listen for quit signals so the calling parent process can gracefully exit + sdkserver.ListenForQuitSignals(g, block, cancelFn, svrCtx.Logger) + return g, ctx } -// wrapCPUProfile runs callback in a goroutine, then wait for quit signals. -func wrapCPUProfile(ctx *sdkserver.Context, callback func() error) error { - if cpuProfile := ctx.Viper.GetString(CPUProfile); cpuProfile != "" { - f, err := os.Create(cpuProfile) - if err != nil { - return err - } +func startGrpcServer( + ctx context.Context, + svrCtx *sdkserver.Context, + clientCtx client.Context, + g *errgroup.Group, + config serverconfig.GRPCConfig, + app types.Application, +) (*grpc.Server, client.Context, error) { + if !config.Enable { + // return grpcServer as nil if gRPC is disabled + return nil, clientCtx, nil + } + _, port, err := net.SplitHostPort(config.Address) + if err != nil { + return nil, clientCtx, sdkioerrors.Wrapf(err, "invalid grpc address %s", config.Address) + } - ctx.Logger.Info("starting CPU profiler", "profile", cpuProfile) - if err := pprof.StartCPUProfile(f); err != nil { - return err - } + maxSendMsgSize := config.MaxSendMsgSize + if maxSendMsgSize == 0 { + maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize + } - defer func() { - ctx.Logger.Info("stopping CPU profiler", "profile", cpuProfile) - pprof.StopCPUProfile() - if err := f.Close(); err != nil { - ctx.Logger.Info("failed to close cpu-profile file", "profile", cpuProfile, "err", err.Error()) - } - }() + maxRecvMsgSize := config.MaxRecvMsgSize + if maxRecvMsgSize == 0 { + maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize } - errCh := make(chan error) - go func() { - errCh <- callback() - }() + grpcAddress := fmt.Sprintf("127.0.0.1:%s", port) + + // if gRPC is enabled, configure gRPC client for gRPC gateway and json-rpc + grpcClient, err := grpc.NewClient( + grpcAddress, + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithDefaultCallOptions( + grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), + grpc.MaxCallRecvMsgSize(maxRecvMsgSize), + grpc.MaxCallSendMsgSize(maxSendMsgSize), + ), + ) + if err != nil { + return nil, clientCtx, err + } + // Set `GRPCClient` to `clientCtx` to enjoy concurrent grpc query. + // only use it if gRPC server is enabled. + clientCtx = clientCtx.WithGRPCClient(grpcClient) + svrCtx.Logger.Debug("gRPC client assigned to client context", "address", config.Address) - select { - case err := <-errCh: + grpcSrv, err := servergrpc.NewGRPCServer(clientCtx, app, config) + if err != nil { + return nil, clientCtx, err + } + + // Start the gRPC server in a goroutine. Note, the provided ctx will ensure + // that the server is gracefully shut down. + g.Go(func() error { + return servergrpc.StartGRPCServer(ctx, svrCtx.Logger.With("module", "grpc-server"), config, grpcSrv) + }) + return grpcSrv, clientCtx, nil +} + +func startAPIServer( + ctx context.Context, + svrCtx *sdkserver.Context, + clientCtx client.Context, + g *errgroup.Group, + svrCfg serverconfig.Config, + app types.Application, + grpcSrv *grpc.Server, + metrics *telemetry.Metrics, +) *api.Server { + if !svrCfg.API.Enable { + return nil + } + + apiSrv := api.New(clientCtx, svrCtx.Logger.With("server", "api"), grpcSrv) + app.RegisterAPIRoutes(apiSrv, svrCfg.API) + + if svrCfg.Telemetry.Enabled { + apiSrv.SetTelemetry(metrics) + } + + g.Go(func() error { + return apiSrv.Start(ctx, svrCfg) + }) + return apiSrv +} + +func startJSONRPCServer( + svrCtx *sdkserver.Context, + clientCtx client.Context, + g *errgroup.Group, + config config.Config, + genDocProvider node.GenesisDocProvider, + cmtRPCAddr string, + idxer eth.EVMTxIndexer, +) (ctx client.Context, httpSrv *http.Server, httpSrvDone chan struct{}, err error) { + ctx = clientCtx + if !config.JSONRPC.Enable { + return + } + + genDoc, err := genDocProvider() + if err != nil { + return ctx, httpSrv, httpSrvDone, err + } + + ctx = clientCtx.WithChainID(genDoc.ChainID) + cmtEndpoint := "/websocket" + g.Go(func() error { + httpSrv, httpSrvDone, err = StartJSONRPC(svrCtx, clientCtx, cmtRPCAddr, cmtEndpoint, &config, idxer) + return err + }) + return +} + +func startRosettaServer( + svrCtx *sdkserver.Context, + clientCtx client.Context, + g *errgroup.Group, + config config.Config, +) error { + if !config.Rosetta.Enable { + return nil + } + + offlineMode := config.Rosetta.Offline + + // If GRPC is not enabled rosetta cannot work in online mode, so it works in + // offline mode. + if !config.GRPC.Enable { + offlineMode = true + } + + minGasPrices, err := sdk.ParseDecCoins(config.MinGasPrices) + if err != nil { + svrCtx.Logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) return err + } - case <-time.After(types.ServerStartTime): + conf := &rosetta.Config{ + Blockchain: config.Rosetta.Blockchain, + Network: config.Rosetta.Network, + TendermintRPC: svrCtx.Config.RPC.ListenAddress, + GRPCEndpoint: config.GRPC.Address, + Addr: config.Rosetta.Addr, + Retries: config.Rosetta.Retries, + Offline: offlineMode, + GasToSuggest: config.Rosetta.GasToSuggest, + EnableFeeSuggestion: config.Rosetta.EnableFeeSuggestion, + GasPrices: minGasPrices.Sort(), + Codec: clientCtx.Codec.(*codec.ProtoCodec), + InterfaceRegistry: clientCtx.InterfaceRegistry, + } + + rosettaSrv, err := rosetta.ServerFromConfig(conf) + if err != nil { + return err } - return WaitForQuitSignals() + g.Go(rosettaSrv.Start) + return nil } From affac4de4e8042eaf0f86056c9375149b8b18c57 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 28 Apr 2025 17:04:45 +0700 Subject: [PATCH 12/72] use servercmtlog and use correct abci types --- eth/eip712/eip712_test.go | 93 +++++++++++++++++++++--------- eth/eip712/encoding.go | 13 +++-- eth/eip712/encoding_legacy.go | 25 +++++--- eth/gas_limit.go | 29 +++++----- eth/gas_limit_test.go | 23 ++++---- eth/indexer/evm_tx_indexer.go | 2 +- eth/indexer/evm_tx_indexer_test.go | 20 +++---- eth/rpc/backend/account_info.go | 6 +- eth/rpc/backend/backend.go | 2 +- eth/rpc/backend/blocks.go | 4 +- eth/rpc/backend/call_tx.go | 3 +- eth/rpc/backend/tx_logs_test.go | 4 +- eth/rpc/backend/utils.go | 2 +- eth/rpc/rpcapi/apis.go | 5 +- eth/rpc/rpcapi/debugapi/api.go | 3 +- eth/rpc/rpcapi/eth_api.go | 2 +- eth/rpc/rpcapi/eth_api_test.go | 4 +- eth/rpc/rpcapi/eth_filters_api.go | 6 +- eth/rpc/rpcapi/event_subscriber.go | 2 +- 19 files changed, 154 insertions(+), 94 deletions(-) diff --git a/eth/eip712/eip712_test.go b/eth/eip712/eip712_test.go index 42cd5ad063..42baf28b3c 100644 --- a/eth/eip712/eip712_test.go +++ b/eth/eip712/eip712_test.go @@ -7,7 +7,12 @@ import ( "reflect" "testing" + "google.golang.org/protobuf/types/known/anypb" + + basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" sdkmath "cosmossdk.io/math" + txsigning "cosmossdk.io/x/tx/signing" sdkcodec "github.com/cosmos/cosmos-sdk/codec/types" chainparams "cosmossdk.io/simapp/params" @@ -27,9 +32,10 @@ import ( "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdktx "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/NibiruChain/nibiru/v2/eth/encoding" @@ -120,9 +126,9 @@ func (suite *EIP712TestSuite) makeCoins(denom string, amount sdkmath.Int) sdk.Co func (suite *EIP712TestSuite) TestEIP712() { suite.SetupTest() - signModes := []signing.SignMode{ - signing.SignMode_SIGN_MODE_DIRECT, - signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, + signModes := []signingv1beta1.SignMode{ + signingv1beta1.SignMode_SIGN_MODE_DIRECT, + signingv1beta1.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, } params := EIP712TestParams{ @@ -169,8 +175,8 @@ func (suite *EIP712TestSuite) TestEIP712() { title: "Succeeds - Standard MsgDelegate", msgs: []sdk.Msg{ stakingtypes.NewMsgDelegate( - suite.createTestAddress(), - sdk.ValAddress(suite.createTestAddress()), + suite.createTestAddress().String(), + sdk.ValAddress(suite.createTestAddress()).String(), suite.makeCoins(suite.denom, sdkmath.NewInt(1))[0], ), }, @@ -180,8 +186,8 @@ func (suite *EIP712TestSuite) TestEIP712() { title: "Succeeds - Standard MsgWithdrawDelegationReward", msgs: []sdk.Msg{ distributiontypes.NewMsgWithdrawDelegatorReward( - suite.createTestAddress(), - sdk.ValAddress(suite.createTestAddress()), + suite.createTestAddress().String(), + sdk.ValAddress(suite.createTestAddress()).String(), ), }, expectSuccess: true, @@ -190,13 +196,13 @@ func (suite *EIP712TestSuite) TestEIP712() { title: "Succeeds - Two Single-Signer MsgDelegate", msgs: []sdk.Msg{ stakingtypes.NewMsgDelegate( - params.address, - sdk.ValAddress(suite.createTestAddress()), + params.address.String(), + sdk.ValAddress(suite.createTestAddress()).String(), suite.makeCoins(suite.denom, sdkmath.NewInt(1))[0], ), stakingtypes.NewMsgDelegate( - params.address, - sdk.ValAddress(suite.createTestAddress()), + params.address.String(), + sdk.ValAddress(suite.createTestAddress()).String(), suite.makeCoins(suite.denom, sdkmath.NewInt(5))[0], ), }, @@ -297,15 +303,9 @@ func (suite *EIP712TestSuite) TestEIP712() { title: "Fails - Single Message / Multi-Signer", msgs: []sdk.Msg{ banktypes.NewMsgMultiSend( - []banktypes.Input{ - banktypes.NewInput( - suite.createTestAddress(), - suite.makeCoins(suite.denom, sdkmath.NewInt(50)), - ), - banktypes.NewInput( - suite.createTestAddress(), - suite.makeCoins(suite.denom, sdkmath.NewInt(50)), - ), + banktypes.Input{ + Address: suite.createTestAddress().String(), + Coins: suite.makeCoins(suite.denom, sdkmath.NewInt(50)), }, []banktypes.Output{ banktypes.NewOutput( @@ -340,7 +340,7 @@ func (suite *EIP712TestSuite) TestEIP712() { // Prepare signature field with empty signatures txSigData := signing.SingleSignatureData{ - SignMode: signMode, + SignMode: signing.SignMode(*signMode.Enum()), Signature: nil, } txSig := signing.SignatureV2{ @@ -361,25 +361,64 @@ func (suite *EIP712TestSuite) TestEIP712() { txBuilder.SetTimeoutHeight(tc.timeoutHeight) } - signerData := authsigning.SignerData{ + anyPk, _ := codectypes.NewAnyWithValue(pubKey) + + signerData := txsigning.SignerData{ ChainID: chainID, AccountNumber: params.accountNumber, Sequence: params.sequence, - PubKey: pubKey, - Address: sdk.MustBech32ifyAddressBytes(appconst.AccountAddressPrefix, pubKey.Bytes()), + PubKey: &anypb.Any{ + TypeUrl: anyPk.TypeUrl, + Value: anyPk.Value, + }, + Address: sdk.MustBech32ifyAddressBytes(appconst.AccountAddressPrefix, pubKey.Bytes()), + } + + tx := txBuilder.GetTx() + anyMsgs := make([]*anypb.Any, len(tx.GetMsgs())) + for j, msg := range tx.GetMsgs() { + legacyAny, err := codectypes.NewAnyWithValue(msg) + suite.Require().NoError(err) + anyMsgs[j] = &anypb.Any{ + TypeUrl: legacyAny.TypeUrl, + Value: legacyAny.Value, + } + } + + var feeCoins []*basev1beta1.Coin + for _, coin := range tx.GetFee() { + feeCoins = append(feeCoins, &basev1beta1.Coin{ + Denom: coin.Denom, + Amount: coin.Amount.String(), + }) + } + + txData := txsigning.TxData{ + Body: &txv1beta1.TxBody{ + Memo: tx.GetMemo(), + Messages: anyMsgs, + TimeoutHeight: tx.GetTimeoutHeight(), + }, + AuthInfo: &txv1beta1.AuthInfo{ + Fee: &txv1beta1.Fee{ + Amount: feeCoins, + GasLimit: tx.GetGas(), + }, + }, } bz, err := suite.clientCtx.TxConfig.SignModeHandler().GetSignBytes( + suite.clientCtx.CmdContext, signMode, signerData, - txBuilder.GetTx(), + txData, ) suite.Require().NoError(err) suite.verifyEIP712SignatureVerification(tc.expectSuccess, *privKey, *pubKey, bz) // Verify payload flattening only if the payload is in valid JSON format - if signMode == signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON { + if signMode == signingv1beta1.SignMode_SIGN_MODE_LEGACY_AMINO_JSON { suite.verifySignDocFlattening(bz) if tc.expectSuccess { diff --git a/eth/eip712/encoding.go b/eth/eip712/encoding.go index 2950d68b10..ca116dd6d6 100644 --- a/eth/eip712/encoding.go +++ b/eth/eip712/encoding.go @@ -171,8 +171,6 @@ func decodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { Gas: authInfo.Fee.GasLimit, } - tip := authInfo.Tip - // WrapTxToTypedData expects the payload as an Amino Sign Doc signBytes := legacytx.StdSignBytes( signDoc.ChainId, @@ -182,7 +180,6 @@ func decodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { *stdFee, msgs, body.Memo, - tip, ) typedData, err := WrapTxToTypedData( @@ -216,16 +213,20 @@ func validatePayloadMessages(msgs []sdk.Msg) error { var msgSigner sdk.AccAddress for i, m := range msgs { - if len(m.GetSigners()) != 1 { + signers, _, err := protoCodec.GetMsgV1Signers(m) + if err != nil { + return fmt.Errorf("error getting signers. %w", err) + } + if len(signers) != 1 { return errors.New("unable to build EIP-712 payload: expect exactly 1 signer") } if i == 0 { - msgSigner = m.GetSigners()[0] + msgSigner = signers[0] continue } - if !msgSigner.Equals(m.GetSigners()[0]) { + if !msgSigner.Equals(sdk.AccAddress(signers[0])) { return errors.New("unable to build EIP-712 payload: multiple signers detected") } } diff --git a/eth/eip712/encoding_legacy.go b/eth/eip712/encoding_legacy.go index 23f943eaf3..0dc7ff3d40 100644 --- a/eth/eip712/encoding_legacy.go +++ b/eth/eip712/encoding_legacy.go @@ -90,7 +90,11 @@ func legacyDecodeAminoSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { msg := msgs[0] // By convention, the fee payer is the first address in the list of signers. - feePayer := msg.GetSigners()[0] + signers, _, err := protoCodec.GetMsgV1Signers(msg) + if err != nil { + return apitypes.TypedData{}, err + } + feePayer := signers[0] feeDelegation := &FeeDelegationOptions{ FeePayer: feePayer, } @@ -168,13 +172,15 @@ func legacyDecodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error Gas: authInfo.Fee.GasLimit, } - feePayer := msg.GetSigners()[0] + signers, _, err := protoCodec.GetMsgV1Signers(msg) + if err != nil { + return apitypes.TypedData{}, err + } + feePayer := signers[0] feeDelegation := &FeeDelegationOptions{ FeePayer: feePayer, } - tip := authInfo.Tip - // WrapTxToTypedData expects the payload as an Amino Sign Doc signBytes := legacytx.StdSignBytes( signDoc.ChainId, @@ -184,7 +190,6 @@ func legacyDecodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error *stdFee, msgs, body.Memo, - tip, ) typedData, err := LegacyWrapTxToTypedData( @@ -217,13 +222,17 @@ func legacyValidatePayloadMessages(msgs []sdk.Msg) error { return err } - if len(m.GetSigners()) != 1 { + signers, _, err := protoCodec.GetMsgV1Signers(m) + if err != nil { + return err + } + if len(signers) != 1 { return errors.New("unable to build EIP-712 payload: expect exactly 1 signer") } if i == 0 { msgType = t - msgSigner = m.GetSigners()[0] + msgSigner = signers[0] continue } @@ -231,7 +240,7 @@ func legacyValidatePayloadMessages(msgs []sdk.Msg) error { return errors.New("unable to build EIP-712 payload: different types of messages detected") } - if !msgSigner.Equals(m.GetSigners()[0]) { + if !msgSigner.Equals(sdk.AccAddress(signers[0])) { return errors.New("unable to build EIP-712 payload: multiple signers detected") } } diff --git a/eth/gas_limit.go b/eth/gas_limit.go index 1606bd6934..e68e9fe5a5 100644 --- a/eth/gas_limit.go +++ b/eth/gas_limit.go @@ -6,7 +6,10 @@ import ( fmt "fmt" math "math" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" ) // BlockGasLimit: Gas (limit) as defined by the block gas meter. Gas limit is @@ -22,7 +25,7 @@ func BlockGasLimit(ctx sdk.Context) (gasLimit uint64) { // Otherwise get from the consensus parameters cp := ctx.ConsensusParams() - if cp == nil || cp.Block == nil { + if cp == (cmtproto.ConsensusParams{}) || cp.Block == nil { return 0 } @@ -42,7 +45,7 @@ func BlockGasLimit(ctx sdk.Context) (gasLimit uint64) { } // NewInfiniteGasMeterWithLimit returns a reference to a new infiniteGasMeter. -func NewInfiniteGasMeterWithLimit(limit sdk.Gas) sdk.GasMeter { +func NewInfiniteGasMeterWithLimit(limit storetypes.Gas) storetypes.GasMeter { return &InfiniteGasMeter{ consumed: 0, limit: limit, @@ -51,23 +54,23 @@ func NewInfiniteGasMeterWithLimit(limit sdk.Gas) sdk.GasMeter { // NewInfiniteGasMeter: Alias for an infinite gas meter // ([NewInfiniteGasMeterWithLimitla)] with a tracked but unenforced gas limit. -func NewInfiniteGasMeter() sdk.GasMeter { +func NewInfiniteGasMeter() storetypes.GasMeter { return NewInfiniteGasMeterWithLimit(math.MaxUint64) } -var _ sdk.GasMeter = &InfiniteGasMeter{} +var _ storetypes.GasMeter = &InfiniteGasMeter{} -// InfiniteGasMeter: A special impl of `sdk.GasMeter` that ignores any gas +// InfiniteGasMeter: A special impl of `storetypes.GasMeter` that ignores any gas // limits, allowing an unlimited amount of gas to be consumed. This is especially // useful for scenarios where gas consumption needs to be monitored but not // restricted, such as during testing or in parts of the chain where constraints // are meant to be set differently. type InfiniteGasMeter struct { // consumed: Tracks the amount of gas units consumed. - consumed sdk.Gas + consumed storetypes.Gas // limit: Nominal unit for the gas limit, which is not enforced in a way that // restricts consumption. - limit sdk.Gas + limit storetypes.Gas } // GasConsumedToLimit returns the gas limit if gas consumed is past the limit, @@ -75,17 +78,17 @@ type InfiniteGasMeter struct { // // Note that This function is used when recovering // from a panic in "BlockGasMeter" when the consumed gas passes the limit. -func (g *InfiniteGasMeter) GasConsumedToLimit() sdk.Gas { +func (g *InfiniteGasMeter) GasConsumedToLimit() storetypes.Gas { return g.consumed } // GasConsumed returns the gas consumed from the GasMeter. -func (g *InfiniteGasMeter) GasConsumed() sdk.Gas { +func (g *InfiniteGasMeter) GasConsumed() storetypes.Gas { return g.consumed } // Limit returns the gas limit of the GasMeter. -func (g *InfiniteGasMeter) Limit() sdk.Gas { +func (g *InfiniteGasMeter) Limit() storetypes.Gas { return g.limit } @@ -100,7 +103,7 @@ func addUint64Overflow(a, b uint64) (uint64, bool) { } // ConsumeGas adds the given amount of gas to the gas consumed and panics if it overflows the limit or out of gas. -func (g *InfiniteGasMeter) ConsumeGas(amount sdk.Gas, descriptor string) { +func (g *InfiniteGasMeter) ConsumeGas(amount storetypes.Gas, descriptor string) { var overflow bool // TODO: Should we set the consumed field after overflow checking? g.consumed, overflow = addUint64Overflow(g.consumed, amount) @@ -115,7 +118,7 @@ func (g *InfiniteGasMeter) ConsumeGas(amount sdk.Gas, descriptor string) { // Use case: This functionality enables refunding gas to the trasaction or block gas pools so that // EVM-compatible chains can fully support the go-ethereum StateDb interface. // See https://github.com/cosmos/cosmos-sdk/pull/9403 for reference. -func (g *InfiniteGasMeter) RefundGas(amount sdk.Gas, descriptor string) { +func (g *InfiniteGasMeter) RefundGas(amount storetypes.Gas, descriptor string) { if g.consumed < amount { panic(ErrorNegativeGasConsumed{Descriptor: descriptor}) } @@ -144,7 +147,7 @@ func (g *InfiniteGasMeter) String() string { } // GasRemaining returns MaxUint64 since limit is not confined in infiniteGasMeter. -func (g *InfiniteGasMeter) GasRemaining() sdk.Gas { +func (g *InfiniteGasMeter) GasRemaining() storetypes.Gas { return math.MaxUint64 } diff --git a/eth/gas_limit_test.go b/eth/gas_limit_test.go index 5e0f68ccb5..a250537fca 100644 --- a/eth/gas_limit_test.go +++ b/eth/gas_limit_test.go @@ -3,12 +3,13 @@ package eth_test import ( "math" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/v2/eth" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" ) // TestGasMeter: Ensures correct behvaior of the `InfiniteGasMeterWithLimit` @@ -37,8 +38,8 @@ func (s *Suite) TestGasMeter() { s.False(meter.IsOutOfGas()) // Consume large amount fo gas to test overflow handling - meter.ConsumeGas(sdk.Gas(math.MaxUint64/2), "consume half max uint64") - s.Require().Panics(func() { meter.ConsumeGas(sdk.Gas(math.MaxUint64/2)+2, "panic") }) + meter.ConsumeGas(storetypes.Gas(math.MaxUint64/2), "consume half max uint64") + s.Require().Panics(func() { meter.ConsumeGas(storetypes.Gas(math.MaxUint64/2)+2, "panic") }) s.Require().Panics(func() { meter.RefundGas(meter.GasConsumed()+1, "refund greater than consumed") }) // Additional tests for RefundGas @@ -55,7 +56,7 @@ func (s *Suite) TestGasMeter() { // Additional tests for IsPastLimit and IsOutOfGas with high gas usage s.Equal(uint64(math.MaxUint64), meter.GasRemaining()) - meter.ConsumeGas(sdk.Gas(math.MaxUint64-1), "consume nearly all gas") + meter.ConsumeGas(storetypes.Gas(math.MaxUint64-1), "consume nearly all gas") s.Equal(uint64(math.MaxUint64), meter.GasRemaining()) s.Require().False(meter.IsPastLimit()) s.Require().False(meter.IsOutOfGas()) @@ -106,7 +107,7 @@ func (s *Suite) TestBlockGasLimit() { name: "BlockGasMeter is nil and ConsensusParams is nil", setupContext: func() sdk.Context { ctx := newCtx() - ctx = ctx.WithConsensusParams(nil) + ctx = ctx.WithConsensusParams(cmtproto.ConsensusParams{}) return ctx }, wantGasLimit: 0, @@ -115,8 +116,8 @@ func (s *Suite) TestBlockGasLimit() { name: "BlockGasMeter is nil and ConsensusParams has Block with MaxGas -1", setupContext: func() sdk.Context { ctx := newCtx() - cp := &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + cp := cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{ MaxGas: -1, }, } @@ -129,8 +130,8 @@ func (s *Suite) TestBlockGasLimit() { name: "BlockGasMeter is nil and ConsensusParams has Block with MaxGas > 0", setupContext: func() sdk.Context { ctx := newCtx() - cp := &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + cp := cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{ MaxGas: 1000, }, } @@ -143,8 +144,8 @@ func (s *Suite) TestBlockGasLimit() { name: "BlockGasMeter is nil and ConsensusParams has Block with MaxGas 0", setupContext: func() sdk.Context { ctx := newCtx() - cp := &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ + cp := cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{ MaxGas: 0, }, } diff --git a/eth/indexer/evm_tx_indexer.go b/eth/indexer/evm_tx_indexer.go index 9af266690c..0036b8203b 100644 --- a/eth/indexer/evm_tx_indexer.go +++ b/eth/indexer/evm_tx_indexer.go @@ -5,8 +5,8 @@ import ( "fmt" sdkioerrors "cosmossdk.io/errors" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" diff --git a/eth/indexer/evm_tx_indexer_test.go b/eth/indexer/evm_tx_indexer_test.go index 717349a704..bd31a15302 100644 --- a/eth/indexer/evm_tx_indexer_test.go +++ b/eth/indexer/evm_tx_indexer_test.go @@ -5,10 +5,10 @@ import ( "math/big" "testing" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" cmttypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" @@ -64,7 +64,7 @@ func TestEVMTxIndexer(t *testing.T) { testCases := []struct { name string block *cmttypes.Block - blockResult []*abci.ResponseDeliverTx + blockResult []*abci.ExecTxResult expSuccess bool }{ { @@ -73,7 +73,7 @@ func TestEVMTxIndexer(t *testing.T) { Header: cmttypes.Header{Height: 1}, Data: cmttypes.Data{Txs: []cmttypes.Tx{validEVMTxBz}}, }, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -92,7 +92,7 @@ func TestEVMTxIndexer(t *testing.T) { { "happy: code 0, pending_ethereum_tx and typed EventEthereumTx present", &cmttypes.Block{Header: cmttypes.Header{Height: 1}, Data: cmttypes.Data{Txs: []cmttypes.Tx{validEVMTxBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -121,7 +121,7 @@ func TestEVMTxIndexer(t *testing.T) { { "happy: code 11, exceed block gas limit", &cmttypes.Block{Header: cmttypes.Header{Height: 1}, Data: cmttypes.Data{Txs: []cmttypes.Tx{validEVMTxBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 11, Log: "out of gas in location: block gas meter; gasWanted: 21000", @@ -133,7 +133,7 @@ func TestEVMTxIndexer(t *testing.T) { { "sad: failed eth tx", &cmttypes.Block{Header: cmttypes.Header{Height: 1}, Data: cmttypes.Data{Txs: []cmttypes.Tx{validEVMTxBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 15, Log: "nonce mismatch", @@ -145,7 +145,7 @@ func TestEVMTxIndexer(t *testing.T) { { "sad: invalid events", &cmttypes.Block{Header: cmttypes.Header{Height: 1}, Data: cmttypes.Data{Txs: []cmttypes.Tx{validEVMTxBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{}, @@ -156,7 +156,7 @@ func TestEVMTxIndexer(t *testing.T) { { "sad: not eth tx", &cmttypes.Block{Header: cmttypes.Header{Height: 1}, Data: cmttypes.Data{Txs: []cmttypes.Tx{invalidTxBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{}, @@ -169,7 +169,7 @@ func TestEVMTxIndexer(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { db := dbm.NewMemDB() - idxer := indexer.NewEVMTxIndexer(db, tmlog.NewNopLogger(), clientCtx) + idxer := indexer.NewEVMTxIndexer(db, log.NewNopLogger(), clientCtx) err = idxer.IndexBlock(tc.block, tc.blockResult) require.NoError(t, err) diff --git a/eth/rpc/backend/account_info.go b/eth/rpc/backend/account_info.go index d884b28ca8..185695721e 100644 --- a/eth/rpc/backend/account_info.go +++ b/eth/rpc/backend/account_info.go @@ -8,6 +8,8 @@ import ( sdkioerrors "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" + "github.com/cometbft/cometbft/libs/bytes" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -109,7 +111,7 @@ func (b *Backend) GetProof( } // query account proofs - accountKey := authtypes.AddressStoreKey(address.Bytes()) + accountKey := bytes.HexBytes(append(authtypes.AddressStoreKeyPrefix, address.Bytes()...)) _, proof, err := b.queryClient.GetProof(clientCtx, authtypes.StoreKey, accountKey) if err != nil { return nil, err @@ -220,7 +222,7 @@ func (b *Backend) GetTransactionCount(address gethcommon.Address, blockNum rpc.B } includePending := blockNum == rpc.EthPendingBlockNumber - nonce, err := b.getAccountNonce(address, includePending, blockNum.Int64(), b.logger) + nonce, err := b.getAccountNonce(address, includePending, blockNum.Int64(), servercmtlog.CometLoggerWrapper{Logger: b.logger}) if err != nil { return nil, err } diff --git a/eth/rpc/backend/backend.go b/eth/rpc/backend/backend.go index ecbe94f5f1..750dd190dc 100644 --- a/eth/rpc/backend/backend.go +++ b/eth/rpc/backend/backend.go @@ -5,7 +5,7 @@ import ( "context" "math/big" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" diff --git a/eth/rpc/backend/blocks.go b/eth/rpc/backend/blocks.go index bdb63ee459..ebb3db5b6e 100644 --- a/eth/rpc/backend/blocks.go +++ b/eth/rpc/backend/blocks.go @@ -335,11 +335,11 @@ func (b *Backend) HeaderByNumber(blockNum rpc.BlockNumber) (*gethcore.Header, er // BlockBloom query block bloom filter from block results func (b *Backend) BlockBloom(blockRes *tmrpctypes.ResultBlockResults) (bloom gethcore.Bloom) { - if blockRes == nil || len(blockRes.EndBlockEvents) == 0 { + if blockRes == nil || len(blockRes.FinalizeBlockEvents) == 0 { return bloom } msgType := proto.MessageName((*evm.EventBlockBloom)(nil)) - for _, event := range blockRes.EndBlockEvents { + for _, event := range blockRes.FinalizeBlockEvents { if event.Type != msgType { continue } diff --git a/eth/rpc/backend/call_tx.go b/eth/rpc/backend/call_tx.go index b8faab34c9..643f3e80e9 100644 --- a/eth/rpc/backend/call_tx.go +++ b/eth/rpc/backend/call_tx.go @@ -11,6 +11,7 @@ import ( sdkioerrors "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -152,7 +153,7 @@ func (b *Backend) SetTxDefaults(args evm.JsonTxArgs) (evm.JsonTxArgs, error) { if args.Nonce == nil && args.From != nil { // get the nonce from the account retriever // ignore error in case the account doesn't exist yet - nonce, _ := b.getAccountNonce(*args.From, true, 0, b.logger) // #nosec G703s + nonce, _ := b.getAccountNonce(*args.From, true, 0, servercmtlog.CometLoggerWrapper{Logger: b.logger}) // #nosec G703s args.Nonce = (*hexutil.Uint64)(&nonce) } diff --git a/eth/rpc/backend/tx_logs_test.go b/eth/rpc/backend/tx_logs_test.go index 3c5a81e4f3..3390b366eb 100644 --- a/eth/rpc/backend/tx_logs_test.go +++ b/eth/rpc/backend/tx_logs_test.go @@ -4,6 +4,8 @@ import ( "fmt" "math/big" + sdkmath "cosmossdk.io/math" + tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" @@ -77,7 +79,7 @@ func (s *BackendSuite) TestLogs() { nonce++ txResp, err = s.network.BroadcastMsgs(s.node.Address, &nonce, &evm.MsgConvertCoinToEvm{ Sender: s.node.Address.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdk.NewInt(1)), + BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(1)), ToEthAddr: eth.EIP55Addr{ Address: s.fundedAccEthAddr, }, diff --git a/eth/rpc/backend/utils.go b/eth/rpc/backend/utils.go index 7bc5687f1b..1fbdea3b7a 100644 --- a/eth/rpc/backend/utils.go +++ b/eth/rpc/backend/utils.go @@ -229,7 +229,7 @@ func TxLogsFromEvents(events []abci.Event, msgIndex int) ([]*gethcore.Log, error // ShouldIgnoreGasUsed returns true if the gasUsed in result should be ignored // workaround for issue: https://github.com/cosmos/cosmos-sdk/issues/10832 -func ShouldIgnoreGasUsed(res *abci.ResponseDeliverTx) bool { +func ShouldIgnoreGasUsed(res *abci.ExecTxResult) bool { return res.GetCode() == 11 && strings.Contains(res.GetLog(), "no block gas left to run tx: out of gas") } diff --git a/eth/rpc/rpcapi/apis.go b/eth/rpc/rpcapi/apis.go index 3d43cafe85..3fec0a9cdd 100644 --- a/eth/rpc/rpcapi/apis.go +++ b/eth/rpc/rpcapi/apis.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/ethereum/go-ethereum/rpc" @@ -65,7 +66,7 @@ func init() { { Namespace: NamespaceEth, Version: apiVersion, - Service: NewImplFiltersAPI(ctx.Logger, clientCtx, tmWSClient, evmBackend), + Service: NewImplFiltersAPI(servercmtlog.CometLoggerWrapper{Logger: ctx.Logger}, clientCtx, tmWSClient, evmBackend), Public: true, }, } @@ -95,7 +96,7 @@ func init() { { Namespace: NamespaceTxPool, Version: apiVersion, - Service: NewImplTxPoolAPI(ctx.Logger), + Service: NewImplTxPoolAPI(servercmtlog.CometLoggerWrapper{Logger: ctx.Logger}), Public: true, }, } diff --git a/eth/rpc/rpcapi/debugapi/api.go b/eth/rpc/rpcapi/debugapi/api.go index e67dd9cd7e..8439e96bea 100644 --- a/eth/rpc/rpcapi/debugapi/api.go +++ b/eth/rpc/rpcapi/debugapi/api.go @@ -20,6 +20,7 @@ import ( "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/cosmos/cosmos-sdk/server" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/cometbft/cometbft/libs/log" "github.com/ethereum/go-ethereum/common" @@ -58,7 +59,7 @@ func NewImplDebugAPI( ) *DebugAPI { return &DebugAPI{ ctx: ctx, - logger: ctx.Logger.With("module", "debug"), + logger: servercmtlog.CometLoggerWrapper{Logger: ctx.Logger.With("module", "debug")}, backend: backend, handler: new(HandlerT), } diff --git a/eth/rpc/rpcapi/eth_api.go b/eth/rpc/rpcapi/eth_api.go index dcc88aaae2..e47ec2a316 100644 --- a/eth/rpc/rpcapi/eth_api.go +++ b/eth/rpc/rpcapi/eth_api.go @@ -7,7 +7,7 @@ import ( gethmath "github.com/ethereum/go-ethereum/common/math" gethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/eth/rpc/rpcapi/eth_api_test.go b/eth/rpc/rpcapi/eth_api_test.go index 08a06927a6..e174361ecd 100644 --- a/eth/rpc/rpcapi/eth_api_test.go +++ b/eth/rpc/rpcapi/eth_api_test.go @@ -10,8 +10,8 @@ import ( "strings" "testing" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" - cmtlog "github.com/cometbft/cometbft/libs/log" cmtrpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" @@ -76,7 +76,7 @@ type Suite struct { func (s *Suite) TestExpectedMethods() { serverCtx := server.NewDefaultContext() - serverCtx.Logger = cmtlog.TestingLogger() + serverCtx.Logger = log.NewTestLogger(s.T()) apis := rpcapi.GetRPCAPIs( serverCtx, client.Context{}, &cmtrpcclient.WSClient{}, diff --git a/eth/rpc/rpcapi/eth_filters_api.go b/eth/rpc/rpcapi/eth_filters_api.go index 91825aa620..5136ac6e0b 100644 --- a/eth/rpc/rpcapi/eth_filters_api.go +++ b/eth/rpc/rpcapi/eth_filters_api.go @@ -327,19 +327,19 @@ func (api *FiltersAPI) NewHeads(ctx context.Context) (*gethrpc.Subscription, err return } - data, ok := ev.Data.(cmttypes.EventDataNewBlockHeader) + data, ok := ev.Data.(cmttypes.EventDataNewBlock) if !ok { api.logger.Debug("event data type mismatch", "type", fmt.Sprintf("%T", ev.Data)) continue } var baseFee *big.Int = nil - bloom, err := ParseBloomFromEvents(data.ResultEndBlock.Events) + bloom, err := ParseBloomFromEvents(data.ResultFinalizeBlock.Events) if err != nil { api.logger.Error("failed to parse bloom from end block events") return } - header := rpc.EthHeaderFromTendermint(data.Header, bloom, baseFee) + header := rpc.EthHeaderFromTendermint(data.Block.Header, bloom, baseFee) _ = notifier.Notify(rpcSub.ID, header) // #nosec G703 case <-rpcSub.Err(): headersSub.Unsubscribe(api.events) diff --git a/eth/rpc/rpcapi/event_subscriber.go b/eth/rpc/rpcapi/event_subscriber.go index 3220e3d786..ddefda627b 100644 --- a/eth/rpc/rpcapi/event_subscriber.go +++ b/eth/rpc/rpcapi/event_subscriber.go @@ -29,7 +29,7 @@ import ( var ( txEventsQuery = cmttypes.QueryForEvent(cmttypes.EventTx).String() - evmEventsQuery = tmquery.MustParse(fmt.Sprintf("%s='%s' AND %s.%s='%s'", + evmEventsQuery = tmquery.MustCompile(fmt.Sprintf("%s='%s' AND %s.%s='%s'", cmttypes.EventTypeKey, cmttypes.EventTx, sdk.EventTypeMessage, From 7c380e397066790701d60a665d22efe58f290f71 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 28 Apr 2025 17:05:12 +0700 Subject: [PATCH 13/72] update wasmvm version in Makefile --- contrib/make/build.mk | 2 +- go.mod | 22 ++++++------ go.sum | 80 ++++++++++++++++++++++++++++++++++--------- 3 files changed, 76 insertions(+), 28 deletions(-) diff --git a/contrib/make/build.mk b/contrib/make/build.mk index 54ee1393fe..ef53fce8dd 100644 --- a/contrib/make/build.mk +++ b/contrib/make/build.mk @@ -25,7 +25,7 @@ SUDO := $(shell if [ "$(shell id -u)" != "0" ]; then echo "sudo"; fi) CMT_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') ROCKSDB_VERSION := 8.9.1 -WASMVM_VERSION := $(shell go list -m github.com/CosmWasm/wasmvm | awk '{sub(/^v/, "", $$2); print $$2}') +WASMVM_VERSION := $(shell go list -m github.com/CosmWasm/wasmvm/v2 | awk '{sub(/^v/, "", $$2); print $$2}') BUILDDIR ?= $(CURDIR)/build TEMPDIR ?= $(CURDIR)/temp diff --git a/go.mod b/go.mod index e645668d74..c99e7305e8 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 github.com/rakyll/statik v0.1.7 - github.com/spf13/cast v1.7.0 + github.com/spf13/cast v1.7.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.19.0 @@ -55,19 +55,19 @@ require ( require ( cosmossdk.io/collections v0.4.0 - cosmossdk.io/core v0.11.0 + cosmossdk.io/core v0.11.1 cosmossdk.io/depinject v1.1.0 cosmossdk.io/log v1.4.1 cosmossdk.io/store v1.1.1 cosmossdk.io/tools/confix v0.1.1 - cosmossdk.io/tools/rosetta v0.2.1 cosmossdk.io/x/evidence v0.1.1 cosmossdk.io/x/feegrant v0.1.1 + cosmossdk.io/x/tx v0.13.7 cosmossdk.io/x/upgrade v0.1.3 - github.com/CosmWasm/wasmvm v1.5.9 - github.com/cosmos/cosmos-db v1.1.0 + github.com/cosmos/cosmos-db v1.1.1 github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 + github.com/cosmos/rosetta v0.50.11 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/gorilla/websocket v1.5.3 github.com/hashicorp/go-metrics v0.5.3 @@ -77,6 +77,7 @@ require ( golang.org/x/crypto v0.36.0 golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 golang.org/x/net v0.37.0 + golang.org/x/sync v0.12.0 golang.org/x/text v0.23.0 ) @@ -87,13 +88,14 @@ require ( cloud.google.com/go/storage v1.38.0 // indirect cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect cosmossdk.io/x/circuit v0.1.1 // indirect - cosmossdk.io/x/tx v0.13.7 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect @@ -121,7 +123,7 @@ require ( github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.2 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect @@ -168,6 +170,7 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.2 // indirect + github.com/goware/urlx v0.3.2 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect @@ -256,7 +259,6 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.12.0 // indirect golang.org/x/sys v0.31.0 // indirect golang.org/x/term v0.30.0 // indirect golang.org/x/time v0.5.0 // indirect @@ -274,6 +276,7 @@ require ( ) replace ( + cosmossdk.io/store => github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250217040124-0d18d32081ac github.com/CosmWasm/wasmd => github.com/NibiruChain/wasmd v0.51.0-nibiru github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac @@ -285,7 +288,4 @@ replace ( // pin version! 126854af5e6d has issues with the store so that queries fail github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - - // stick with compatible version or x/exp in v0.47.x line - golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb ) diff --git a/go.sum b/go.sum index f6b5cb7a54..0591eaced4 100644 --- a/go.sum +++ b/go.sum @@ -607,8 +607,8 @@ cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= -cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= -cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -619,12 +619,8 @@ cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc= cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY= -cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= -cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= -cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= -cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= @@ -637,6 +633,7 @@ cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= cosmossdk.io/x/upgrade v0.1.3 h1:q4XpXc6zp0dX6x74uBtfN6+J7ikaQev5Bla6Q0ADLK8= cosmossdk.io/x/upgrade v0.1.3/go.mod h1:jOdQhnaY5B8CDUoUbed23/Lre0Dk+r6BMQE40iKlVVQ= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -666,10 +663,9 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDm github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/CosmWasm/wasmvm v1.5.9 h1:EMSIsG4eAhgIZ6SQQs+ZWFT0ONnUjbH9FSdeBUnItoQ= -github.com/CosmWasm/wasmvm v1.5.9/go.mod h1:2qaMB5ISmYXtpkJR2jy8xxx5Ti8sntOEf1cUgolb4QI= github.com/CosmWasm/wasmvm/v2 v2.1.0 h1:bleLhNA36hM8iPjFJsNRi9RjrQW6MtXafw2+wVjAWAE= github.com/CosmWasm/wasmvm/v2 v2.1.0/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= @@ -692,6 +688,8 @@ github.com/NibiruChain/collections v0.50.0 h1:zjwZ17G1f/0hoKUeoljIQval0HERF8Nmoj github.com/NibiruChain/collections v0.50.0/go.mod h1:u3NETehzjViSEZLmSjps0Akd8mWVfw3FXSh8lswf5PU= github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac h1:n95nhILCcV9m5BbCxmaDPKXhD/CD298caLbCIshEIfo= github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= +github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250217040124-0d18d32081ac h1:5z+tlozAPjWiKU0iNTz9eajeZVAzB/GbAwxwRPvjkr0= +github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250217040124-0d18d32081ac/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2 h1:ck5YAdn2Fklelh8JfLzU9VwXWXmitkbI0ixyoXcD1U8= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY= github.com/NibiruChain/wasmd v0.51.0-nibiru h1:qXaxYKiWAL67PR7Ug0vN5mD/S9qKJjg/38EHkSb3TPg= @@ -699,6 +697,10 @@ github.com/NibiruChain/wasmd v0.51.0-nibiru/go.mod h1:ImLd+hxD1Pa1Z+8b0A5C9u9Qb8 github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -917,8 +919,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDzI= -github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= +github.com/cosmos/cosmos-db v1.1.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNCM= +github.com/cosmos/cosmos-db v1.1.1/go.mod h1:AghjcIPqdhSLP/2Z0yha5xPH3nLnskz81pBx3tcVSAw= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= @@ -938,8 +940,10 @@ github.com/cosmos/ibc-go/v8 v8.4.0 h1:K2PfX0AZ+1XKZytHGEMuSjQXG/MZshPb83RSTQt2+c github.com/cosmos/ibc-go/v8 v8.4.0/go.mod h1:zh6x1osR0hNvEcFrC/lhGD08sMfQmr9wHVvZ/mRWMCs= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= -github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= -github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cosmos/ledger-cosmos-go v0.14.0 h1:WfCHricT3rPbkPSVKRH+L4fQGKYHuGOK9Edpel8TYpE= +github.com/cosmos/ledger-cosmos-go v0.14.0/go.mod h1:E07xCWSBl3mTGofZ2QnL4cIUzMbbGVyik84QYKbX3RA= +github.com/cosmos/rosetta v0.50.11 h1:FAM+D1JUvTrxKpbnLRimdPnEoNIcl2MGZ08+o0huYE0= +github.com/cosmos/rosetta v0.50.11/go.mod h1:293MJ7op8JNcBS8s33r8cBqUqld2Hc6Hiw3pso2m8pM= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -1090,6 +1094,9 @@ github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3 github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -1334,6 +1341,8 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/goware/urlx v0.3.2 h1:gdoo4kBHlkqZNaf6XlQ12LGtQOmpKJrR04Rc3RnpJEo= +github.com/goware/urlx v0.3.2/go.mod h1:h8uwbJy68o+tQXCGZNa9D73WN8n0r9OBae5bUnLcgjw= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -1877,8 +1886,8 @@ github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcD github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= +github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= @@ -2105,14 +2114,36 @@ golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIi golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -2135,8 +2166,12 @@ golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -2144,6 +2179,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= @@ -2152,6 +2188,7 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2237,6 +2274,7 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= @@ -2293,6 +2331,7 @@ golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= @@ -2309,6 +2348,7 @@ golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2321,6 +2361,7 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2454,6 +2495,7 @@ golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= @@ -2501,6 +2543,7 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -2509,8 +2552,10 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2527,6 +2572,7 @@ golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -2557,6 +2603,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -2567,6 +2614,7 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From f01274e73b942999b4eb8c9b16f83a7d4d7faf2a Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 29 Apr 2025 17:20:51 +0700 Subject: [PATCH 14/72] add service annotation and signer --- proto/eth/evm/v1/tx.proto | 3 +++ proto/nibiru/devgas/v1/tx.proto | 5 +++++ proto/nibiru/inflation/v1/tx.proto | 5 +++++ proto/nibiru/oracle/v1/tx.proto | 7 +++++++ proto/nibiru/sudo/v1/tx.proto | 4 ++++ proto/nibiru/tokenfactory/v1/tx.proto | 14 ++++++++++++++ 6 files changed, 38 insertions(+) diff --git a/proto/eth/evm/v1/tx.proto b/proto/eth/evm/v1/tx.proto index a1896fe86f..e9066bf66b 100644 --- a/proto/eth/evm/v1/tx.proto +++ b/proto/eth/evm/v1/tx.proto @@ -14,6 +14,7 @@ option go_package = "github.com/NibiruChain/nibiru/v2/x/evm"; // Msg defines the evm Msg service. service Msg { + option (cosmos.msg.v1.service) = true; // EthereumTx defines a method submitting Ethereum transactions. rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { option (google.api.http).post = "/nibiru/evm/v1/ethereum_tx"; @@ -249,6 +250,7 @@ message MsgUpdateParamsResponse {} // contract address can be given to create the mapping to a Bank Coin, or the // denomination for a Bank Coin can be given to create the mapping to an ERC20. message MsgCreateFunToken { + option (cosmos.msg.v1.signer) = "sender"; // Hexadecimal address of the ERC20 token to which the `FunToken` maps string from_erc20 = 1 [ (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.EIP55Addr", @@ -269,6 +271,7 @@ message MsgCreateFunTokenResponse { // MsgConvertCoinToEvm: Arguments to send a Bank Coin to ERC-20 representation message MsgConvertCoinToEvm { + option (cosmos.msg.v1.signer) = "sender"; // Hexadecimal address of the ERC20 token to which the `FunToken` maps string to_eth_addr = 1 [ (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.EIP55Addr", diff --git a/proto/nibiru/devgas/v1/tx.proto b/proto/nibiru/devgas/v1/tx.proto index 33f798a7ca..b7ae33450f 100644 --- a/proto/nibiru/devgas/v1/tx.proto +++ b/proto/nibiru/devgas/v1/tx.proto @@ -12,6 +12,8 @@ option go_package = "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types"; // Msg defines the fees Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // RegisterFeeShare registers a new contract for receiving transaction fees rpc RegisterFeeShare(MsgRegisterFeeShare) returns (MsgRegisterFeeShareResponse) { @@ -33,6 +35,7 @@ service Msg { // MsgRegisterFeeShare defines a message that registers a FeeShare message MsgRegisterFeeShare { option (gogoproto.equal) = false; + option (cosmos.msg.v1.signer) = "deployer_address"; // contract_address in bech32 format string contract_address = 1; // deployer_address is the bech32 address of message sender. It must be the @@ -50,6 +53,7 @@ message MsgRegisterFeeShareResponse {} // registered FeeShare message MsgUpdateFeeShare { option (gogoproto.equal) = false; + option (cosmos.msg.v1.signer) = "deployer_address"; // contract_address in bech32 format string contract_address = 1; // deployer_address is the bech32 address of message sender. It must be the @@ -66,6 +70,7 @@ message MsgUpdateFeeShareResponse {} // MsgCancelFeeShare defines a message that cancels a registered FeeShare message MsgCancelFeeShare { option (gogoproto.equal) = false; + option (cosmos.msg.v1.signer) = "deployer_address"; // contract_address in bech32 format string contract_address = 1; // deployer_address is the bech32 address of message sender. It must be the diff --git a/proto/nibiru/inflation/v1/tx.proto b/proto/nibiru/inflation/v1/tx.proto index 46675fc766..dd54deb483 100644 --- a/proto/nibiru/inflation/v1/tx.proto +++ b/proto/nibiru/inflation/v1/tx.proto @@ -6,10 +6,13 @@ import "google/api/annotations.proto"; import "nibiru/inflation/v1/inflation.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/NibiruChain/nibiru/v2/x/inflation/types"; service Msg { + option (cosmos.msg.v1.service) = true; + // ToggleInflation defines a method to enable or disable inflation. rpc ToggleInflation(MsgToggleInflation) returns (MsgToggleInflationResponse) { option (google.api.http).post = "/nibiru/inflation/v1/toggle"; @@ -26,6 +29,7 @@ service Msg { message MsgToggleInflation { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "sender"; string sender = 1; bool enable = 2 [ (gogoproto.moretags) = "yaml:\"enable\"" ]; @@ -34,6 +38,7 @@ message MsgToggleInflation { message MsgEditInflationParams { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "sender"; string sender = 1; bool inflation_enabled = 2; diff --git a/proto/nibiru/oracle/v1/tx.proto b/proto/nibiru/oracle/v1/tx.proto index 83743c0d37..8b7dee4e2a 100644 --- a/proto/nibiru/oracle/v1/tx.proto +++ b/proto/nibiru/oracle/v1/tx.proto @@ -6,11 +6,14 @@ import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "nibiru/oracle/v1/oracle.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/NibiruChain/nibiru/v2/x/oracle/types"; // Msg defines the oracle Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // AggregateExchangeRatePrevote defines a method for submitting // aggregate exchange rate prevote rpc AggregateExchangeRatePrevote(MsgAggregateExchangeRatePrevote) @@ -44,6 +47,7 @@ service Msg { message MsgAggregateExchangeRatePrevote { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "feeder"; string hash = 1 [ (gogoproto.moretags) = "yaml:\"hash\"" ]; // Feeder is the Bech32 address of the price feeder. A validator may @@ -63,6 +67,7 @@ message MsgAggregateExchangeRatePrevoteResponse {} message MsgAggregateExchangeRateVote { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "feeder"; string salt = 1 [ (gogoproto.moretags) = "yaml:\"salt\"" ]; string exchange_rates = 2 @@ -84,6 +89,7 @@ message MsgAggregateExchangeRateVoteResponse {} message MsgDelegateFeedConsent { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "operator"; string operator = 1 [ (gogoproto.moretags) = "yaml:\"operator\"" ]; string delegate = 2 [ (gogoproto.moretags) = "yaml:\"delegate\"" ]; @@ -96,6 +102,7 @@ message MsgDelegateFeedConsentResponse {} message MsgEditOracleParams { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "sender"; string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; diff --git a/proto/nibiru/sudo/v1/tx.proto b/proto/nibiru/sudo/v1/tx.proto index 79be3fa4ea..a01fe40016 100644 --- a/proto/nibiru/sudo/v1/tx.proto +++ b/proto/nibiru/sudo/v1/tx.proto @@ -4,6 +4,7 @@ package nibiru.sudo.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/NibiruChain/nibiru/v2/x/sudo/types"; @@ -11,6 +12,7 @@ option go_package = "github.com/NibiruChain/nibiru/v2/x/sudo/types"; // called from `BaseApp` instances during `DeliverTx`. The `Msg` service will be // responsible for processing `sdk.Msg` requests. service Msg { + option (cosmos.msg.v1.service) = true; // EditSudoers updates the "Sudoers" state rpc EditSudoers(MsgEditSudoers) returns (MsgEditSudoersResponse) { @@ -26,6 +28,7 @@ service Msg { /* MsgEditSudoers: Msg to update the "Sudoers" state. */ message MsgEditSudoers { + option (cosmos.msg.v1.signer) = "sender"; // Action: identifier for the type of edit that will take place. Using this // action field prevents us from needing to create several similar message // types. @@ -45,6 +48,7 @@ message MsgEditSudoersResponse {} /* MsgChangeRoot: Msg to update the "Sudoers" state. */ message MsgChangeRoot { + option (cosmos.msg.v1.signer) = "sender"; // Sender: Address for the signer of the transaction. string sender = 1; diff --git a/proto/nibiru/tokenfactory/v1/tx.proto b/proto/nibiru/tokenfactory/v1/tx.proto index b11131daae..bbabbf65a8 100644 --- a/proto/nibiru/tokenfactory/v1/tx.proto +++ b/proto/nibiru/tokenfactory/v1/tx.proto @@ -13,6 +13,8 @@ option go_package = "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types"; // Msg defines the gRPC Msg service for transactions. service Msg { + option (cosmos.msg.v1.service) = true; + // CreateDenom: registers a token factory denom. rpc CreateDenom(MsgCreateDenom) returns (MsgCreateDenomResponse); rpc ChangeAdmin(MsgChangeAdmin) returns (MsgChangeAdminResponse); @@ -38,6 +40,7 @@ service Msg { // - The resulting denom's admin is originally set to be the creator, but the // admin can be changed later. message MsgCreateDenom { + option (cosmos.msg.v1.signer) = "sender"; string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; // subdenom can be up to 44 "alphanumeric" characters long. string subdenom = 2 [(gogoproto.moretags) = "yaml:\"subdenom\""]; @@ -52,6 +55,7 @@ message MsgCreateDenomResponse { // MsgChangeAdmin is the sdk.Msg type for allowing an admin account to change // admin of a denom to a new account message MsgChangeAdmin { + option (cosmos.msg.v1.signer) = "sender"; string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; string denom = 2 [(gogoproto.moretags) = "yaml:\"denom\""]; string new_admin = 3 [(gogoproto.moretags) = "yaml:\"new_admin\""]; @@ -76,6 +80,8 @@ message MsgUpdateModuleParamsResponse {} // MsgMint: sdk.Msg (TxMsg) where an denom admin mints more of the token. message MsgMint { + option (cosmos.msg.v1.signer) = "sender"; + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; // coin: The denom identifier and amount to mint. cosmos.base.v1beta1.Coin coin = 2 [ @@ -100,6 +106,8 @@ message MsgMintResponse { // contract is the message signer and sender, while "burn_from" is based on the // contract logic. message MsgBurn { + option (cosmos.msg.v1.signer) = "sender"; + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; // coin: The denom identifier and amount to burn. cosmos.base.v1beta1.Coin coin = 2 [ @@ -115,6 +123,8 @@ message MsgBurnResponse {} // MsgSetDenomMetadata: sdk.Msg (TxMsg) enabling the denom admin to change its // bank metadata. message MsgSetDenomMetadata { + option (cosmos.msg.v1.signer) = "sender"; + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; // Metadata: Official x/bank metadata for the denom. All token factory denoms @@ -138,6 +148,8 @@ message MsgSetDenomMetadataResponse {} // // [FunToken Mechanism]: https://nibiru.fi/docs/evm/funtoken.html message MsgSudoSetDenomMetadata { + option (cosmos.msg.v1.signer) = "sender"; + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; // Metadata: Official x/bank metadata for the denom. The "metadata.base" is @@ -149,6 +161,8 @@ message MsgSudoSetDenomMetadataResponse {} // Burn a native token such as unibi message MsgBurnNative { + option (cosmos.msg.v1.signer) = "sender"; + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""]; cosmos.base.v1beta1.Coin coin = 2 [ (gogoproto.moretags) = "yaml:\"coin\"", From 9546a3bd83c50a60de439751263bce17d691594f Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 29 Apr 2025 17:21:36 +0700 Subject: [PATCH 15/72] make proto gen --- api/eth/evm/v1/tx.pulsar.go | 116 ++++---- api/nibiru/devgas/v1/tx.pulsar.go | 78 +++--- api/nibiru/inflation/v1/tx.pulsar.go | 179 ++++++------ api/nibiru/oracle/v1/oracle.pulsar.go | 2 +- api/nibiru/oracle/v1/tx.pulsar.go | 348 ++++++++++++------------ api/nibiru/sudo/v1/tx.pulsar.go | 86 +++--- api/nibiru/tokenfactory/v1/tx.pulsar.go | 302 ++++++++++---------- x/devgas/v1/types/tx.pb.go | 75 ++--- x/evm/tx.pb.go | 157 +++++------ x/inflation/types/tx.pb.go | 92 ++++--- x/oracle/types/oracle.pb.go | 2 +- x/oracle/types/tx.pb.go | 147 +++++----- x/sudo/types/tx.pb.go | 53 ++-- x/tokenfactory/types/tx.pb.go | 112 ++++---- 14 files changed, 894 insertions(+), 855 deletions(-) diff --git a/api/eth/evm/v1/tx.pulsar.go b/api/eth/evm/v1/tx.pulsar.go index 8ac17b52fd..b5546db956 100644 --- a/api/eth/evm/v1/tx.pulsar.go +++ b/api/eth/evm/v1/tx.pulsar.go @@ -8630,7 +8630,7 @@ var file_eth_evm_v1_tx_proto_rawDesc = []byte{ 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x55, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x72, 0x63, 0x32, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, @@ -8641,62 +8641,64 @@ var file_eth_evm_v1_tx_proto_rawDesc = []byte{ 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x6e, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x62, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xd7, 0x01, 0x0a, 0x13, 0x4d, 0x73, - 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, 0x76, - 0x6d, 0x12, 0x56, 0x0a, 0x0b, 0x74, 0x6f, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x76, 0x32, - 0x2f, 0x65, 0x74, 0x68, 0x2e, 0x45, 0x49, 0x50, 0x35, 0x35, 0x41, 0x64, 0x64, 0x72, 0x52, 0x09, - 0x74, 0x6f, 0x45, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x12, 0x50, 0x0a, 0x09, 0x62, 0x61, 0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, - 0x61, 0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x08, 0x62, 0x61, 0x6e, 0x6b, 0x43, - 0x6f, 0x69, 0x6e, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xfd, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6e, 0x0a, 0x0a, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x12, 0x19, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, - 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x54, 0x78, 0x1a, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, - 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x74, 0x78, 0x12, 0x50, 0x0a, 0x0c, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x25, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, - 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, - 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, - 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x1a, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x86, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, - 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, - 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x45, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x74, 0x68, 0x2e, - 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x74, 0x68, 0x5c, 0x45, 0x76, 0x6d, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x74, 0x68, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x45, - 0x74, 0x68, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x22, 0x62, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, + 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x45, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xe4, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x12, 0x56, + 0x0a, 0x0b, 0x74, 0x6f, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x74, + 0x68, 0x2e, 0x45, 0x49, 0x50, 0x35, 0x35, 0x41, 0x64, 0x64, 0x72, 0x52, 0x09, 0x74, 0x6f, 0x45, + 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x50, + 0x0a, 0x09, 0x62, 0x61, 0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x18, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x61, 0x6e, 0x6b, + 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x08, 0x62, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x69, 0x6e, + 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1d, 0x0a, + 0x1b, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, + 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x84, 0x03, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6e, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x54, 0x78, 0x12, 0x19, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x1a, 0x21, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, + 0x75, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x5f, 0x74, 0x78, 0x12, 0x50, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, + 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, + 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, + 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, + 0x76, 0x6d, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, + 0x45, 0x76, 0x6d, 0x1a, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, + 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0x86, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x65, + 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x45, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x74, 0x68, + 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x74, 0x68, 0x5c, 0x45, 0x76, + 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x74, 0x68, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, + 0x45, 0x74, 0x68, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/nibiru/devgas/v1/tx.pulsar.go b/api/nibiru/devgas/v1/tx.pulsar.go index 296f4b49ee..3f8189b643 100644 --- a/api/nibiru/devgas/v1/tx.pulsar.go +++ b/api/nibiru/devgas/v1/tx.pulsar.go @@ -3870,7 +3870,7 @@ var file_nibiru_devgas_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x64, 0x65, 0x76, 0x67, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, @@ -3880,28 +3880,32 @@ var file_nibiru_devgas_v1_tx_proto_rawDesc = []byte{ 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x29, 0x0a, - 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, + 0x73, 0x73, 0x3a, 0x19, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x10, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1d, 0x0a, + 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb3, 0x01, 0x0a, + 0x11, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, + 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x19, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, + 0x2a, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, + 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x84, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x46, 0x65, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x19, 0xe8, 0xa0, 0x1f, + 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, @@ -3914,7 +3918,7 @@ var file_nibiru_devgas_v1_tx_proto_rawDesc = []byte{ 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa4, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xab, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x98, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x25, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x64, 0x65, 0x76, 0x67, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, @@ -3948,19 +3952,19 @@ var file_nibiru_devgas_v1_tx_proto_rawDesc = []byte{ 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x64, 0x65, 0x76, 0x67, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xad, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x64, - 0x65, 0x76, 0x67, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x64, 0x65, 0x76, - 0x67, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x65, 0x76, 0x67, 0x61, 0x73, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x4e, 0x44, 0x58, 0xaa, 0x02, 0x10, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x44, - 0x65, 0x76, 0x67, 0x61, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x5c, 0x44, 0x65, 0x76, 0x67, 0x61, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x5c, 0x44, 0x65, 0x76, 0x67, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4e, 0x69, 0x62, - 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x67, 0x61, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xad, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, + 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x64, 0x65, 0x76, 0x67, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x62, + 0x69, 0x72, 0x75, 0x2f, 0x64, 0x65, 0x76, 0x67, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x65, + 0x76, 0x67, 0x61, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x44, 0x58, 0xaa, 0x02, 0x10, 0x4e, + 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x44, 0x65, 0x76, 0x67, 0x61, 0x73, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x10, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x44, 0x65, 0x76, 0x67, 0x61, 0x73, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x44, 0x65, 0x76, 0x67, + 0x61, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x12, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x67, + 0x61, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/nibiru/inflation/v1/tx.pulsar.go b/api/nibiru/inflation/v1/tx.pulsar.go index 1872cce7a9..101fd5a752 100644 --- a/api/nibiru/inflation/v1/tx.pulsar.go +++ b/api/nibiru/inflation/v1/tx.pulsar.go @@ -3,6 +3,7 @@ package inflationv1 import ( v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -3203,94 +3204,98 @@ var file_nibiru_inflation_v1_tx_proto_rawDesc = []byte{ 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x54, 0x6f, - 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xae, 0x04, 0x0a, 0x16, 0x4d, - 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, - 0x11, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x60, 0x0a, 0x12, 0x70, 0x6f, - 0x6c, 0x79, 0x6e, 0x6f, 0x6d, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x70, 0x6f, 0x6c, 0x79, 0x6e, - 0x6f, 0x6d, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x16, - 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x6c, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x29, + 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x11, + 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0xb9, + 0x04, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, + 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x60, + 0x0a, 0x12, 0x70, 0x6f, 0x6c, 0x79, 0x6e, 0x6f, 0x6d, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x01, + 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x70, + 0x6f, 0x6c, 0x79, 0x6e, 0x6f, 0x6d, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x12, 0x67, 0x0a, 0x16, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x01, 0x52, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x11, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, + 0x74, 0x52, 0x0f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x50, 0x65, 0x72, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x12, 0x55, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, + 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x73, 0x50, 0x65, 0x72, 0x59, 0x65, 0x61, 0x72, 0x12, 0x4a, 0x0a, 0x0a, 0x6d, 0x61, 0x78, + 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, + 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, + 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x45, + 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x07, 0x4d, 0x73, + 0x67, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xf2, + 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x04, + 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xca, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x90, 0x01, 0x0a, 0x0f, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, 0x66, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, + 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2f, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x15, - 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x11, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x73, 0x50, 0x65, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x55, - 0x0a, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x79, 0x65, - 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, - 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x50, 0x65, - 0x72, 0x59, 0x65, 0x61, 0x72, 0x12, 0x4a, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x01, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, - 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, - 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x07, 0x4d, - 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, - 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, - 0xf2, 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, - 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc3, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, - 0x12, 0x90, 0x01, 0x0a, 0x0f, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, - 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, - 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2f, 0x2e, - 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, - 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x67, - 0x67, 0x6c, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x13, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x2e, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x33, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x69, - 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x2d, 0x69, 0x6e, - 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xc2, - 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, - 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x69, - 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x66, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x49, 0x58, 0xaa, 0x02, 0x13, - 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x49, 0x6e, 0x66, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x4e, 0x69, 0x62, 0x69, - 0x72, 0x75, 0x5c, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x4e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x69, + 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x67, 0x67, + 0x6c, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x13, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2b, 0x2e, 0x6e, 0x69, 0x62, + 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x33, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, + 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x45, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x69, 0x6e, + 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x2d, 0x69, 0x6e, 0x66, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x69, 0x62, + 0x69, 0x72, 0x75, 0x2e, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, + 0x62, 0x69, 0x72, 0x75, 0x2f, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x3b, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x4e, 0x49, 0x58, 0xaa, 0x02, 0x13, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x49, 0x6e, 0x66, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x4e, 0x69, 0x62, 0x69, + 0x72, 0x75, 0x5c, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1f, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x49, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x15, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x49, 0x6e, 0x66, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/api/nibiru/oracle/v1/oracle.pulsar.go b/api/nibiru/oracle/v1/oracle.pulsar.go index 72a3a2e29a..0f32b45fc8 100644 --- a/api/nibiru/oracle/v1/oracle.pulsar.go +++ b/api/nibiru/oracle/v1/oracle.pulsar.go @@ -3791,7 +3791,7 @@ type Params struct { // VoteThreshold specifies the minimum proportion of votes that must be // received for a ballot to pass. VoteThreshold string `protobuf:"bytes,2,opt,name=vote_threshold,json=voteThreshold,proto3" json:"vote_threshold,omitempty"` - // RewardBand defines a maxium divergence that a price vote can have from the + // RewardBand defines a maximum divergence that a price vote can have from the // weighted median in the ballot. If a vote lies within the valid range // defined by: // diff --git a/api/nibiru/oracle/v1/tx.pulsar.go b/api/nibiru/oracle/v1/tx.pulsar.go index 708e660fc8..eade6d9c3d 100644 --- a/api/nibiru/oracle/v1/tx.pulsar.go +++ b/api/nibiru/oracle/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package oraclev1 import ( + _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -5142,184 +5143,189 @@ var file_nibiru_oracle_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x1d, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x1f, - 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, - 0x23, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, - 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x68, 0x61, 0x73, 0x68, 0x22, 0x52, 0x04, - 0x68, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, + 0x3a, 0x22, 0x68, 0x61, 0x73, 0x68, 0x22, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, + 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, + 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, + 0x52, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, + 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x22, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x13, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, + 0x72, 0x22, 0x29, 0x0a, 0x27, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf9, 0x01, 0x0a, + 0x1c, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x23, 0x0a, + 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, 0x1f, + 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x61, 0x6c, 0x74, 0x22, 0x52, 0x04, 0x73, 0x61, + 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x73, 0x22, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, - 0x32, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x32, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x29, 0x0a, - 0x27, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xee, 0x01, 0x0a, 0x1c, 0x4d, 0x73, 0x67, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x73, 0x61, 0x6c, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x22, 0x73, 0x61, 0x6c, 0x74, 0x22, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x40, - 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, - 0x3a, 0x22, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, - 0x22, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, - 0x12, 0x29, 0x0a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x66, 0x65, 0x65, 0x64, - 0x65, 0x72, 0x22, 0x52, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x09, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, - 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x22, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, - 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x84, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x08, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, - 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x22, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, - 0x08, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x13, 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x22, 0x52, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x3a, 0x08, - 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x13, 0x4d, - 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x4c, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x73, 0x67, - 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x22, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, - 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x08, 0x0a, 0x0f, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x73, 0x67, 0x12, 0x3b, 0x0a, 0x0b, 0x76, 0x6f, 0x74, 0x65, - 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1a, 0xc8, - 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, - 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x52, 0x0a, 0x76, 0x6f, 0x74, 0x65, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0xc8, - 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, - 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, 0x65, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x65, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x68, 0x0a, 0x0b, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x47, 0xc8, - 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, - 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x61, - 0x6e, 0x64, 0x12, 0x6e, 0x0a, 0x09, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x50, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x34, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x76, 0x32, 0x2f, - 0x78, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x50, - 0x61, 0x69, 0x72, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x77, 0x68, 0x69, - 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x52, 0x09, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x01, - 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, - 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x77, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1b, 0xc8, 0xde, 0x1f, - 0x01, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x6c, 0x61, 0x73, 0x68, - 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x52, 0x0b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x57, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x50, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, + 0x74, 0x6f, 0x72, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, + 0x2a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, 0x26, 0x0a, 0x24, 0x4d, 0x73, 0x67, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x91, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x08, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xf2, + 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x22, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x08, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, + 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x22, 0x52, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x3a, 0x15, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x45, 0x64, + 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x29, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, + 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x69, 0x62, 0x69, + 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x73, 0x67, 0x42, 0x11, 0xf2, 0xde, + 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, + 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x08, 0x0a, 0x0f, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x73, 0x67, 0x12, + 0x3b, 0x0a, 0x0b, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x1a, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, + 0x52, 0x0a, 0x76, 0x6f, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x71, 0x0a, 0x0e, + 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, + 0x68, 0x0a, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x47, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x1b, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x50, 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x96, 0x01, 0x0a, 0x14, 0x74, 0x77, - 0x61, 0x70, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x1e, 0x74, 0x77, 0x61, - 0x70, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x1b, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x74, 0x77, 0x61, 0x70, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, - 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x12, - 0x74, 0x77, 0x61, 0x70, 0x4c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x12, 0x38, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x42, 0x19, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x11, - 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x73, - 0x22, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x73, 0x12, 0x7f, 0x0a, 0x13, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4f, 0xc8, 0xde, 0x1f, 0x01, 0xda, - 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, - 0x1f, 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x4d, 0x0a, - 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x42, 0x20, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, - 0x1f, 0x18, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x3a, 0x08, 0x98, 0xa0, - 0x1f, 0x01, 0xe8, 0xa0, 0x1f, 0x01, 0x32, 0xfd, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0xac, - 0x01, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, - 0x31, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, - 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, - 0x74, 0x65, 0x1a, 0x39, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x22, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x61, 0x6e, 0x64, 0x12, 0x6e, 0x0a, 0x09, 0x77, 0x68, 0x69, + 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x50, 0xc8, 0xde, + 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6e, 0x69, 0x62, + 0x69, 0x72, 0x75, 0x2f, 0x76, 0x32, 0x2f, 0x78, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x50, 0x61, 0x69, 0x72, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x52, 0x09, + 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0e, 0x73, 0x6c, 0x61, + 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x73, + 0x6c, 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0c, + 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x1b, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, + 0x3a, 0x22, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x52, + 0x0b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x81, 0x01, 0x0a, + 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x50, 0xc8, 0xde, 0x1f, + 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xf2, 0xde, 0x1f, 0x1b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x6d, + 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x12, 0x96, 0x01, 0x0a, 0x14, 0x74, 0x77, 0x61, 0x70, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, + 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x01, + 0xea, 0xde, 0x1f, 0x1e, 0x74, 0x77, 0x61, 0x70, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, + 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x1b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x74, 0x77, 0x61, 0x70, + 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x22, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x12, 0x74, 0x77, 0x61, 0x70, 0x4c, 0x6f, 0x6f, 0x6b, 0x62, + 0x61, 0x63, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x38, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, + 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x42, 0x19, 0xc8, + 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, + 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x73, 0x22, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x56, 0x6f, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x7f, 0x0a, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x4f, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, + 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x46, 0x65, 0x65, 0x52, + 0x61, 0x74, 0x69, 0x6f, 0x12, 0x4d, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x20, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x18, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x22, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x01, 0xe8, 0xa0, 0x1f, 0x01, 0x32, 0x84, 0x05, + 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0xac, 0x01, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x1a, 0x39, 0x2e, 0x6e, 0x69, 0x62, 0x69, + 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x16, 0x2f, 0x6e, + 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x19, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, + 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, + 0x74, 0x65, 0x1a, 0x36, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x65, 0x76, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x16, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0xa0, 0x01, - 0x0a, 0x19, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x36, 0x2e, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, 0x2f, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x6f, 0x74, 0x65, - 0x12, 0x99, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x74, 0x1a, 0x30, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1e, 0x2f, 0x6e, - 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x65, - 0x64, 0x65, 0x72, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x87, 0x01, 0x0a, - 0x10, 0x45, 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x25, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, + 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x22, 0x13, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x99, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x12, + 0x28, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, + 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x1a, 0x30, 0x2e, 0x6e, 0x69, 0x62, 0x69, + 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x20, 0x22, 0x1e, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x10, 0x45, 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, - 0x15, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xad, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, - 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x62, - 0x69, 0x72, 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4e, - 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x10, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x12, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, + 0x2d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xad, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x69, 0x62, + 0x69, 0x72, 0x75, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, + 0x75, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4e, 0x69, 0x62, + 0x69, 0x72, 0x75, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x12, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/nibiru/sudo/v1/tx.pulsar.go b/api/nibiru/sudo/v1/tx.pulsar.go index 3e2e24e855..a34527fa84 100644 --- a/api/nibiru/sudo/v1/tx.pulsar.go +++ b/api/nibiru/sudo/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package sudov1 import ( + _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -1997,47 +1998,50 @@ var file_nibiru_sudo_v1_tx_proto_rawDesc = []byte{ 0x75, 0x2e, 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, - 0x0e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x18, 0x0a, - 0x16, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x4d, - 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf5, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x78, 0x0a, 0x0b, - 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x1a, 0x26, 0x2e, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, 0x2f, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2f, 0x73, 0x75, 0x64, 0x6f, 0x2f, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x73, - 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, - 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, - 0x6f, 0x6f, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, 0x64, - 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1a, 0x22, 0x18, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x73, 0x75, 0x64, 0x6f, - 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x42, 0x9f, 0x01, 0x0a, - 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, 0x64, 0x6f, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x73, 0x75, 0x64, 0x6f, 0x2f, 0x76, 0x31, 0x3b, - 0x73, 0x75, 0x64, 0x6f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x53, 0x58, 0xaa, 0x02, 0x0e, 0x4e, - 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x53, 0x75, 0x64, 0x6f, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, - 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x53, 0x75, 0x64, 0x6f, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1a, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x53, 0x75, 0x64, 0x6f, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x4e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x53, 0x75, 0x64, 0x6f, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, + 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, + 0x64, 0x6f, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, + 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x52, 0x6f, 0x6f, + 0x74, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x17, + 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xfc, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x78, 0x0a, 0x0b, 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, 0x1e, + 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x1a, 0x26, + 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x53, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, + 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x73, 0x75, 0x64, 0x6f, 0x2f, 0x65, 0x64, 0x69, + 0x74, 0x5f, 0x73, 0x75, 0x64, 0x6f, 0x65, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x0a, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, + 0x2e, 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, + 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x18, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x73, + 0x75, 0x64, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x1a, + 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9f, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, + 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x73, 0x75, 0x64, 0x6f, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, + 0x75, 0x2f, 0x73, 0x75, 0x64, 0x6f, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x75, 0x64, 0x6f, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4e, 0x53, 0x58, 0xaa, 0x02, 0x0e, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, + 0x53, 0x75, 0x64, 0x6f, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, + 0x5c, 0x53, 0x75, 0x64, 0x6f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x4e, 0x69, 0x62, 0x69, 0x72, + 0x75, 0x5c, 0x53, 0x75, 0x64, 0x6f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, + 0x53, 0x75, 0x64, 0x6f, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/nibiru/tokenfactory/v1/tx.pulsar.go b/api/nibiru/tokenfactory/v1/tx.pulsar.go index cfbebe70ad..dbb60e5683 100644 --- a/api/nibiru/tokenfactory/v1/tx.pulsar.go +++ b/api/nibiru/tokenfactory/v1/tx.pulsar.go @@ -7818,167 +7818,173 @@ var file_nibiru_tokenfactory_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x79, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x75, 0x62, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x52, 0x08, 0x73, 0x75, 0x62, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x5c, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x42, 0x0a, 0x0f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x22, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, - 0x6e, 0x6f, 0x6d, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x22, 0x5c, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0f, + 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x22, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x22, 0xa3, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x26, + 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xf2, + 0xde, 0x1f, 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x52, + 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x31, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x52, + 0x08, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x4d, + 0x69, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x42, + 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, + 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x04, 0x63, 0x6f, + 0x69, 0x6e, 0x12, 0x2f, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x16, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x0e, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x22, 0x52, 0x06, 0x6d, 0x69, 0x6e, + 0x74, 0x54, 0x6f, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x22, 0x2a, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x22, 0xb8, 0x01, 0x0a, + 0x07, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, + 0x22, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x31, 0x0a, 0x09, 0x62, 0x75, 0x72, 0x6e, 0x5f, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x22, + 0x52, 0x08, 0x62, 0x75, 0x72, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x42, 0x75, + 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x4d, + 0x73, 0x67, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0b, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, + 0x73, 0x67, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x4d, + 0x73, 0x67, 0x53, 0x75, 0x64, 0x6f, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x12, 0x26, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x10, 0xf2, 0xde, 0x1f, 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x22, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x31, 0x0a, 0x09, 0x6e, 0x65, 0x77, - 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, - 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x22, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x18, 0x0a, 0x16, - 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, + 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, + 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, + 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x64, 0x6f, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, + 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4e, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, + 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x04, 0x63, + 0x6f, 0x69, 0x6e, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4e, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd7, 0x06, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x65, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x12, 0x26, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x1a, 0x2e, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, - 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1f, 0x0a, 0x1d, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, - 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, - 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, - 0x6e, 0x22, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x2f, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x74, - 0x5f, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xc8, 0xde, 0x1f, 0x01, 0xf2, - 0xde, 0x1f, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, - 0x22, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x22, 0x2a, 0x0a, 0x0f, 0x4d, 0x73, 0x67, - 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, - 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, - 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, - 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x04, - 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0b, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, - 0x12, 0x31, 0x0a, 0x09, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, - 0x75, 0x72, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x22, 0x52, 0x08, 0x62, 0x75, 0x72, 0x6e, 0x46, - 0x72, 0x6f, 0x6d, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x53, 0x65, - 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, - 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, - 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, - 0x67, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x64, 0x6f, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x64, 0x6f, 0x53, 0x65, 0x74, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4e, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xf2, - 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x04, - 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4e, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x06, - 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x65, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x26, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x26, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, + 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x1a, + 0x2e, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x7a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x35, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x1a, 0x2e, 0x2e, 0x6e, - 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0b, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x26, 0x2e, 0x6e, 0x69, - 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x1a, 0x2e, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x04, 0x4d, + 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x2e, 0x6e, 0x69, 0x62, 0x69, - 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x35, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x50, 0x0a, 0x04, 0x4d, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, - 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x1a, 0x27, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x50, 0x0a, 0x04, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x1f, 0x2e, 0x6e, 0x69, 0x62, 0x69, - 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x1a, 0x27, 0x2e, 0x6e, 0x69, 0x62, - 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, - 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x1a, 0x33, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, + 0x4d, 0x69, 0x6e, 0x74, 0x1a, 0x27, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x53, 0x75, - 0x64, 0x6f, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x2f, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x75, 0x64, 0x6f, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0x37, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, + 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, + 0x04, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x1f, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x1a, 0x27, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x74, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x2b, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x64, 0x6f, 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0a, - 0x42, 0x75, 0x72, 0x6e, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x25, 0x2e, 0x6e, 0x69, 0x62, - 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4e, 0x61, 0x74, 0x69, 0x76, - 0x65, 0x1a, 0x2d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, - 0x72, 0x6e, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x62, - 0x69, 0x72, 0x75, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x4e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x16, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x4e, 0x69, 0x62, - 0x69, 0x72, 0x75, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x18, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x66, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x1a, 0x33, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, + 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x64, 0x6f, 0x53, 0x65, + 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, + 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x64, 0x6f, 0x53, + 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, + 0x37, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x64, 0x6f, + 0x53, 0x65, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0a, 0x42, 0x75, 0x72, 0x6e, + 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x25, 0x2e, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x1a, 0x2d, 0x2e, + 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4e, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0xd7, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x69, 0x62, 0x69, + 0x72, 0x75, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x54, 0x58, 0xaa, 0x02, 0x16, 0x4e, 0x69, + 0x62, 0x69, 0x72, 0x75, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, + 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x18, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/x/devgas/v1/types/tx.pb.go b/x/devgas/v1/types/tx.pb.go index 90fd5d17f7..e4d2a6168a 100644 --- a/x/devgas/v1/types/tx.pb.go +++ b/x/devgas/v1/types/tx.pb.go @@ -445,43 +445,44 @@ func init() { func init() { proto.RegisterFile("nibiru/devgas/v1/tx.proto", fileDescriptor_72949c99a02cd615) } var fileDescriptor_72949c99a02cd615 = []byte{ - // 566 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xc1, 0x6a, 0x13, 0x41, - 0x18, 0xc7, 0xb3, 0x6d, 0x28, 0x74, 0x94, 0x36, 0x5d, 0x0b, 0x6d, 0x52, 0xdd, 0xea, 0xaa, 0xa5, - 0x55, 0xb3, 0x43, 0x23, 0x78, 0x28, 0x5e, 0x4c, 0xc1, 0x93, 0x11, 0x49, 0xf1, 0x22, 0x42, 0x98, - 0xec, 0x0e, 0x93, 0x81, 0x64, 0x67, 0x99, 0x99, 0xa4, 0xcd, 0xb5, 0x4f, 0x50, 0xf0, 0xa0, 0x27, - 0xe9, 0xc1, 0x07, 0xf0, 0xe0, 0x43, 0xf4, 0x58, 0xf4, 0xe2, 0x49, 0x24, 0x11, 0xf4, 0x31, 0x24, - 0x33, 0xb3, 0x9b, 0x6e, 0xb2, 0xad, 0xbd, 0x08, 0xbd, 0x25, 0xf3, 0xff, 0x7d, 0xdf, 0xf7, 0xdb, - 0xe5, 0x9b, 0x05, 0xc5, 0x90, 0x36, 0x29, 0xef, 0xc2, 0x00, 0xf7, 0x08, 0x12, 0xb0, 0xb7, 0x0d, - 0xe5, 0x81, 0x17, 0x71, 0x26, 0x99, 0x5d, 0xd0, 0x91, 0xa7, 0x23, 0xaf, 0xb7, 0x5d, 0x5a, 0x26, - 0x8c, 0x30, 0x15, 0xc2, 0xd1, 0x2f, 0xcd, 0x95, 0x6e, 0x12, 0xc6, 0x48, 0x1b, 0x43, 0x14, 0x51, - 0x88, 0xc2, 0x90, 0x49, 0x24, 0x29, 0x0b, 0x85, 0x49, 0x57, 0x7c, 0x26, 0x3a, 0x4c, 0xc0, 0x8e, - 0x20, 0xa3, 0xee, 0x1d, 0x41, 0x4c, 0x50, 0xd4, 0x41, 0x43, 0xf7, 0xd3, 0x7f, 0x4c, 0xe4, 0x4c, - 0x49, 0x11, 0x1c, 0x62, 0x41, 0x4d, 0xee, 0x1e, 0x5b, 0xe0, 0x46, 0x4d, 0x90, 0x3a, 0x26, 0x54, - 0x48, 0xcc, 0x9f, 0x63, 0xbc, 0xd7, 0x42, 0x1c, 0xdb, 0x5b, 0xa0, 0xe0, 0xb3, 0x50, 0x72, 0xe4, - 0xcb, 0x06, 0x0a, 0x02, 0x8e, 0x85, 0x58, 0xb5, 0x6e, 0x5b, 0x9b, 0xf3, 0xf5, 0xc5, 0xf8, 0xfc, - 0x99, 0x3e, 0x1e, 0xa1, 0x01, 0x8e, 0xda, 0xac, 0x8f, 0x79, 0x82, 0xce, 0x68, 0x34, 0x3e, 0x8f, - 0xd1, 0x32, 0xb0, 0xf7, 0xa9, 0x6c, 0x05, 0x1c, 0xed, 0x9f, 0x81, 0x67, 0x15, 0xbc, 0x34, 0x4e, - 0x0c, 0xbe, 0x93, 0xff, 0x73, 0xbc, 0x9e, 0x73, 0x6f, 0x81, 0xb5, 0x0c, 0xc3, 0x3a, 0x16, 0x11, - 0x0b, 0x05, 0x76, 0x3f, 0x5a, 0x60, 0xa9, 0x26, 0xc8, 0xeb, 0x28, 0x40, 0x12, 0x5f, 0x45, 0xff, - 0x35, 0x50, 0x9c, 0xf2, 0x4b, 0xec, 0x99, 0x92, 0xdf, 0x45, 0xa1, 0x8f, 0xdb, 0xff, 0x57, 0x3e, - 0x65, 0x93, 0x1e, 0x98, 0xd8, 0xbc, 0xb7, 0xc0, 0x62, 0xe2, 0xfa, 0x0a, 0x71, 0xd4, 0x11, 0xf6, - 0x13, 0x30, 0x8f, 0xba, 0xb2, 0xc5, 0x38, 0x95, 0x7d, 0x6d, 0x51, 0x5d, 0xfd, 0xfa, 0xa5, 0xbc, - 0x6c, 0xd6, 0xcc, 0x74, 0xdf, 0x93, 0x9c, 0x86, 0xa4, 0x3e, 0x46, 0xed, 0xa7, 0x60, 0x2e, 0x52, - 0x1d, 0x94, 0xcf, 0xb5, 0x8a, 0xe3, 0x4d, 0x5e, 0x02, 0xaf, 0xc6, 0x82, 0x6e, 0xdb, 0xcc, 0xa9, - 0xe6, 0x4f, 0x7e, 0xac, 0xe7, 0xea, 0xa6, 0x66, 0x67, 0xe1, 0xf0, 0xf7, 0xe7, 0x07, 0xe3, 0x6e, - 0x6e, 0x11, 0xac, 0x4c, 0x88, 0xc5, 0xd2, 0x95, 0x4f, 0x79, 0x30, 0x5b, 0x13, 0xc4, 0xfe, 0x60, - 0x81, 0xc2, 0xd4, 0x1e, 0xdf, 0xcf, 0x98, 0x3a, 0xbd, 0x4c, 0xa5, 0xf2, 0xa5, 0xb0, 0xe4, 0x3d, - 0x79, 0x87, 0xdf, 0x7e, 0xbd, 0x9b, 0xd9, 0x74, 0x37, 0x60, 0xc6, 0x9d, 0x87, 0xdc, 0x94, 0x35, - 0x12, 0x8b, 0x23, 0x0b, 0x2c, 0x4c, 0x2c, 0xe8, 0xdd, 0xcc, 0x89, 0x69, 0xa8, 0xf4, 0xf0, 0x12, - 0x50, 0x22, 0xf5, 0x48, 0x49, 0x6d, 0xb8, 0xf7, 0x32, 0xa5, 0xba, 0xaa, 0x28, 0xad, 0x34, 0xb1, - 0x76, 0xd9, 0x4a, 0x69, 0xe8, 0x1c, 0xa5, 0x73, 0xf6, 0xe9, 0x62, 0x25, 0x5f, 0x15, 0x8d, 0x95, - 0xde, 0x82, 0xeb, 0xa9, 0xcd, 0xbb, 0x73, 0xc1, 0xd3, 0x6b, 0xa4, 0xb4, 0xf5, 0x4f, 0x24, 0x76, - 0xa9, 0xbe, 0x38, 0x19, 0x38, 0xd6, 0xe9, 0xc0, 0xb1, 0x7e, 0x0e, 0x1c, 0xeb, 0x68, 0xe8, 0xe4, - 0x4e, 0x87, 0x4e, 0xee, 0xfb, 0xd0, 0xc9, 0xbd, 0xa9, 0x10, 0x2a, 0x5b, 0xdd, 0xa6, 0xe7, 0xb3, - 0x0e, 0x7c, 0xa9, 0xda, 0xed, 0xb6, 0x10, 0x0d, 0x63, 0xe7, 0x5e, 0x05, 0x1e, 0x9c, 0x15, 0xef, - 0x47, 0x58, 0x34, 0xe7, 0xd4, 0xe7, 0xf3, 0xf1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x64, 0x69, - 0x77, 0x65, 0xf5, 0x05, 0x00, 0x00, + // 581 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0x87, 0x33, 0x6d, 0x2d, 0x74, 0x94, 0x36, 0x5d, 0x0b, 0x6d, 0xb6, 0xba, 0xd5, 0x55, 0x4b, + 0x5b, 0xcd, 0x0e, 0x8d, 0xe0, 0xa1, 0x78, 0x31, 0x05, 0x4f, 0x46, 0x24, 0xc5, 0x8b, 0x08, 0x61, + 0xb2, 0x3b, 0x4c, 0x06, 0x92, 0x9d, 0x65, 0x66, 0x92, 0x36, 0x37, 0x29, 0x7e, 0x80, 0x82, 0x07, + 0x3d, 0x7a, 0xf7, 0x52, 0x50, 0xbf, 0x43, 0x8f, 0x45, 0x2f, 0x9e, 0x44, 0x12, 0xa1, 0x7e, 0x0c, + 0xc9, 0xce, 0xee, 0xa6, 0xc9, 0x6e, 0xff, 0x5c, 0x3c, 0x78, 0x4b, 0xe6, 0xf7, 0xcc, 0xfb, 0x3e, + 0xef, 0xf2, 0xee, 0xc2, 0x82, 0xcf, 0xea, 0x4c, 0xb4, 0x91, 0x47, 0x3a, 0x14, 0x4b, 0xd4, 0xd9, + 0x44, 0x6a, 0xcf, 0x09, 0x04, 0x57, 0xdc, 0xc8, 0xeb, 0xc8, 0xd1, 0x91, 0xd3, 0xd9, 0x34, 0x17, + 0x28, 0xa7, 0x3c, 0x0c, 0xd1, 0xe0, 0x97, 0xe6, 0xcc, 0x1b, 0x94, 0x73, 0xda, 0x24, 0x08, 0x07, + 0x0c, 0x61, 0xdf, 0xe7, 0x0a, 0x2b, 0xc6, 0x7d, 0x19, 0xa5, 0x8b, 0x2e, 0x97, 0x2d, 0x2e, 0x51, + 0x4b, 0xd2, 0x41, 0xf5, 0x96, 0xa4, 0x51, 0x50, 0xd0, 0x41, 0x4d, 0xd7, 0xd3, 0x7f, 0xa2, 0xc8, + 0x4a, 0x49, 0x51, 0xe2, 0x13, 0xc9, 0xa2, 0xdc, 0xfe, 0x0a, 0xe0, 0xf5, 0x8a, 0xa4, 0x55, 0x42, + 0x99, 0x54, 0x44, 0x3c, 0x25, 0x64, 0xa7, 0x81, 0x05, 0x31, 0xd6, 0x61, 0xde, 0xe5, 0xbe, 0x12, + 0xd8, 0x55, 0x35, 0xec, 0x79, 0x82, 0x48, 0xb9, 0x04, 0x6e, 0x81, 0xb5, 0x99, 0xea, 0x5c, 0x7c, + 0xfe, 0x44, 0x1f, 0x0f, 0x50, 0x8f, 0x04, 0x4d, 0xde, 0x25, 0x22, 0x41, 0x27, 0x34, 0x1a, 0x9f, + 0xc7, 0x68, 0x11, 0x1a, 0xbb, 0x4c, 0x35, 0x3c, 0x81, 0x77, 0x4f, 0xc1, 0x93, 0x21, 0x3c, 0x3f, + 0x4c, 0x22, 0x7c, 0xab, 0xf0, 0xe7, 0xe3, 0x4a, 0x6e, 0xff, 0xe4, 0x70, 0x23, 0xd5, 0xc0, 0xbe, + 0x09, 0x97, 0x33, 0xb4, 0xab, 0x44, 0x06, 0xdc, 0x97, 0xc4, 0xfe, 0x0c, 0xe0, 0x7c, 0x45, 0xd2, + 0x97, 0x81, 0x87, 0x15, 0xf9, 0x6f, 0x86, 0x5a, 0x86, 0x85, 0x94, 0x74, 0x32, 0xd2, 0x5b, 0x3d, + 0xd2, 0x36, 0xf6, 0x5d, 0xd2, 0xfc, 0xb7, 0x23, 0x5d, 0xec, 0x38, 0x6a, 0x91, 0x38, 0xbe, 0x07, + 0x70, 0x2e, 0x99, 0xe0, 0x05, 0x16, 0xb8, 0x25, 0x8d, 0x47, 0x70, 0x06, 0xb7, 0x55, 0x83, 0x0b, + 0xa6, 0xba, 0x5a, 0xad, 0xbc, 0xf4, 0xed, 0x4b, 0x71, 0x21, 0x5a, 0xd3, 0xa8, 0xe5, 0x8e, 0x12, + 0xcc, 0xa7, 0xd5, 0x21, 0x6a, 0x3c, 0x86, 0xd3, 0x41, 0x58, 0x21, 0x94, 0xbc, 0x5a, 0xb2, 0x9c, + 0xf1, 0x97, 0xc8, 0xa9, 0x70, 0xaf, 0xdd, 0x8c, 0xfa, 0x94, 0xa7, 0x8e, 0x7e, 0xae, 0xe4, 0xaa, + 0xd1, 0x9d, 0xad, 0xd9, 0x81, 0xfd, 0xb0, 0x9a, 0x5d, 0x80, 0x8b, 0x63, 0x62, 0xb1, 0x74, 0xe9, + 0xd3, 0x14, 0x9c, 0xac, 0x48, 0x6a, 0x7c, 0x00, 0x30, 0x9f, 0x7a, 0x0f, 0xee, 0x65, 0x74, 0x4d, + 0xef, 0x9d, 0x59, 0xbc, 0x14, 0x96, 0x3c, 0x27, 0x67, 0xff, 0xfb, 0xef, 0x77, 0x13, 0x6b, 0xf6, + 0x2a, 0xca, 0xf8, 0x66, 0x20, 0x11, 0x5d, 0xab, 0x25, 0x16, 0x07, 0x00, 0xce, 0x8e, 0xed, 0xf2, + 0x9d, 0xcc, 0x8e, 0xa3, 0x90, 0x79, 0xff, 0x12, 0x50, 0x22, 0xf5, 0x20, 0x94, 0x5a, 0xb5, 0xef, + 0x66, 0x4a, 0xb5, 0xc3, 0x4b, 0xa3, 0x4a, 0x63, 0xbb, 0x98, 0xad, 0x34, 0x0a, 0x9d, 0xa1, 0x74, + 0xc6, 0x3e, 0x9d, 0xaf, 0xe4, 0x86, 0x97, 0x86, 0x4a, 0xaf, 0xe1, 0xb5, 0x91, 0xcd, 0xbb, 0x7d, + 0xce, 0xf4, 0x1a, 0x31, 0xd7, 0x2f, 0x44, 0x62, 0x17, 0xf3, 0xca, 0x9b, 0x93, 0xc3, 0x0d, 0x50, + 0x7e, 0x76, 0xd4, 0xb3, 0xc0, 0x71, 0xcf, 0x02, 0xbf, 0x7a, 0x16, 0x38, 0xe8, 0x5b, 0xb9, 0xe3, + 0xbe, 0x95, 0xfb, 0xd1, 0xb7, 0x72, 0xaf, 0x4a, 0x94, 0xa9, 0x46, 0xbb, 0xee, 0xb8, 0xbc, 0x85, + 0x9e, 0x87, 0x55, 0xb7, 0x1b, 0x98, 0xf9, 0xb1, 0x7a, 0xa7, 0x84, 0xf6, 0x4e, 0xfb, 0x77, 0x03, + 0x22, 0xeb, 0xd3, 0xe1, 0x57, 0xf8, 0xe1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0x3f, 0x0c, + 0x1a, 0x3c, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/evm/tx.pb.go b/x/evm/tx.pb.go index 29b728e619..0c1692e55a 100644 --- a/x/evm/tx.pb.go +++ b/x/evm/tx.pb.go @@ -689,85 +689,86 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/tx.proto", fileDescriptor_82a0bfe4f0bab953) } var fileDescriptor_82a0bfe4f0bab953 = []byte{ - // 1247 bytes of a gzipped FileDescriptorProto + // 1261 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x8e, 0xff, 0x3c, 0xbb, 0x49, 0xd8, 0xa6, 0xd4, 0x76, 0x5b, 0x6f, 0xd8, 0x8a, - 0x12, 0x90, 0xb2, 0xdb, 0x18, 0xb5, 0x52, 0x73, 0x22, 0x4e, 0x5c, 0x54, 0x94, 0x40, 0xb4, 0x38, - 0x3d, 0x20, 0x24, 0x6b, 0xbc, 0x3b, 0x59, 0xaf, 0x92, 0x9d, 0x59, 0xed, 0x8c, 0x57, 0x0e, 0xc7, - 0x9e, 0x90, 0x38, 0x00, 0xe2, 0x0b, 0x70, 0xe0, 0xd4, 0x13, 0x87, 0x1e, 0xf8, 0x08, 0x15, 0xa7, - 0x0a, 0x0e, 0xa0, 0x1e, 0x0c, 0x4a, 0x91, 0x90, 0x7a, 0xec, 0x81, 0x1b, 0x12, 0x9a, 0xd9, 0xb5, - 0x63, 0x27, 0x38, 0x85, 0x08, 0x71, 0x9b, 0x37, 0xef, 0xcf, 0xbc, 0xf7, 0xfb, 0xbd, 0x79, 0x33, - 0x70, 0x11, 0xf3, 0xae, 0x89, 0x23, 0xdf, 0x8c, 0x56, 0x4d, 0xde, 0x37, 0x82, 0x90, 0x72, 0xaa, - 0x02, 0xe6, 0x5d, 0x03, 0x47, 0xbe, 0x11, 0xad, 0x56, 0x2f, 0xdb, 0x94, 0xf9, 0x94, 0x99, 0x3e, - 0x73, 0x85, 0x8d, 0xcf, 0xdc, 0xd8, 0xa8, 0x5a, 0x4b, 0x14, 0x1d, 0xc4, 0xb0, 0x19, 0xad, 0x76, - 0x30, 0x47, 0xab, 0xa6, 0x4d, 0x3d, 0x92, 0xe8, 0x2b, 0xb1, 0xbe, 0x2d, 0x25, 0x33, 0x16, 0x12, - 0xd5, 0xe2, 0xd8, 0xa1, 0xe2, 0x98, 0x64, 0xd7, 0xa5, 0x2e, 0x8d, 0xad, 0xc5, 0x2a, 0xd9, 0xbd, - 0xea, 0x52, 0xea, 0x1e, 0x60, 0x13, 0x05, 0x9e, 0x89, 0x08, 0xa1, 0x1c, 0x71, 0x8f, 0x92, 0x61, - 0xa4, 0x4a, 0xa2, 0x95, 0x52, 0xa7, 0xb7, 0x67, 0x22, 0x72, 0x18, 0xab, 0xf4, 0xcf, 0x15, 0xb8, - 0xb0, 0xcd, 0xdc, 0x26, 0xef, 0xe2, 0x10, 0xf7, 0xfc, 0x56, 0x5f, 0x5d, 0x86, 0x8c, 0x83, 0x38, - 0x2a, 0x2b, 0x4b, 0xca, 0x72, 0xb1, 0xbe, 0x68, 0xc4, 0xbe, 0xc6, 0xd0, 0xd7, 0x58, 0x27, 0x87, - 0x96, 0xb4, 0x50, 0x2b, 0x90, 0x61, 0xde, 0x27, 0xb8, 0x9c, 0x5a, 0x52, 0x96, 0x95, 0xc6, 0xec, - 0xf3, 0x81, 0xa6, 0xac, 0x58, 0x72, 0x4b, 0xd5, 0x20, 0xd3, 0x45, 0xac, 0x5b, 0x4e, 0x2f, 0x29, - 0xcb, 0x85, 0x46, 0xf1, 0xc5, 0x40, 0xcb, 0x85, 0x07, 0xc1, 0x9a, 0xbe, 0xa2, 0x5b, 0x52, 0xa1, - 0xaa, 0x90, 0xd9, 0x0b, 0xa9, 0x5f, 0xce, 0x08, 0x03, 0x4b, 0xae, 0xd7, 0x32, 0x9f, 0x7e, 0xad, - 0xcd, 0xe8, 0x5f, 0xa6, 0x20, 0xbf, 0x85, 0x5d, 0x64, 0x1f, 0xb6, 0xfa, 0xea, 0x22, 0xcc, 0x12, - 0x4a, 0x6c, 0x2c, 0xb3, 0xc9, 0x58, 0xb1, 0xa0, 0xde, 0x86, 0x82, 0x8b, 0x04, 0x66, 0x9e, 0x1d, - 0x9f, 0x5e, 0x68, 0x54, 0x9e, 0x0e, 0xb4, 0x4b, 0x31, 0x7c, 0xcc, 0xd9, 0x37, 0x3c, 0x6a, 0xfa, - 0x88, 0x77, 0x8d, 0x7b, 0x84, 0x5b, 0x79, 0x17, 0xb1, 0x1d, 0x61, 0xaa, 0xd6, 0x20, 0xed, 0x22, - 0x26, 0x93, 0xca, 0x34, 0x4a, 0x47, 0x03, 0x2d, 0xff, 0x2e, 0x62, 0x5b, 0x9e, 0xef, 0x71, 0x4b, - 0x28, 0xd4, 0x39, 0x48, 0x71, 0x9a, 0xa4, 0x94, 0xe2, 0x54, 0xbd, 0x03, 0xb3, 0x11, 0x3a, 0xe8, - 0xe1, 0xf2, 0xac, 0x3c, 0xe3, 0xfa, 0xd4, 0x33, 0x8e, 0x06, 0x5a, 0x76, 0xdd, 0xa7, 0x3d, 0xc2, - 0xad, 0xd8, 0x43, 0xd4, 0x27, 0x51, 0xcc, 0x2e, 0x29, 0xcb, 0xa5, 0x04, 0xaf, 0x12, 0x28, 0x51, - 0x39, 0x27, 0x37, 0x94, 0x48, 0x48, 0x61, 0x39, 0x1f, 0x4b, 0xa1, 0x90, 0x58, 0xb9, 0x10, 0x4b, - 0x6c, 0x6d, 0x4e, 0x20, 0xf1, 0xfd, 0xa3, 0x95, 0x6c, 0xab, 0xbf, 0x89, 0x38, 0xd2, 0xbf, 0x4b, - 0x43, 0x69, 0xdd, 0xb6, 0x31, 0x63, 0x5b, 0x1e, 0xe3, 0xad, 0xbe, 0xfa, 0x1e, 0xe4, 0xed, 0x2e, - 0xf2, 0x48, 0xdb, 0x73, 0x24, 0x34, 0x85, 0x86, 0x79, 0x56, 0x72, 0xb9, 0x0d, 0x61, 0x7c, 0x6f, - 0xf3, 0xf9, 0x40, 0xcb, 0xd9, 0xf1, 0xd2, 0x4a, 0x16, 0xce, 0x31, 0xc6, 0xa9, 0xa9, 0x18, 0xa7, - 0xff, 0x35, 0xc6, 0x99, 0xb3, 0x31, 0x9e, 0x3d, 0x8d, 0x71, 0xf6, 0xdc, 0x18, 0xe7, 0xc6, 0x30, - 0xde, 0x85, 0x3c, 0x92, 0x40, 0x61, 0x56, 0xce, 0x2f, 0xa5, 0x97, 0x8b, 0xf5, 0xcb, 0xc6, 0xf1, - 0x3d, 0x35, 0x62, 0x10, 0x5b, 0xbd, 0xe0, 0x00, 0x37, 0x96, 0x1e, 0x0f, 0xb4, 0x99, 0xe7, 0x03, - 0x0d, 0xd0, 0x08, 0xd9, 0x87, 0xbf, 0x68, 0x70, 0x8c, 0xb3, 0x35, 0x0a, 0x15, 0x53, 0x57, 0x98, - 0xa0, 0x0e, 0x26, 0xa8, 0x2b, 0x4e, 0xa3, 0xee, 0x8f, 0x34, 0x94, 0x36, 0x0f, 0x09, 0xf2, 0x3d, - 0xfb, 0x2e, 0xc6, 0xff, 0x0b, 0x75, 0x77, 0xa0, 0x28, 0xa8, 0xe3, 0x5e, 0xd0, 0xb6, 0x51, 0xf0, - 0x72, 0xf2, 0x04, 0xd1, 0x2d, 0x2f, 0xd8, 0x40, 0xc1, 0xd0, 0x75, 0x0f, 0x63, 0xe9, 0x9a, 0xf9, - 0x27, 0xae, 0x77, 0x31, 0x16, 0xae, 0x09, 0xf1, 0xb3, 0x67, 0x13, 0x9f, 0x3d, 0x4d, 0x7c, 0xee, - 0xdc, 0xc4, 0xe7, 0xa7, 0x10, 0x5f, 0xf8, 0x8f, 0x89, 0x87, 0x09, 0xe2, 0x8b, 0x13, 0xc4, 0x97, - 0xa6, 0x11, 0xaf, 0x43, 0xb5, 0xd9, 0xe7, 0x98, 0x30, 0x8f, 0x92, 0x0f, 0x02, 0x39, 0x8e, 0x8f, - 0xa7, 0x6c, 0x32, 0xeb, 0xbe, 0x51, 0xe0, 0xd2, 0xc4, 0xf4, 0xb5, 0x30, 0x0b, 0x28, 0x61, 0xb2, - 0x44, 0x39, 0x40, 0x95, 0x78, 0x3e, 0xca, 0x99, 0xf9, 0x26, 0x64, 0x0e, 0xa8, 0xcb, 0xca, 0x29, - 0x59, 0xde, 0xfc, 0x78, 0x79, 0x5b, 0xd4, 0x6d, 0x64, 0x44, 0x59, 0x96, 0x34, 0x51, 0x17, 0x20, - 0x1d, 0x62, 0x2e, 0xa9, 0x2f, 0x59, 0x62, 0xa9, 0x56, 0x20, 0x1f, 0xf9, 0x6d, 0x1c, 0x86, 0x34, - 0x4c, 0x26, 0x5c, 0x2e, 0xf2, 0x9b, 0x42, 0x14, 0x2a, 0x41, 0x7a, 0x8f, 0x61, 0x27, 0xa6, 0xcf, - 0xca, 0xb9, 0x88, 0xed, 0x32, 0xec, 0x24, 0x69, 0x7e, 0xa6, 0xc0, 0xfc, 0x36, 0x73, 0x77, 0x03, - 0x07, 0x71, 0xbc, 0x83, 0x42, 0xe4, 0x33, 0x31, 0x1f, 0x50, 0x8f, 0x77, 0x69, 0xe8, 0xf1, 0xc3, - 0xa4, 0x8f, 0xcb, 0x3f, 0x3c, 0x5a, 0x59, 0x4c, 0x9e, 0xb0, 0x75, 0xc7, 0x09, 0x31, 0x63, 0x1f, - 0xf2, 0xd0, 0x23, 0xae, 0x75, 0x6c, 0xaa, 0xde, 0x84, 0x6c, 0x20, 0x23, 0xc8, 0x9e, 0x2d, 0xd6, - 0xd5, 0xf1, 0x32, 0xe2, 0xd8, 0x49, 0x25, 0x89, 0xdd, 0xda, 0xdc, 0x83, 0xdf, 0xbf, 0x7d, 0xeb, - 0x38, 0x82, 0x5e, 0x81, 0xcb, 0x27, 0x92, 0x19, 0xa2, 0xa6, 0x3f, 0x54, 0xe0, 0x95, 0x6d, 0xe6, - 0x6e, 0x84, 0x18, 0x71, 0x7c, 0xb7, 0x47, 0x5a, 0x74, 0x1f, 0x13, 0x75, 0x17, 0x40, 0xbc, 0x2f, - 0x6d, 0x1c, 0xda, 0xf5, 0x9b, 0x49, 0xae, 0xb7, 0x1f, 0x0f, 0x34, 0xe5, 0xe9, 0x40, 0x33, 0x5c, - 0x8f, 0x77, 0x7b, 0x1d, 0xc3, 0xa6, 0xbe, 0xf9, 0xbe, 0xd7, 0xf1, 0xc2, 0x9e, 0xbc, 0x6f, 0x26, - 0x91, 0x6b, 0x33, 0xaa, 0x9b, 0x22, 0xbd, 0xe6, 0xbd, 0x9d, 0x5b, 0xb7, 0x44, 0x49, 0x56, 0x41, - 0x44, 0x6a, 0x8a, 0x40, 0xea, 0x0d, 0x98, 0x97, 0x61, 0x3b, 0x88, 0xec, 0xb7, 0x1d, 0x4c, 0xa8, - 0x1f, 0xbf, 0x45, 0xd6, 0x05, 0xb1, 0xdd, 0x40, 0x64, 0x7f, 0x53, 0x6c, 0xaa, 0xaf, 0x42, 0x96, - 0x61, 0xe2, 0xe0, 0x30, 0xbe, 0x89, 0x56, 0x22, 0xe9, 0x1d, 0xa8, 0x9c, 0xca, 0x75, 0xc4, 0x7f, - 0x13, 0x16, 0xf6, 0x7a, 0x84, 0x8b, 0xbd, 0xb6, 0x8f, 0x82, 0xc0, 0x23, 0xee, 0xe8, 0x45, 0x1e, - 0x03, 0x6c, 0xe8, 0x97, 0x40, 0x36, 0x3f, 0xf4, 0xd9, 0x8e, 0x5d, 0xf4, 0x9f, 0x14, 0xb8, 0x28, - 0x0e, 0xa1, 0x24, 0xc2, 0x21, 0xdf, 0xa0, 0x1e, 0x69, 0xd1, 0x66, 0xe4, 0xab, 0xf7, 0xa1, 0xc8, - 0x69, 0x1b, 0xf3, 0x6e, 0x1b, 0x39, 0x4e, 0x38, 0x86, 0xc9, 0xcc, 0x79, 0x30, 0xe1, 0xb4, 0xc9, - 0xbb, 0x62, 0x39, 0x56, 0x6b, 0x6a, 0xbc, 0x56, 0x75, 0x07, 0x0a, 0x12, 0x26, 0xf1, 0xf3, 0x91, - 0x30, 0x14, 0xeb, 0x15, 0x23, 0x69, 0x15, 0xf1, 0x35, 0x32, 0x92, 0xaf, 0x91, 0x21, 0x52, 0x6c, - 0x94, 0x45, 0x22, 0x2f, 0x06, 0xda, 0xc2, 0x21, 0xf2, 0x0f, 0xd6, 0xf4, 0x91, 0xa7, 0x6e, 0xe5, - 0xc5, 0x5a, 0xd8, 0xe8, 0xd7, 0xe0, 0xca, 0xdf, 0x14, 0x36, 0xc4, 0xaf, 0xfe, 0x67, 0x0a, 0xd2, - 0xdb, 0xcc, 0x55, 0x09, 0xc0, 0xd8, 0xdf, 0xa6, 0x32, 0x8e, 0xdd, 0xc4, 0xc5, 0xab, 0xbe, 0x36, - 0x55, 0x35, 0xea, 0x2e, 0xfd, 0xc1, 0x8f, 0xbf, 0x7d, 0x95, 0xba, 0xaa, 0x57, 0x87, 0x48, 0x0c, - 0x3f, 0x67, 0x89, 0x69, 0x9b, 0xf7, 0xd5, 0x1d, 0x28, 0x4d, 0x5c, 0x93, 0x2b, 0x27, 0xc2, 0x8e, - 0x2b, 0xab, 0xd7, 0xcf, 0x50, 0x8e, 0x3a, 0xe1, 0x3e, 0xcc, 0x9d, 0xe8, 0xe7, 0x6b, 0x27, 0xdc, - 0x26, 0xd5, 0xd5, 0xd7, 0xcf, 0x54, 0x8f, 0xe2, 0x7e, 0x0c, 0x0b, 0xa7, 0xda, 0x42, 0x3b, 0xe9, - 0x7a, 0xc2, 0xa0, 0xfa, 0xc6, 0x4b, 0x0c, 0x86, 0xd1, 0x1b, 0xef, 0x3c, 0x3e, 0xaa, 0x29, 0x4f, - 0x8e, 0x6a, 0xca, 0xaf, 0x47, 0x35, 0xe5, 0x8b, 0x67, 0xb5, 0x99, 0x27, 0xcf, 0x6a, 0x33, 0x3f, - 0x3f, 0xab, 0xcd, 0x7c, 0x74, 0xe3, 0xa5, 0xdd, 0xd5, 0x17, 0xc0, 0x76, 0xb2, 0xf2, 0xc7, 0xf9, - 0xf6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xcc, 0xdd, 0x8f, 0x11, 0x7c, 0x0b, 0x00, 0x00, + 0x14, 0xcf, 0xfa, 0xbf, 0xc7, 0x6e, 0x12, 0xb6, 0x29, 0x5d, 0xbb, 0xad, 0x37, 0x6c, 0x45, 0x09, + 0x95, 0xb2, 0xdb, 0x18, 0xb5, 0x52, 0x73, 0x22, 0x4e, 0x5c, 0x54, 0x94, 0x40, 0xb4, 0x38, 0x3d, + 0x20, 0x24, 0x6b, 0xbc, 0x3b, 0x59, 0xaf, 0x92, 0x9d, 0x59, 0xed, 0x8c, 0x57, 0x0e, 0x27, 0x54, + 0x71, 0x40, 0xe2, 0x00, 0x88, 0x2f, 0xc0, 0x81, 0x13, 0xa7, 0x1e, 0x2a, 0xc1, 0x47, 0xa8, 0x38, + 0x55, 0x70, 0x41, 0x3d, 0x18, 0x94, 0x56, 0xaa, 0xd4, 0x63, 0x0f, 0x9c, 0xd1, 0xcc, 0x8e, 0x1d, + 0x3b, 0xc1, 0x29, 0x44, 0x88, 0xdb, 0xbc, 0x79, 0x7f, 0xe6, 0xbd, 0xdf, 0xef, 0xcd, 0x9b, 0x01, + 0xe7, 0x11, 0xeb, 0x5a, 0x28, 0x0e, 0xac, 0x78, 0xc5, 0x62, 0x7d, 0x33, 0x8c, 0x08, 0x23, 0x2a, + 0x40, 0xac, 0x6b, 0xa2, 0x38, 0x30, 0xe3, 0x95, 0xea, 0x45, 0x87, 0xd0, 0x80, 0x50, 0x2b, 0xa0, + 0x1e, 0xb7, 0x09, 0xa8, 0x97, 0x18, 0x55, 0x6b, 0x52, 0xd1, 0x81, 0x14, 0x59, 0xf1, 0x4a, 0x07, + 0x31, 0xb8, 0x62, 0x39, 0xc4, 0xc7, 0x52, 0x5f, 0x49, 0xf4, 0x6d, 0x21, 0x59, 0x89, 0x20, 0x55, + 0x0b, 0x63, 0x87, 0xf2, 0x63, 0xe4, 0xae, 0x47, 0x3c, 0x92, 0x58, 0xf3, 0x95, 0xdc, 0xbd, 0xec, + 0x11, 0xe2, 0xed, 0x23, 0x0b, 0x86, 0xbe, 0x05, 0x31, 0x26, 0x0c, 0x32, 0x9f, 0xe0, 0x61, 0xa4, + 0x8a, 0xd4, 0x0a, 0xa9, 0xd3, 0xdb, 0xb5, 0x20, 0x3e, 0x48, 0x54, 0xc6, 0x57, 0x0a, 0x38, 0xb7, + 0x45, 0xbd, 0x26, 0xeb, 0xa2, 0x08, 0xf5, 0x82, 0x56, 0x5f, 0x5d, 0x02, 0x19, 0x17, 0x32, 0xa8, + 0x29, 0x8b, 0xca, 0x52, 0xa9, 0xbe, 0x60, 0x26, 0xbe, 0xe6, 0xd0, 0xd7, 0x5c, 0xc3, 0x07, 0xb6, + 0xb0, 0x50, 0x2b, 0x20, 0x43, 0xfd, 0x4f, 0x91, 0x96, 0x5a, 0x54, 0x96, 0x94, 0x46, 0xf6, 0xc5, + 0x40, 0x57, 0x96, 0x6d, 0xb1, 0xa5, 0xea, 0x20, 0xd3, 0x85, 0xb4, 0xab, 0xa5, 0x17, 0x95, 0xa5, + 0x62, 0xa3, 0xf4, 0x72, 0xa0, 0xe7, 0xa3, 0xfd, 0x70, 0xd5, 0x58, 0x36, 0x6c, 0xa1, 0x50, 0x55, + 0x90, 0xd9, 0x8d, 0x48, 0xa0, 0x65, 0xb8, 0x81, 0x2d, 0xd6, 0xab, 0x99, 0x2f, 0xbe, 0xd3, 0x67, + 0x8c, 0x6f, 0x52, 0xa0, 0xb0, 0x89, 0x3c, 0xe8, 0x1c, 0xb4, 0xfa, 0xea, 0x02, 0xc8, 0x62, 0x82, + 0x1d, 0x24, 0xb2, 0xc9, 0xd8, 0x89, 0xa0, 0xde, 0x02, 0x45, 0x0f, 0x72, 0xcc, 0x7c, 0x27, 0x39, + 0xbd, 0xd8, 0xa8, 0x3c, 0x19, 0xe8, 0x17, 0x12, 0xf8, 0xa8, 0xbb, 0x67, 0xfa, 0xc4, 0x0a, 0x20, + 0xeb, 0x9a, 0x77, 0x31, 0xb3, 0x0b, 0x1e, 0xa4, 0xdb, 0xdc, 0x54, 0xad, 0x81, 0xb4, 0x07, 0xa9, + 0x48, 0x2a, 0xd3, 0x28, 0x1f, 0x0e, 0xf4, 0xc2, 0x7b, 0x90, 0x6e, 0xfa, 0x81, 0xcf, 0x6c, 0xae, + 0x50, 0x67, 0x41, 0x8a, 0x11, 0x99, 0x52, 0x8a, 0x11, 0xf5, 0x36, 0xc8, 0xc6, 0x70, 0xbf, 0x87, + 0xb4, 0xac, 0x38, 0xe3, 0xea, 0xd4, 0x33, 0x0e, 0x07, 0x7a, 0x6e, 0x2d, 0x20, 0x3d, 0xcc, 0xec, + 0xc4, 0x83, 0xd7, 0x27, 0x50, 0xcc, 0x2d, 0x2a, 0x4b, 0x65, 0x89, 0x57, 0x19, 0x28, 0xb1, 0x96, + 0x17, 0x1b, 0x4a, 0xcc, 0xa5, 0x48, 0x2b, 0x24, 0x52, 0xc4, 0x25, 0xaa, 0x15, 0x13, 0x89, 0xae, + 0xce, 0x72, 0x24, 0x7e, 0x7e, 0xb8, 0x9c, 0x6b, 0xf5, 0x37, 0x20, 0x83, 0xc6, 0x4f, 0x69, 0x50, + 0x5e, 0x73, 0x1c, 0x44, 0xe9, 0xa6, 0x4f, 0x59, 0xab, 0xaf, 0xbe, 0x0f, 0x0a, 0x4e, 0x17, 0xfa, + 0xb8, 0xed, 0xbb, 0x02, 0x9a, 0x62, 0xc3, 0x3a, 0x2d, 0xb9, 0xfc, 0x3a, 0x37, 0xbe, 0xbb, 0xf1, + 0x62, 0xa0, 0xe7, 0x9d, 0x64, 0x69, 0xcb, 0x85, 0x7b, 0x84, 0x71, 0x6a, 0x2a, 0xc6, 0xe9, 0x7f, + 0x8d, 0x71, 0xe6, 0x74, 0x8c, 0xb3, 0x27, 0x31, 0xce, 0x9d, 0x19, 0xe3, 0xfc, 0x18, 0xc6, 0x3b, + 0xa0, 0x00, 0x05, 0x50, 0x88, 0x6a, 0x85, 0xc5, 0xf4, 0x52, 0xa9, 0x7e, 0xd1, 0x3c, 0xba, 0xa7, + 0x66, 0x02, 0x62, 0xab, 0x17, 0xee, 0xa3, 0xc6, 0xe2, 0xa3, 0x81, 0x3e, 0xf3, 0x62, 0xa0, 0x03, + 0x38, 0x42, 0xf6, 0x87, 0xdf, 0x75, 0x70, 0x84, 0xb3, 0x3d, 0x0a, 0x95, 0x50, 0x57, 0x9c, 0xa0, + 0x0e, 0x4c, 0x50, 0x57, 0x9a, 0x46, 0xdd, 0x9f, 0x69, 0x50, 0xde, 0x38, 0xc0, 0x30, 0xf0, 0x9d, + 0x3b, 0x08, 0xfd, 0x2f, 0xd4, 0xdd, 0x06, 0x25, 0x4e, 0x1d, 0xf3, 0xc3, 0xb6, 0x03, 0xc3, 0x57, + 0x93, 0xc7, 0x89, 0x6e, 0xf9, 0xe1, 0x3a, 0x0c, 0x87, 0xae, 0xbb, 0x08, 0x09, 0xd7, 0xcc, 0x3f, + 0x71, 0xbd, 0x83, 0x10, 0x77, 0x95, 0xc4, 0x67, 0x4f, 0x27, 0x3e, 0x77, 0x92, 0xf8, 0xfc, 0x99, + 0x89, 0x2f, 0x4c, 0x21, 0xbe, 0xf8, 0x1f, 0x13, 0x0f, 0x26, 0x88, 0x2f, 0x4d, 0x10, 0x5f, 0x9e, + 0x46, 0xbc, 0x01, 0xaa, 0xcd, 0x3e, 0x43, 0x98, 0xfa, 0x04, 0x7f, 0x18, 0x8a, 0x71, 0x7c, 0x34, + 0x65, 0xe5, 0xac, 0xfb, 0x5e, 0x01, 0x17, 0x26, 0xa6, 0xaf, 0x8d, 0x68, 0x48, 0x30, 0x15, 0x25, + 0x8a, 0x01, 0xaa, 0x24, 0xf3, 0x51, 0xcc, 0xcc, 0xb7, 0x41, 0x66, 0x9f, 0x78, 0x54, 0x4b, 0x89, + 0xf2, 0xe6, 0xc6, 0xcb, 0xdb, 0x24, 0x5e, 0x23, 0xc3, 0xcb, 0xb2, 0x85, 0x89, 0x3a, 0x0f, 0xd2, + 0x11, 0x62, 0x82, 0xfa, 0xb2, 0xcd, 0x97, 0x6a, 0x05, 0x14, 0xe2, 0xa0, 0x8d, 0xa2, 0x88, 0x44, + 0x72, 0xc2, 0xe5, 0xe3, 0xa0, 0xc9, 0x45, 0xae, 0xe2, 0xa4, 0xf7, 0x28, 0x72, 0x13, 0xfa, 0xec, + 0xbc, 0x07, 0xe9, 0x0e, 0x45, 0xae, 0x4c, 0xf3, 0x4b, 0x05, 0xcc, 0x6d, 0x51, 0x6f, 0x27, 0x74, + 0x21, 0x43, 0xdb, 0x30, 0x82, 0x01, 0xe5, 0xf3, 0x01, 0xf6, 0x58, 0x97, 0x44, 0x3e, 0x3b, 0x90, + 0x7d, 0xac, 0xfd, 0xf2, 0x70, 0x79, 0x41, 0x3e, 0x61, 0x6b, 0xae, 0x1b, 0x21, 0x4a, 0x3f, 0x62, + 0x91, 0x8f, 0x3d, 0xfb, 0xc8, 0x54, 0xbd, 0x01, 0x72, 0xa1, 0x88, 0x20, 0x7a, 0xb6, 0x54, 0x57, + 0xc7, 0xcb, 0x48, 0x62, 0xcb, 0x4a, 0xa4, 0xdd, 0xea, 0xec, 0xfd, 0xe7, 0x0f, 0xae, 0x1f, 0x45, + 0x30, 0x2a, 0xe0, 0xe2, 0xb1, 0x64, 0x86, 0xa8, 0x19, 0x3f, 0x2a, 0xe0, 0xb5, 0x2d, 0xea, 0xad, + 0x47, 0x08, 0x32, 0x74, 0xa7, 0x87, 0x5b, 0x64, 0x0f, 0x61, 0x75, 0x07, 0x00, 0xfe, 0xbe, 0xb4, + 0x51, 0xe4, 0xd4, 0x6f, 0xc8, 0x5c, 0x6f, 0x3d, 0x1a, 0xe8, 0xca, 0x93, 0x81, 0x6e, 0x7a, 0x3e, + 0xeb, 0xf6, 0x3a, 0xa6, 0x43, 0x02, 0xeb, 0x03, 0xbf, 0xe3, 0x47, 0x3d, 0x71, 0xdf, 0x2c, 0x2c, + 0xd6, 0x56, 0x5c, 0xb7, 0x78, 0x7a, 0xcd, 0xbb, 0xdb, 0x37, 0x6f, 0xf2, 0x92, 0xec, 0x22, 0x8f, + 0xd4, 0xe4, 0x81, 0xd4, 0x6b, 0x60, 0x4e, 0x84, 0xed, 0x40, 0xbc, 0xd7, 0x76, 0x11, 0x26, 0x41, + 0xf2, 0x16, 0xd9, 0xe7, 0xf8, 0x76, 0x03, 0xe2, 0xbd, 0x0d, 0xbe, 0xa9, 0xbe, 0x0e, 0x72, 0x14, + 0x61, 0x17, 0x45, 0xc9, 0x4d, 0xb4, 0xa5, 0xb4, 0x5a, 0xe2, 0x75, 0x49, 0xc1, 0xe8, 0x80, 0xca, + 0x89, 0xc4, 0x47, 0xcd, 0xd0, 0x04, 0xf3, 0xbb, 0x3d, 0xcc, 0xf8, 0x5e, 0x3b, 0x80, 0x61, 0xe8, + 0x63, 0x6f, 0xf4, 0x3c, 0x8f, 0xa1, 0x37, 0xf4, 0x93, 0xf8, 0xcd, 0x0d, 0x7d, 0xb6, 0x12, 0x17, + 0xe3, 0x99, 0x02, 0xce, 0xf3, 0x43, 0x08, 0x8e, 0x51, 0xc4, 0xd6, 0x89, 0x8f, 0x5b, 0xa4, 0x19, + 0x07, 0xea, 0x3d, 0x50, 0x62, 0xa4, 0x8d, 0x58, 0xb7, 0x0d, 0x5d, 0x37, 0x1a, 0x03, 0x68, 0xe6, + 0x2c, 0x00, 0x31, 0xd2, 0x64, 0x5d, 0xbe, 0x1c, 0x2b, 0x3c, 0x35, 0x5e, 0xb8, 0xba, 0x0d, 0x8a, + 0x02, 0x33, 0xfe, 0x0d, 0x12, 0x98, 0x94, 0xea, 0x15, 0x53, 0xf6, 0x0d, 0xff, 0x27, 0x99, 0xf2, + 0x9f, 0x64, 0xf2, 0x14, 0x1b, 0x1a, 0x4f, 0xe4, 0xe5, 0x40, 0x9f, 0x3f, 0x80, 0xc1, 0xfe, 0xaa, + 0x31, 0xf2, 0x34, 0xec, 0x02, 0x5f, 0x73, 0x9b, 0x49, 0x28, 0xaf, 0x80, 0x4b, 0x7f, 0x53, 0xe5, + 0x10, 0xcc, 0xfa, 0xe7, 0x69, 0x90, 0xde, 0xa2, 0x9e, 0x8a, 0x01, 0x18, 0xfb, 0xf5, 0x54, 0xc6, + 0x81, 0x9c, 0xb8, 0x92, 0xd5, 0x37, 0xa6, 0xaa, 0x46, 0x7d, 0x67, 0xdc, 0xff, 0xf5, 0xd9, 0xb7, + 0xa9, 0xcb, 0x46, 0x75, 0x08, 0xcb, 0xf0, 0xdb, 0x26, 0x4d, 0xdb, 0xac, 0xaf, 0x6e, 0x83, 0xf2, + 0xc4, 0x05, 0xba, 0x74, 0x2c, 0xec, 0xb8, 0xb2, 0x7a, 0xf5, 0x14, 0xe5, 0xa8, 0x2d, 0xee, 0x81, + 0xd9, 0x63, 0x9d, 0x7e, 0xe5, 0x98, 0xdb, 0xa4, 0xba, 0xfa, 0xe6, 0xa9, 0xea, 0x51, 0xdc, 0x4f, + 0xc0, 0xfc, 0x89, 0x1e, 0xd1, 0x8f, 0xbb, 0x1e, 0x33, 0xa8, 0xbe, 0xf5, 0x0a, 0x83, 0x61, 0xf4, + 0x6a, 0xf6, 0xb3, 0xe7, 0x0f, 0xae, 0x2b, 0x8d, 0x77, 0x1f, 0x1d, 0xd6, 0x94, 0xc7, 0x87, 0x35, + 0xe5, 0x8f, 0xc3, 0x9a, 0xf2, 0xf5, 0xd3, 0xda, 0xcc, 0xe3, 0xa7, 0xb5, 0x99, 0xdf, 0x9e, 0xd6, + 0x66, 0x3e, 0xbe, 0xf6, 0xca, 0x8e, 0xeb, 0x73, 0x7c, 0x3b, 0x39, 0xf1, 0x25, 0x7d, 0xe7, 0xaf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x75, 0x9e, 0x38, 0x6b, 0x9d, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/inflation/types/tx.pb.go b/x/inflation/types/tx.pb.go index 5df7b9e605..c9da504f99 100644 --- a/x/inflation/types/tx.pb.go +++ b/x/inflation/types/tx.pb.go @@ -9,6 +9,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -287,51 +288,52 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/tx.proto", fileDescriptor_9f6843f876608d76) } var fileDescriptor_9f6843f876608d76 = []byte{ - // 693 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x4e, 0xdb, 0x4a, - 0x14, 0x8d, 0x21, 0x2f, 0xc0, 0xa0, 0xf7, 0x20, 0xe6, 0x81, 0x42, 0xe0, 0x39, 0x91, 0x59, 0x10, - 0x1e, 0xc2, 0xa3, 0x84, 0x1d, 0x4b, 0x03, 0x95, 0xa8, 0x48, 0x15, 0x59, 0xad, 0xaa, 0x76, 0x93, - 0x4e, 0xec, 0xc1, 0x19, 0xd5, 0x9e, 0xb1, 0x3c, 0x93, 0x28, 0xd9, 0x76, 0xd5, 0x25, 0x52, 0x7f, - 0x80, 0x65, 0x57, 0x5d, 0xf5, 0x0f, 0xba, 0x61, 0x89, 0xda, 0x4d, 0xd5, 0x45, 0x54, 0x41, 0x17, - 0x5d, 0xf3, 0x05, 0x95, 0x3d, 0x8e, 0x89, 0x1a, 0x23, 0x95, 0x45, 0xa4, 0xdc, 0x39, 0xf7, 0x9e, - 0x7b, 0xee, 0xf8, 0xdc, 0x01, 0x9b, 0x94, 0x74, 0x48, 0xd8, 0x83, 0x84, 0x9e, 0x79, 0x48, 0x10, - 0x46, 0x61, 0xbf, 0x0e, 0xc5, 0xc0, 0x08, 0x42, 0x26, 0x98, 0xba, 0x22, 0x51, 0x23, 0x45, 0x8d, - 0x7e, 0xbd, 0xfc, 0xaf, 0xcb, 0x5c, 0x16, 0xe3, 0x30, 0xfa, 0x27, 0x53, 0xcb, 0x9b, 0x2e, 0x63, - 0xae, 0x87, 0x21, 0x0a, 0x08, 0x44, 0x94, 0x32, 0x11, 0xe7, 0xf3, 0x04, 0xdd, 0xca, 0x6a, 0x73, - 0xc7, 0x2a, 0x93, 0x34, 0x9b, 0x71, 0x9f, 0x71, 0xd8, 0x41, 0x1c, 0xc3, 0x7e, 0xbd, 0x83, 0x05, - 0xaa, 0x43, 0x9b, 0x91, 0x31, 0xbe, 0x2e, 0xf1, 0xb6, 0xec, 0x2d, 0x03, 0x09, 0xe9, 0x08, 0xa8, - 0x4d, 0xee, 0x3e, 0x65, 0xae, 0xeb, 0xe1, 0x93, 0x31, 0xad, 0xba, 0x06, 0x0a, 0x1c, 0x53, 0x07, - 0x87, 0x25, 0xa5, 0xaa, 0xd4, 0x16, 0xac, 0x24, 0x52, 0x77, 0x40, 0x01, 0x53, 0xd4, 0xf1, 0x70, - 0x69, 0xa6, 0xaa, 0xd4, 0xe6, 0xcd, 0xe2, 0xed, 0xa8, 0xf2, 0xf7, 0x10, 0xf9, 0xde, 0x81, 0x2e, - 0xcf, 0x75, 0x2b, 0x49, 0x38, 0x98, 0x7f, 0x7b, 0x51, 0xc9, 0xfd, 0xbc, 0xa8, 0xe4, 0xf4, 0x0f, - 0x79, 0xb0, 0xd6, 0xe4, 0xee, 0xb1, 0x43, 0x44, 0xda, 0xa1, 0x85, 0x42, 0xe4, 0xf3, 0x7b, 0xfb, - 0xec, 0x82, 0x62, 0x3a, 0x63, 0x5b, 0x12, 0x3a, 0xb2, 0xa5, 0xb5, 0x9c, 0x02, 0xc7, 0xf2, 0x5c, - 0x7d, 0x05, 0xd4, 0x80, 0x79, 0x43, 0xca, 0x7c, 0x82, 0xbc, 0xf6, 0x19, 0xb2, 0x05, 0x0b, 0x79, - 0x69, 0xb6, 0x3a, 0x5b, 0x5b, 0x30, 0xeb, 0x97, 0xa3, 0x8a, 0xf2, 0x6d, 0x54, 0xd9, 0x90, 0x43, - 0x73, 0xe7, 0xb5, 0x41, 0x18, 0xf4, 0x91, 0xe8, 0x1a, 0xa7, 0xd8, 0x45, 0xf6, 0xf0, 0x08, 0xdb, - 0x9f, 0x3f, 0xee, 0x81, 0xe4, 0x4e, 0x8e, 0xb0, 0x6d, 0x15, 0xef, 0xc8, 0x1e, 0x49, 0x2e, 0xd5, - 0x05, 0x6b, 0x77, 0x72, 0x1c, 0xc2, 0x45, 0x48, 0x3a, 0xbd, 0x28, 0x28, 0xe5, 0xab, 0x4a, 0x6d, - 0xb1, 0xf1, 0xbf, 0x91, 0xf1, 0xb9, 0x8d, 0x74, 0xd8, 0xa3, 0x89, 0x0a, 0x33, 0x1f, 0x29, 0xb2, - 0x56, 0x49, 0x16, 0xa8, 0x3e, 0x07, 0x45, 0x1c, 0x30, 0xbb, 0xcb, 0xdb, 0x01, 0x0e, 0xa3, 0x1f, - 0x61, 0x4e, 0xe9, 0xaf, 0xe8, 0x6a, 0xcc, 0xdd, 0x64, 0x92, 0xd5, 0xe9, 0x49, 0x4e, 0xa8, 0x98, - 0x98, 0xe1, 0x84, 0x0a, 0x6b, 0x49, 0xb2, 0xb4, 0x70, 0xd8, 0x8a, 0x39, 0xd4, 0x67, 0x60, 0x59, - 0xb2, 0x49, 0xe6, 0x21, 0x46, 0x61, 0xa9, 0xf0, 0x70, 0xde, 0x7f, 0x12, 0x92, 0x16, 0x0e, 0x5f, - 0x60, 0x14, 0xaa, 0x8f, 0x01, 0xf0, 0xd1, 0x60, 0x2c, 0x74, 0xee, 0xe1, 0x84, 0x0b, 0x3e, 0x1a, - 0x48, 0x89, 0x13, 0x86, 0xd9, 0x04, 0xe5, 0x69, 0x4f, 0x5a, 0x98, 0x07, 0x8c, 0x72, 0xac, 0x57, - 0x81, 0x96, 0xed, 0xa6, 0x34, 0x63, 0x00, 0xe6, 0x9a, 0xdc, 0x35, 0x7b, 0x21, 0x8d, 0x0c, 0x3b, - 0x69, 0xb0, 0x49, 0xc3, 0xca, 0x73, 0x3d, 0xf5, 0x9c, 0x09, 0xf2, 0xd1, 0xca, 0xc4, 0x36, 0x5b, - 0x6c, 0xac, 0x1b, 0x89, 0xca, 0x68, 0xa7, 0x8c, 0x64, 0xa7, 0x8c, 0x43, 0x46, 0xa8, 0xb9, 0x72, - 0x39, 0xaa, 0xe4, 0x6e, 0x47, 0x95, 0x45, 0xc9, 0x13, 0x15, 0xe9, 0x56, 0x5c, 0xab, 0x17, 0xc1, - 0x52, 0xd2, 0x79, 0x2c, 0xa6, 0xf1, 0x69, 0x06, 0xcc, 0x36, 0xb9, 0xab, 0x9e, 0x2b, 0x60, 0xe9, - 0xf7, 0x35, 0xdb, 0xce, 0xf4, 0xcd, 0xf4, 0xec, 0x65, 0xf8, 0x87, 0x89, 0xe9, 0x15, 0x6c, 0xbd, - 0xf9, 0xf2, 0xe3, 0xdd, 0xcc, 0x7f, 0xfa, 0x06, 0xcc, 0x7c, 0xa6, 0xe2, 0x2a, 0xf5, 0xbd, 0x02, - 0x56, 0xb2, 0xb6, 0x72, 0xf7, 0xbe, 0x6e, 0x19, 0xc9, 0xe5, 0xfd, 0x07, 0x24, 0xa7, 0xf2, 0x60, - 0x2c, 0x6f, 0x47, 0xdf, 0x9e, 0x96, 0x87, 0x1d, 0x22, 0xf6, 0xd2, 0x70, 0x2f, 0x88, 0x0b, 0xcd, - 0xd3, 0xcb, 0x6b, 0x4d, 0xb9, 0xba, 0xd6, 0x94, 0xef, 0xd7, 0x9a, 0x72, 0x7e, 0xa3, 0xe5, 0xae, - 0x6e, 0xb4, 0xdc, 0xd7, 0x1b, 0x2d, 0xf7, 0xb2, 0xe1, 0x12, 0xd1, 0xed, 0x75, 0x0c, 0x9b, 0xf9, - 0xf0, 0x49, 0x4c, 0x76, 0xd8, 0x45, 0x84, 0x8e, 0x89, 0xfb, 0x0d, 0x38, 0x98, 0x60, 0x17, 0xc3, - 0x00, 0xf3, 0x4e, 0x21, 0x7e, 0xfb, 0xf6, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x8c, 0xc0, - 0x00, 0xc4, 0x05, 0x00, 0x00, + // 716 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xb1, 0x4f, 0xdb, 0x4e, + 0x18, 0x8d, 0x21, 0x84, 0x1f, 0x87, 0x7e, 0x85, 0x38, 0x85, 0x86, 0x40, 0x9d, 0xc8, 0x0c, 0x04, + 0x10, 0x3e, 0x25, 0x6c, 0x8c, 0x06, 0x2a, 0x51, 0x91, 0x2a, 0xb2, 0x5a, 0x55, 0xed, 0x92, 0x5e, + 0x9c, 0xe3, 0x72, 0xaa, 0xed, 0xb3, 0x7c, 0x4e, 0x94, 0x6c, 0x15, 0x53, 0x47, 0xa4, 0xfe, 0x03, + 0x8c, 0x1d, 0x19, 0xba, 0xf4, 0x3f, 0x40, 0x9d, 0x50, 0xbb, 0x54, 0x1d, 0xa2, 0x0a, 0x2a, 0xd1, + 0x99, 0xbf, 0xa0, 0xb2, 0xcf, 0x31, 0x51, 0x63, 0xa4, 0x32, 0x44, 0xca, 0xf9, 0x7d, 0xdf, 0x7b, + 0xef, 0x3e, 0xbd, 0xef, 0xc0, 0x8a, 0x43, 0x9b, 0xd4, 0xeb, 0x40, 0xea, 0x1c, 0x59, 0xc8, 0xa7, + 0xcc, 0x81, 0xdd, 0x0a, 0xf4, 0x7b, 0x9a, 0xeb, 0x31, 0x9f, 0xc9, 0x39, 0x81, 0x6a, 0x31, 0xaa, + 0x75, 0x2b, 0x85, 0x87, 0x84, 0x11, 0x16, 0xe2, 0x30, 0xf8, 0x27, 0x4a, 0x0b, 0x2b, 0x84, 0x31, + 0x62, 0x61, 0x88, 0x5c, 0x0a, 0x91, 0xe3, 0x30, 0x3f, 0xac, 0xe7, 0x11, 0xba, 0x9a, 0x24, 0x73, + 0xcb, 0x2a, 0x8a, 0x14, 0x93, 0x71, 0x9b, 0x71, 0xd8, 0x44, 0x1c, 0xc3, 0x6e, 0xa5, 0x89, 0x7d, + 0x54, 0x81, 0x26, 0xa3, 0x43, 0x7c, 0x49, 0xe0, 0x0d, 0xa1, 0x2d, 0x0e, 0x11, 0xf4, 0x28, 0x6a, + 0xb5, 0x39, 0x09, 0x98, 0x6d, 0x4e, 0x04, 0xa0, 0x5a, 0x40, 0xae, 0x71, 0xf2, 0x9c, 0x11, 0x62, + 0xe1, 0x83, 0xa1, 0x9e, 0xbc, 0x08, 0x32, 0x1c, 0x3b, 0x2d, 0xec, 0xe5, 0xa5, 0x92, 0x54, 0x9e, + 0x31, 0xa2, 0x93, 0xbc, 0x0e, 0x32, 0xd8, 0x41, 0x4d, 0x0b, 0xe7, 0x27, 0x4a, 0x52, 0xf9, 0x3f, + 0x3d, 0x7b, 0x33, 0x28, 0xfe, 0xdf, 0x47, 0xb6, 0xb5, 0xa3, 0x8a, 0xef, 0xaa, 0x11, 0x15, 0xec, + 0xe4, 0xde, 0x9f, 0x16, 0x53, 0xbf, 0x4f, 0x8b, 0xa9, 0xe3, 0xeb, 0xb3, 0x8d, 0xa8, 0x5f, 0xfd, + 0x9c, 0x06, 0x8b, 0x35, 0x4e, 0xf6, 0x5b, 0xd4, 0x8f, 0xc5, 0xea, 0xc8, 0x43, 0x36, 0xbf, 0x53, + 0x72, 0x13, 0x64, 0xe3, 0x39, 0x34, 0x04, 0x77, 0x4b, 0xa8, 0x1b, 0xf3, 0x31, 0xb0, 0x2f, 0xbe, + 0xcb, 0x6f, 0x80, 0xec, 0x32, 0xab, 0xef, 0x30, 0x9b, 0x22, 0xab, 0x71, 0x84, 0x4c, 0x9f, 0x79, + 0x3c, 0x3f, 0x59, 0x9a, 0x2c, 0xcf, 0xe8, 0x95, 0xf3, 0x41, 0x51, 0xfa, 0x31, 0x28, 0x2e, 0x8b, + 0x51, 0xf0, 0xd6, 0x5b, 0x8d, 0x32, 0x68, 0x23, 0xbf, 0xad, 0x1d, 0x62, 0x82, 0xcc, 0xfe, 0x1e, + 0x36, 0xbf, 0x7e, 0xda, 0x02, 0xd1, 0xdc, 0xf6, 0xb0, 0x69, 0x64, 0x6f, 0xc9, 0x9e, 0x08, 0x2e, + 0x99, 0x80, 0xc5, 0x5b, 0x3b, 0x2d, 0xca, 0x7d, 0x8f, 0x36, 0x3b, 0xc1, 0x21, 0x9f, 0x2e, 0x49, + 0xe5, 0xd9, 0xea, 0x86, 0x96, 0x10, 0x09, 0x2d, 0xbe, 0xec, 0xde, 0x48, 0x87, 0x9e, 0x0e, 0x1c, + 0x19, 0x0b, 0x34, 0x09, 0x94, 0x5f, 0x82, 0x2c, 0x76, 0x99, 0xd9, 0xe6, 0x0d, 0x17, 0x7b, 0xc1, + 0x8f, 0xb2, 0x56, 0x7e, 0x2a, 0x18, 0x8d, 0xbe, 0x19, 0xdd, 0x64, 0x61, 0xfc, 0x26, 0x07, 0x8e, + 0x3f, 0x72, 0x87, 0x03, 0xc7, 0x37, 0xe6, 0x04, 0x4b, 0x1d, 0x7b, 0xf5, 0x90, 0x43, 0x7e, 0x01, + 0xe6, 0x05, 0x9b, 0x60, 0xee, 0x63, 0xe4, 0xe5, 0x33, 0xf7, 0xe7, 0x7d, 0x10, 0x91, 0xd4, 0xb1, + 0xf7, 0x0a, 0x23, 0x4f, 0x7e, 0x0a, 0x80, 0x8d, 0x7a, 0x43, 0xa3, 0xd3, 0xf7, 0x27, 0x9c, 0xb1, + 0x51, 0x4f, 0x58, 0x4c, 0xce, 0xce, 0x0a, 0x28, 0x8c, 0x27, 0xd5, 0xc0, 0xdc, 0x65, 0x0e, 0xc7, + 0x6a, 0x09, 0x28, 0xc9, 0xc1, 0x8a, 0x2b, 0x7a, 0x60, 0xba, 0xc6, 0x89, 0xde, 0xf1, 0x9c, 0x20, + 0xc6, 0xa3, 0x59, 0x1b, 0x8d, 0x71, 0x24, 0x16, 0xc7, 0x4f, 0x07, 0xe9, 0x60, 0xc3, 0xc2, 0xc4, + 0xcd, 0x56, 0x97, 0xb4, 0xc8, 0x70, 0xb0, 0x82, 0x5a, 0xb4, 0x82, 0xda, 0x2e, 0xa3, 0x8e, 0x9e, + 0x3b, 0x1f, 0x14, 0x53, 0x37, 0x83, 0xe2, 0xac, 0xe0, 0x09, 0x9a, 0x54, 0x23, 0xec, 0x55, 0xb3, + 0x60, 0x2e, 0x52, 0x1e, 0x9a, 0xa9, 0x7e, 0x99, 0x00, 0x93, 0x35, 0x4e, 0xe4, 0x13, 0x09, 0xcc, + 0xfd, 0xbd, 0x7c, 0x6b, 0x89, 0x11, 0x1a, 0xbf, 0x7b, 0x01, 0xfe, 0x63, 0x61, 0x3c, 0x82, 0xd5, + 0xe3, 0x6f, 0xbf, 0x3e, 0x4c, 0x3c, 0x56, 0x97, 0x61, 0xe2, 0xab, 0x16, 0x76, 0xc9, 0x1f, 0x25, + 0x90, 0x4b, 0x5a, 0xd0, 0xcd, 0xbb, 0xd4, 0x12, 0x8a, 0x0b, 0xdb, 0xf7, 0x28, 0x8e, 0xed, 0xc1, + 0xd0, 0xde, 0xba, 0xba, 0x36, 0x6e, 0x0f, 0xb7, 0xa8, 0xbf, 0x15, 0x1f, 0xb7, 0x5c, 0xa1, 0x32, + 0xf5, 0xee, 0xfa, 0x6c, 0x43, 0xd2, 0x0f, 0xcf, 0x2f, 0x15, 0xe9, 0xe2, 0x52, 0x91, 0x7e, 0x5e, + 0x2a, 0xd2, 0xc9, 0x95, 0x92, 0xba, 0xb8, 0x52, 0x52, 0xdf, 0xaf, 0x94, 0xd4, 0xeb, 0x2a, 0xa1, + 0x7e, 0xbb, 0xd3, 0xd4, 0x4c, 0x66, 0xc3, 0x67, 0x21, 0xe7, 0x6e, 0x1b, 0x51, 0x67, 0xc8, 0xdf, + 0xad, 0xc2, 0xde, 0x88, 0x88, 0xdf, 0x77, 0x31, 0x6f, 0x66, 0xc2, 0x87, 0x71, 0xfb, 0x4f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xfb, 0x25, 0xe2, 0xec, 0xfa, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 20812bc5b5..52c8af1c0c 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -38,7 +38,7 @@ type Params struct { // VoteThreshold specifies the minimum proportion of votes that must be // received for a ballot to pass. VoteThreshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=vote_threshold,json=voteThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"vote_threshold" yaml:"vote_threshold"` - // RewardBand defines a maxium divergence that a price vote can have from the + // RewardBand defines a maximum divergence that a price vote can have from the // weighted median in the ballot. If a vote lies within the valid range // defined by: // μ := weightedMedian, diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 05638e7488..1f00b2822b 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -9,6 +9,7 @@ import ( fmt "fmt" github_com_NibiruChain_nibiru_v2_x_common_asset "github.com/NibiruChain/nibiru/v2/x/common/asset" _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -478,78 +479,80 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/tx.proto", fileDescriptor_11e362c65eb610f4) } var fileDescriptor_11e362c65eb610f4 = []byte{ - // 1125 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0xe3, 0xc4, - 0x1b, 0xae, 0xb7, 0xfd, 0xf5, 0xd7, 0x4c, 0xe8, 0xb6, 0x75, 0xda, 0xc5, 0x49, 0x5b, 0xbb, 0x0c, - 0xb0, 0x74, 0x25, 0x6a, 0xd3, 0x82, 0x10, 0x14, 0x09, 0x41, 0xb6, 0x5b, 0xb4, 0xa8, 0x65, 0x23, - 0x0b, 0x2d, 0x12, 0x97, 0x68, 0x62, 0x4f, 0x6d, 0xab, 0xb6, 0xc7, 0x78, 0xa6, 0xff, 0x4e, 0x08, - 0x84, 0x04, 0x47, 0x24, 0x24, 0x54, 0x6e, 0xfd, 0x00, 0x48, 0x5c, 0xf8, 0x10, 0x7b, 0x5c, 0xc1, - 0x05, 0x71, 0x08, 0xa8, 0xe5, 0xb0, 0xe2, 0xc0, 0x21, 0x77, 0x04, 0xf2, 0xcc, 0xc4, 0x49, 0x9d, - 0xec, 0x6e, 0xca, 0x2d, 0x33, 0xcf, 0x33, 0xef, 0xfb, 0xbc, 0x8f, 0x67, 0xde, 0x37, 0xa0, 0x1a, - 0x07, 0xad, 0x20, 0x3d, 0xb0, 0x48, 0x8a, 0x9c, 0x10, 0x5b, 0x87, 0xeb, 0x16, 0x3b, 0x36, 0x93, - 0x94, 0x30, 0xa2, 0xce, 0x0a, 0xc8, 0x14, 0x90, 0x79, 0xb8, 0x5e, 0x9b, 0xf7, 0x88, 0x47, 0x38, - 0x68, 0x65, 0xbf, 0x04, 0xaf, 0xb6, 0xe4, 0x11, 0xe2, 0x85, 0xd8, 0x42, 0x49, 0x60, 0xa1, 0x38, - 0x26, 0x0c, 0xb1, 0x80, 0xc4, 0x54, 0xa2, 0xba, 0x44, 0xf9, 0xaa, 0x75, 0xb0, 0x67, 0xb9, 0x07, - 0x29, 0x27, 0x48, 0x7c, 0x79, 0x40, 0x80, 0xcc, 0x27, 0xe0, 0xaa, 0x43, 0x68, 0x44, 0x68, 0x53, - 0x64, 0x15, 0x0b, 0x01, 0xc1, 0x1f, 0x14, 0x60, 0xec, 0x52, 0xef, 0x5d, 0xcf, 0x4b, 0xb1, 0x87, - 0x18, 0xbe, 0x73, 0xec, 0xf8, 0x28, 0xf6, 0xb0, 0x8d, 0x18, 0x6e, 0xa4, 0xf8, 0x90, 0x30, 0xac, - 0x3e, 0x0f, 0x26, 0x7c, 0x44, 0x7d, 0x4d, 0x59, 0x51, 0x56, 0x4b, 0xf5, 0x99, 0x4e, 0xdb, 0x28, - 0x9f, 0xa0, 0x28, 0xdc, 0x84, 0xd9, 0x2e, 0xb4, 0x39, 0xa8, 0xde, 0x02, 0x93, 0x7b, 0x18, 0xbb, - 0x38, 0xd5, 0xae, 0x71, 0xda, 0x5c, 0xa7, 0x6d, 0x4c, 0x0b, 0x9a, 0xd8, 0x87, 0xb6, 0x24, 0xa8, - 0x1b, 0xa0, 0x74, 0x88, 0xc2, 0xc0, 0x45, 0x8c, 0xa4, 0xda, 0x38, 0x67, 0xcf, 0x77, 0xda, 0xc6, - 0xac, 0x60, 0xe7, 0x10, 0xb4, 0x7b, 0xb4, 0xcd, 0xa9, 0xaf, 0xce, 0x8c, 0xb1, 0x47, 0x67, 0xc6, - 0x18, 0xbc, 0x05, 0x5e, 0x7a, 0x8a, 0x60, 0x1b, 0xd3, 0x84, 0xc4, 0x14, 0xc3, 0xbf, 0x14, 0xb0, - 0xf4, 0x38, 0xee, 0x7d, 0x59, 0x19, 0x45, 0x21, 0x1b, 0xac, 0x2c, 0xdb, 0x85, 0x36, 0x07, 0xd5, - 0x77, 0xc0, 0x75, 0x2c, 0x0f, 0x36, 0x53, 0xc4, 0x30, 0x95, 0x15, 0x56, 0x3b, 0x6d, 0x63, 0x41, - 0xd0, 0x2f, 0xe3, 0xd0, 0x9e, 0xc6, 0x7d, 0x99, 0x68, 0x9f, 0x37, 0xe3, 0x57, 0xf2, 0x66, 0xe2, - 0xaa, 0xde, 0xdc, 0x04, 0x2f, 0x3c, 0xa9, 0xde, 0xdc, 0x98, 0x2f, 0x14, 0x70, 0x63, 0x97, 0x7a, - 0x5b, 0x38, 0xe4, 0xbc, 0x6d, 0x8c, 0xdd, 0xdb, 0x19, 0x10, 0x33, 0xd5, 0x02, 0x53, 0x24, 0xc1, - 0x29, 0xcf, 0x2f, 0x6c, 0xa9, 0x74, 0xda, 0xc6, 0x8c, 0xc8, 0xdf, 0x45, 0xa0, 0x9d, 0x93, 0xb2, - 0x03, 0xae, 0x8c, 0x23, 0x8d, 0xe9, 0x3b, 0xd0, 0x45, 0xa0, 0x9d, 0x93, 0xfa, 0xe4, 0xae, 0x00, - 0x7d, 0xb8, 0x8a, 0x5c, 0xe8, 0xa9, 0x02, 0x2a, 0xbb, 0xd4, 0xbb, 0xe3, 0x06, 0xec, 0x1e, 0xbf, - 0xd1, 0x0d, 0x94, 0xa2, 0x88, 0x3b, 0x4a, 0x71, 0x9c, 0x39, 0xaa, 0x14, 0x1d, 0x15, 0xfb, 0xd0, - 0x96, 0x04, 0x75, 0x07, 0x4c, 0x26, 0xfc, 0x10, 0x57, 0x57, 0xde, 0x78, 0xce, 0x2c, 0x3e, 0x49, - 0xb3, 0x3f, 0xf4, 0x2e, 0xf5, 0xfa, 0xa3, 0x89, 0xa3, 0xd0, 0x96, 0x31, 0xfa, 0xc4, 0x2f, 0x83, - 0xc5, 0x21, 0xca, 0x72, 0xe5, 0xff, 0x4c, 0x81, 0x99, 0x42, 0x5c, 0xf5, 0x2d, 0x50, 0xce, 0xee, - 0x67, 0x33, 0xc1, 0x69, 0x40, 0x5c, 0x2e, 0x7d, 0xa2, 0x5e, 0x7b, 0xd0, 0x36, 0x94, 0x4e, 0xdb, - 0x50, 0xe5, 0x27, 0xee, 0x11, 0xa0, 0x0d, 0xb2, 0x55, 0x83, 0x2f, 0xd4, 0x4f, 0xc0, 0x75, 0x8e, - 0x31, 0x3f, 0xc5, 0xd4, 0x27, 0xa1, 0x2b, 0xdd, 0x7e, 0x3f, 0x3b, 0xff, 0x6b, 0xdb, 0x58, 0x14, - 0xef, 0x9a, 0xba, 0xfb, 0x66, 0x40, 0xac, 0x08, 0x31, 0xdf, 0xdc, 0xc1, 0x1e, 0x72, 0x4e, 0xb6, - 0xb0, 0xd3, 0xbb, 0xa9, 0x97, 0x43, 0xc0, 0x9f, 0x7e, 0x5c, 0x03, 0xb2, 0x1f, 0x6c, 0x61, 0xc7, - 0x9e, 0xce, 0xe0, 0x0f, 0xbb, 0xa8, 0xea, 0x83, 0x72, 0x8a, 0x8f, 0x50, 0xea, 0x36, 0x5b, 0x28, - 0x76, 0xe5, 0xe5, 0x7d, 0x6f, 0xb4, 0x7c, 0xb2, 0x9c, 0xbe, 0xf3, 0xc5, 0x64, 0x40, 0x60, 0x75, - 0x14, 0xbb, 0x6a, 0x0c, 0x4a, 0x47, 0x7e, 0xc0, 0x70, 0x18, 0x50, 0xa6, 0x4d, 0xac, 0x8c, 0xaf, - 0x96, 0xea, 0x0d, 0x99, 0xe7, 0x35, 0x2f, 0x60, 0xfe, 0x41, 0xcb, 0x74, 0x48, 0x64, 0x7d, 0xc0, - 0xbf, 0xdc, 0x6d, 0x1f, 0x05, 0xb1, 0x25, 0x5b, 0xde, 0xe1, 0x86, 0x75, 0x6c, 0x39, 0x24, 0x8a, - 0x48, 0x6c, 0x21, 0x4a, 0x31, 0x33, 0x1b, 0x28, 0x48, 0x7b, 0x4f, 0x26, 0x0f, 0x0b, 0xed, 0x5e, - 0x8a, 0xcc, 0x4c, 0x1a, 0x22, 0xea, 0x37, 0xf7, 0x52, 0xe4, 0x64, 0x8d, 0x54, 0xfb, 0xdf, 0x7f, - 0x30, 0xf3, 0x72, 0x88, 0x01, 0x33, 0x39, 0xbc, 0x2d, 0x51, 0xf5, 0x6d, 0xf0, 0x8c, 0xe0, 0x1f, - 0x05, 0xb1, 0x4b, 0x8e, 0xb4, 0x49, 0xfe, 0xf5, 0x17, 0xe5, 0xd7, 0xaf, 0xf4, 0x47, 0x14, 0x0c, - 0x68, 0x97, 0xf9, 0xf2, 0x23, 0xbe, 0x52, 0x3f, 0x53, 0xc0, 0x7c, 0x14, 0xc4, 0x4d, 0xfe, 0xee, - 0xb3, 0x1b, 0xd2, 0x0d, 0xf4, 0x7f, 0xae, 0xbc, 0x31, 0x9a, 0xf2, 0x45, 0x91, 0x67, 0x58, 0xa0, - 0xa2, 0xfe, 0xb9, 0x28, 0x88, 0xef, 0x67, 0x9c, 0x06, 0x4e, 0xa5, 0x86, 0x6f, 0x15, 0x30, 0xcf, - 0x8e, 0x50, 0xd2, 0x0c, 0x09, 0xd9, 0x6f, 0x21, 0x67, 0xbf, 0xab, 0x61, 0x8a, 0x3f, 0xad, 0xaa, - 0x29, 0xe6, 0x94, 0xd9, 0x9d, 0x53, 0xe6, 0x96, 0x9c, 0x53, 0xf5, 0xbb, 0x99, 0xbc, 0x3f, 0xdb, - 0x86, 0x3e, 0xec, 0xf8, 0xcb, 0x24, 0x0a, 0x18, 0x8e, 0x12, 0x76, 0xd2, 0x53, 0x38, 0x8c, 0x07, - 0x4f, 0x7f, 0x33, 0x14, 0x5b, 0xcd, 0xa0, 0x1d, 0x89, 0x48, 0x61, 0x6f, 0x00, 0xc0, 0x4b, 0x22, - 0x0c, 0xa7, 0x54, 0x2b, 0x71, 0x6b, 0xab, 0xd2, 0xda, 0xb9, 0xbe, 0x92, 0x39, 0x0e, 0xed, 0x52, - 0x56, 0x1a, 0xff, 0xad, 0x7e, 0x0a, 0x2a, 0x79, 0x27, 0x6d, 0xee, 0x61, 0xde, 0xc2, 0x03, 0xa2, - 0x01, 0x6e, 0xea, 0xbd, 0xd1, 0x4c, 0xad, 0x15, 0xba, 0x73, 0x2f, 0xce, 0x80, 0xa7, 0x39, 0x67, - 0x1b, 0x67, 0x6d, 0x39, 0x20, 0xea, 0x2e, 0x98, 0xc3, 0xc7, 0x49, 0x20, 0x7c, 0x6a, 0xb6, 0x42, - 0xe2, 0xec, 0x53, 0xad, 0xcc, 0x2b, 0x58, 0x91, 0x15, 0x68, 0xdd, 0x29, 0x53, 0xa0, 0x41, 0x7b, - 0xb6, 0xb7, 0x57, 0xe7, 0x5b, 0x9b, 0x53, 0xa7, 0x67, 0x86, 0xf2, 0xe8, 0xcc, 0x50, 0x36, 0xfe, - 0x9e, 0x00, 0xe3, 0x59, 0xd7, 0xf9, 0x5e, 0x01, 0x4b, 0x4f, 0x9c, 0xef, 0xeb, 0x83, 0x1d, 0xf1, - 0x29, 0x13, 0xb6, 0xf6, 0xe6, 0x95, 0x8f, 0xe4, 0x8d, 0x51, 0xff, 0xfc, 0xe7, 0x3f, 0xbe, 0xb9, - 0xa6, 0xc1, 0x1b, 0xd6, 0xe5, 0x3f, 0x2d, 0x89, 0x54, 0x73, 0xa6, 0x80, 0xea, 0xe3, 0x27, 0xb6, - 0x39, 0x7a, 0xe2, 0x8c, 0x5f, 0x7b, 0xfd, 0x6a, 0xfc, 0x5c, 0xe5, 0x22, 0x57, 0xb9, 0x00, 0x2b, - 0x05, 0x95, 0x5c, 0xe2, 0x77, 0x0a, 0xa8, 0x0c, 0x9b, 0x9d, 0xab, 0x43, 0x93, 0x0d, 0x61, 0xd6, - 0x5e, 0x19, 0x95, 0x99, 0x0b, 0xba, 0xc9, 0x05, 0xad, 0x40, 0xbd, 0x20, 0x48, 0xfc, 0x6f, 0x58, - 0xeb, 0x4e, 0x57, 0xf5, 0x4b, 0x05, 0xcc, 0x0e, 0x8c, 0xcb, 0x17, 0x87, 0xa6, 0x2b, 0xd2, 0x6a, - 0x6b, 0x23, 0xd1, 0x72, 0x49, 0xcb, 0x5c, 0xd2, 0xb3, 0x70, 0xa1, 0xf8, 0x25, 0x39, 0xad, 0x7e, - 0xf7, 0xc1, 0xb9, 0xae, 0x3c, 0x3c, 0xd7, 0x95, 0xdf, 0xcf, 0x75, 0xe5, 0xeb, 0x0b, 0x7d, 0xec, - 0xe1, 0x85, 0x3e, 0xf6, 0xcb, 0x85, 0x3e, 0xf6, 0xb1, 0x35, 0x42, 0x4b, 0x97, 0xb1, 0xd8, 0x49, - 0x82, 0x69, 0x6b, 0x92, 0x37, 0x94, 0x57, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x15, 0x0e, 0x3a, - 0xaa, 0x69, 0x0b, 0x00, 0x00, + // 1161 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0xdc, 0x44, + 0x1b, 0x8e, 0x9b, 0x34, 0x5f, 0x76, 0xf6, 0x6b, 0x93, 0x78, 0x93, 0x76, 0x77, 0x93, 0xd8, 0x61, + 0x80, 0x92, 0x56, 0xc4, 0x26, 0x01, 0x21, 0x08, 0x12, 0x82, 0x6d, 0x1a, 0x54, 0x94, 0xd0, 0x95, + 0x85, 0x8a, 0xc4, 0x65, 0x35, 0x6b, 0x4f, 0x6c, 0x2b, 0xb6, 0xc7, 0x78, 0x26, 0xbf, 0x4e, 0x40, + 0x85, 0x04, 0x47, 0x10, 0x12, 0x2a, 0xb7, 0x48, 0x5c, 0x39, 0xf4, 0xc0, 0x89, 0xbf, 0xa0, 0xc7, + 0x0a, 0x2e, 0x88, 0xc3, 0x82, 0x12, 0xa4, 0x56, 0x1c, 0xf7, 0xc6, 0x09, 0xe4, 0x99, 0x59, 0xef, + 0xc6, 0xbb, 0x6d, 0x37, 0x70, 0xdb, 0x99, 0xe7, 0x79, 0xdf, 0xf7, 0x79, 0x9f, 0x19, 0xbf, 0xb3, + 0xa0, 0x12, 0xf9, 0x4d, 0x3f, 0xd9, 0x35, 0x49, 0x82, 0xec, 0x00, 0x9b, 0x7b, 0x2b, 0x26, 0x3b, + 0x30, 0xe2, 0x84, 0x30, 0xa2, 0x4e, 0x09, 0xc8, 0x10, 0x90, 0xb1, 0xb7, 0x52, 0x9d, 0x71, 0x89, + 0x4b, 0x38, 0x68, 0xa6, 0xbf, 0x04, 0xaf, 0x3a, 0xef, 0x12, 0xe2, 0x06, 0xd8, 0x44, 0xb1, 0x6f, + 0xa2, 0x28, 0x22, 0x0c, 0x31, 0x9f, 0x44, 0x54, 0xa2, 0x9a, 0x44, 0xf9, 0xaa, 0xb9, 0xbb, 0x6d, + 0x3a, 0xbb, 0x09, 0x27, 0x48, 0x7c, 0xa1, 0x4f, 0x80, 0xac, 0x27, 0xe0, 0x8a, 0x4d, 0x68, 0x48, + 0x68, 0x43, 0x54, 0x15, 0x0b, 0x09, 0x5d, 0x16, 0x2b, 0x33, 0xa4, 0x6e, 0x1a, 0x16, 0x52, 0x57, + 0x00, 0xf0, 0x47, 0x05, 0xe8, 0x5b, 0xd4, 0x7d, 0xdb, 0x75, 0x13, 0xec, 0x22, 0x86, 0x6f, 0x1c, + 0xd8, 0x1e, 0x8a, 0x5c, 0x6c, 0x21, 0x86, 0xeb, 0x09, 0xde, 0x23, 0x0c, 0xab, 0xcf, 0x82, 0x31, + 0x0f, 0x51, 0xaf, 0xac, 0x2c, 0x2a, 0x4b, 0x85, 0xda, 0x64, 0xbb, 0xa5, 0x17, 0x0f, 0x51, 0x18, + 0xac, 0xc1, 0x74, 0x17, 0x5a, 0x1c, 0x54, 0xaf, 0x82, 0xf1, 0x6d, 0x8c, 0x1d, 0x9c, 0x94, 0xcf, + 0x71, 0xda, 0x74, 0xbb, 0xa5, 0x5f, 0x10, 0x34, 0xb1, 0x0f, 0x2d, 0x49, 0x50, 0x57, 0x41, 0x61, + 0x0f, 0x05, 0xbe, 0x83, 0x18, 0x49, 0xca, 0xa3, 0x9c, 0x3d, 0xd3, 0x6e, 0xe9, 0x53, 0x82, 0x9d, + 0x41, 0xd0, 0xea, 0xd2, 0xd6, 0x4a, 0x5f, 0x1c, 0xe9, 0x23, 0x8f, 0x8e, 0xf4, 0x91, 0x3b, 0x0f, + 0xef, 0x5d, 0x93, 0x89, 0xe0, 0x55, 0xf0, 0xc2, 0x53, 0xb4, 0x5b, 0x98, 0xc6, 0x24, 0xa2, 0x18, + 0xfe, 0xa5, 0x80, 0xf9, 0xc7, 0x71, 0x6f, 0xcb, 0x26, 0x29, 0x0a, 0x58, 0x7f, 0x93, 0xe9, 0x2e, + 0xb4, 0x38, 0xa8, 0xbe, 0x05, 0x2e, 0x62, 0x19, 0xd8, 0x48, 0x10, 0xc3, 0x54, 0x36, 0x5b, 0x69, + 0xb7, 0xf4, 0x59, 0x41, 0x3f, 0x8d, 0x43, 0xeb, 0x02, 0xee, 0xa9, 0x44, 0x7b, 0x6c, 0x1a, 0x3d, + 0x93, 0x4d, 0x63, 0xff, 0xc1, 0xa6, 0x2b, 0xe0, 0xb9, 0x27, 0xb5, 0x9e, 0x79, 0xf4, 0x95, 0x02, + 0x2e, 0x6d, 0x51, 0x77, 0x1d, 0x07, 0x9c, 0xb7, 0x81, 0xb1, 0x73, 0x3d, 0x05, 0x22, 0xa6, 0x9a, + 0x60, 0x82, 0xc4, 0x38, 0xe1, 0x52, 0x84, 0x43, 0xa5, 0x76, 0x4b, 0x9f, 0x14, 0x52, 0x3a, 0x08, + 0xb4, 0x32, 0x52, 0x1a, 0xe0, 0xc8, 0x3c, 0xd2, 0xa3, 0x9e, 0x80, 0x0e, 0x02, 0xad, 0x8c, 0xb4, + 0x36, 0xdb, 0xab, 0x3c, 0xcb, 0x03, 0x17, 0x81, 0x36, 0x58, 0x52, 0xa6, 0xfa, 0x3b, 0x05, 0x94, + 0xb6, 0xa8, 0x7b, 0xc3, 0xf1, 0xd9, 0x2d, 0xfe, 0x35, 0xd4, 0x51, 0x82, 0x42, 0xee, 0x34, 0xc5, + 0x51, 0xea, 0xb4, 0x92, 0x77, 0x5a, 0xec, 0x43, 0x4b, 0x12, 0xd4, 0x4d, 0x30, 0x1e, 0xf3, 0x20, + 0x2e, 0xb5, 0xb8, 0xfa, 0x8c, 0x91, 0xff, 0x9c, 0x8d, 0xde, 0xd4, 0x5b, 0xd4, 0xed, 0xcd, 0x26, + 0x42, 0xa1, 0x25, 0x73, 0xe4, 0xce, 0x40, 0xd6, 0x5a, 0x00, 0x73, 0x03, 0x44, 0x66, 0x4d, 0xfc, + 0x3d, 0x01, 0x26, 0x73, 0x25, 0xd4, 0x37, 0x40, 0x31, 0xbd, 0xc2, 0x8d, 0x18, 0x27, 0x3e, 0x71, + 0x78, 0x17, 0x63, 0xb5, 0xea, 0xfd, 0x96, 0xae, 0xb4, 0x5b, 0xba, 0x2a, 0x6f, 0x41, 0x97, 0x00, + 0x2d, 0x90, 0xae, 0xea, 0x7c, 0xa1, 0x7e, 0x04, 0x2e, 0x72, 0x8c, 0x79, 0x09, 0xa6, 0x1e, 0x09, + 0x1c, 0x79, 0x0a, 0xef, 0xa6, 0xf1, 0xbf, 0xb6, 0xf4, 0x39, 0x31, 0x10, 0xa8, 0xb3, 0x63, 0xf8, + 0xc4, 0x0c, 0x11, 0xf3, 0x8c, 0x4d, 0xec, 0x22, 0xfb, 0x70, 0x1d, 0xdb, 0xdd, 0xcb, 0x7c, 0x3a, + 0x05, 0xfc, 0xe9, 0x87, 0x65, 0x20, 0xc7, 0xca, 0x3a, 0xb6, 0xad, 0x0b, 0x29, 0xfc, 0x7e, 0x07, + 0x55, 0x3d, 0x50, 0x4c, 0xf0, 0x3e, 0x4a, 0x9c, 0x46, 0x13, 0x45, 0x8e, 0xbc, 0xdf, 0xef, 0x0c, + 0x57, 0x4f, 0xb6, 0xd3, 0x13, 0x9f, 0x2f, 0x06, 0x04, 0x56, 0x43, 0x91, 0xa3, 0x46, 0xa0, 0xb0, + 0xef, 0xf9, 0x0c, 0x07, 0x3e, 0x65, 0xe5, 0xb1, 0xc5, 0xd1, 0xa5, 0x42, 0xad, 0x2e, 0xeb, 0xbc, + 0xe2, 0xfa, 0xcc, 0xdb, 0x6d, 0x1a, 0x36, 0x09, 0xcd, 0xf7, 0xf8, 0x21, 0x5e, 0xf7, 0x90, 0x1f, + 0x99, 0x72, 0x72, 0xee, 0xad, 0x9a, 0x07, 0xa6, 0x4d, 0xc2, 0x90, 0x44, 0x26, 0xa2, 0x14, 0x33, + 0xa3, 0x8e, 0xfc, 0xa4, 0xfb, 0x55, 0x65, 0x69, 0xa1, 0xd5, 0x2d, 0x91, 0x9a, 0x49, 0x03, 0x44, + 0xbd, 0xc6, 0x76, 0x82, 0xec, 0x74, 0x1e, 0x97, 0xcf, 0xff, 0x0b, 0x33, 0x4f, 0xa7, 0xe8, 0x33, + 0x93, 0xc3, 0x1b, 0x12, 0x55, 0xdf, 0x04, 0xff, 0x17, 0xfc, 0x7d, 0x3f, 0x72, 0xc8, 0x7e, 0x79, + 0x9c, 0x9f, 0xfe, 0x9c, 0x3c, 0xfd, 0x52, 0x6f, 0x46, 0xc1, 0x80, 0x56, 0x91, 0x2f, 0x3f, 0xe0, + 0x2b, 0xf5, 0x53, 0x05, 0xcc, 0x84, 0x7e, 0xd4, 0xe0, 0xa3, 0x21, 0xbd, 0x21, 0x9d, 0x44, 0xff, + 0xe3, 0xca, 0xeb, 0xc3, 0x29, 0x9f, 0x13, 0x75, 0x06, 0x25, 0xca, 0xeb, 0x9f, 0x0e, 0xfd, 0xe8, + 0x76, 0xca, 0xa9, 0xe3, 0x44, 0x6a, 0xf8, 0x46, 0x01, 0x33, 0x6c, 0x1f, 0xc5, 0x8d, 0x80, 0x90, + 0x9d, 0x26, 0xb2, 0x77, 0x3a, 0x1a, 0x26, 0xf8, 0x57, 0x56, 0x31, 0xc4, 0x73, 0x67, 0x74, 0x9e, + 0x3b, 0x63, 0x5d, 0x3e, 0x77, 0xb5, 0x9b, 0xa9, 0xbc, 0x3f, 0x5b, 0xba, 0x36, 0x28, 0xfc, 0x45, + 0x12, 0xfa, 0x0c, 0x87, 0x31, 0x3b, 0xec, 0x2a, 0x1c, 0xc4, 0x83, 0x77, 0x7f, 0xd3, 0x15, 0x4b, + 0x4d, 0xa1, 0x4d, 0x89, 0x48, 0x61, 0xaf, 0x01, 0xc0, 0x5b, 0x22, 0x0c, 0x27, 0xb4, 0x5c, 0xe0, + 0xd6, 0x56, 0xa4, 0xb5, 0xd3, 0x3d, 0x2d, 0x73, 0x1c, 0x5a, 0x85, 0xb4, 0x35, 0xfe, 0x5b, 0xfd, + 0x18, 0x94, 0xb2, 0x61, 0xdb, 0xd8, 0xc6, 0x7c, 0xca, 0xfb, 0xa4, 0x0c, 0xb8, 0xa9, 0xb7, 0x86, + 0x33, 0xb5, 0x9a, 0x1b, 0xe0, 0xdd, 0x3c, 0x7d, 0x9e, 0x66, 0x9c, 0x0d, 0x9c, 0x8e, 0x6b, 0x9f, + 0xa8, 0x5b, 0x60, 0x1a, 0x1f, 0xc4, 0xbe, 0xf0, 0xa9, 0xd1, 0x0c, 0x88, 0xbd, 0x43, 0xcb, 0x45, + 0xde, 0xc1, 0xa2, 0xec, 0xa0, 0xdc, 0x79, 0x88, 0x72, 0x34, 0x68, 0x4d, 0x75, 0xf7, 0x6a, 0x7c, + 0x6b, 0x6d, 0xe2, 0xee, 0x91, 0xae, 0x3c, 0x3a, 0xd2, 0x95, 0xd5, 0xcf, 0xce, 0x83, 0xd1, 0x74, + 0xea, 0x7c, 0xaf, 0x80, 0xf9, 0x27, 0xfe, 0x1b, 0x58, 0xe9, 0x1f, 0x8e, 0x4f, 0x79, 0x84, 0xab, + 0xaf, 0x9f, 0x39, 0x24, 0x1b, 0x8c, 0xda, 0x9d, 0x9f, 0xff, 0xf8, 0xfa, 0x5c, 0x19, 0x5e, 0x32, + 0x4f, 0xff, 0xf7, 0x89, 0xa5, 0x9a, 0x23, 0x05, 0x54, 0x1e, 0xff, 0xa8, 0x1b, 0xc3, 0x17, 0x4e, + 0xf9, 0xd5, 0x57, 0xcf, 0xc6, 0xcf, 0x54, 0xce, 0x71, 0x95, 0xb3, 0xb0, 0x94, 0x53, 0xc9, 0x25, + 0x7e, 0xab, 0x80, 0xd2, 0xa0, 0x37, 0x75, 0x69, 0x60, 0xb1, 0x01, 0xcc, 0xea, 0x4b, 0xc3, 0x32, + 0x33, 0x41, 0x57, 0xb8, 0xa0, 0x45, 0xa8, 0xe5, 0x04, 0x89, 0x7f, 0x04, 0xcb, 0x9d, 0x57, 0x57, + 0xfd, 0x5c, 0x01, 0x53, 0x7d, 0x2f, 0xe7, 0xf3, 0x03, 0xcb, 0xe5, 0x69, 0xd5, 0xe5, 0xa1, 0x68, + 0x99, 0xa4, 0x05, 0x2e, 0xe9, 0x32, 0x9c, 0xcd, 0x9f, 0xa4, 0xc8, 0x76, 0xfe, 0x93, 0x87, 0xf7, + 0xae, 0x29, 0xb5, 0x9b, 0xf7, 0x8f, 0x35, 0xe5, 0xc1, 0xb1, 0xa6, 0xfc, 0x7e, 0xac, 0x29, 0x5f, + 0x9e, 0x68, 0x23, 0x0f, 0x4e, 0xb4, 0x91, 0x5f, 0x4e, 0xb4, 0x91, 0x0f, 0xcd, 0x21, 0x26, 0xbb, + 0x4c, 0xc9, 0x0e, 0x63, 0x4c, 0x9b, 0xe3, 0x7c, 0xae, 0xbc, 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x29, 0xa6, 0xdc, 0xc7, 0xb7, 0x0b, 0x00, 0x00, } func (this *OracleParamsMsg) Equal(that interface{}) bool { diff --git a/x/sudo/types/tx.pb.go b/x/sudo/types/tx.pb.go index 69509147c1..1eb0d597d2 100644 --- a/x/sudo/types/tx.pb.go +++ b/x/sudo/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -234,31 +235,33 @@ func init() { func init() { proto.RegisterFile("nibiru/sudo/v1/tx.proto", fileDescriptor_a610e3c1609cdcbc) } var fileDescriptor_a610e3c1609cdcbc = []byte{ - // 372 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x4e, 0xea, 0x40, - 0x18, 0x86, 0x29, 0x24, 0x9c, 0xc3, 0x9c, 0x1c, 0x16, 0xcd, 0x39, 0x50, 0x2a, 0x36, 0xd8, 0x44, - 0xc3, 0xc6, 0x4e, 0xc0, 0x3b, 0x80, 0x18, 0x57, 0xb8, 0xa8, 0x3b, 0x17, 0x92, 0xa1, 0x9d, 0x0c, - 0x93, 0xe8, 0x7c, 0x4d, 0x67, 0x0a, 0xb8, 0xf5, 0x0a, 0x4c, 0xbc, 0x29, 0x97, 0x24, 0x6e, 0x5c, - 0x1a, 0xf0, 0x16, 0xdc, 0x9b, 0x4e, 0xf9, 0x69, 0x13, 0xc3, 0xae, 0xd3, 0xe7, 0x7b, 0x9f, 0x77, - 0x66, 0x5a, 0xd4, 0x14, 0x7c, 0xc2, 0xe3, 0x04, 0xcb, 0x24, 0x04, 0x3c, 0xeb, 0x61, 0xb5, 0xf0, - 0xa2, 0x18, 0x14, 0x98, 0xf5, 0x0c, 0x78, 0x29, 0xf0, 0x66, 0x3d, 0xfb, 0x1f, 0x03, 0x06, 0x1a, - 0xe1, 0xf4, 0x29, 0x9b, 0xb2, 0xdb, 0x0c, 0x80, 0xdd, 0x53, 0x4c, 0x22, 0x8e, 0x89, 0x10, 0xa0, - 0x88, 0xe2, 0x20, 0x64, 0x46, 0xdd, 0x3b, 0x54, 0x1f, 0x49, 0x76, 0x19, 0x72, 0x75, 0x93, 0x84, - 0x40, 0x63, 0x69, 0x36, 0x50, 0x95, 0x04, 0xe9, 0x88, 0x65, 0x74, 0x8c, 0x6e, 0xcd, 0xdf, 0xac, - 0xcc, 0x36, 0xaa, 0x05, 0x20, 0x54, 0x4c, 0x02, 0x25, 0xad, 0x72, 0xa7, 0xd2, 0xad, 0xf9, 0xfb, - 0x17, 0x69, 0x4a, 0x52, 0x11, 0xd2, 0xd8, 0xaa, 0x64, 0xa9, 0x6c, 0xe5, 0x5a, 0xa8, 0x51, 0xf4, - 0xfb, 0x54, 0x46, 0x20, 0x24, 0x75, 0x07, 0xe8, 0xef, 0x48, 0xb2, 0xe1, 0x94, 0x08, 0x46, 0x7d, - 0x00, 0x95, 0x53, 0x18, 0x79, 0x85, 0xd9, 0x42, 0xbf, 0x05, 0x9d, 0x8f, 0x63, 0x00, 0x65, 0x95, - 0x35, 0xf9, 0x25, 0xe8, 0x3c, 0x8d, 0xb8, 0x4d, 0xf4, 0xbf, 0xe0, 0xd8, 0xca, 0xfb, 0x5f, 0x06, - 0xaa, 0x8c, 0x24, 0x33, 0x17, 0xe8, 0x4f, 0xfe, 0x6c, 0x8e, 0x57, 0xbc, 0x32, 0xaf, 0xb8, 0x37, - 0xfb, 0xec, 0x30, 0xdf, 0xed, 0xfd, 0xe4, 0xe9, 0xed, 0xf3, 0xa5, 0x7c, 0xe4, 0xb6, 0x70, 0xfe, - 0xdb, 0xd0, 0x90, 0xab, 0xb1, 0xdc, 0x54, 0x29, 0x84, 0x72, 0x67, 0x3b, 0xfe, 0x41, 0xbc, 0xc7, - 0xf6, 0xe9, 0x41, 0xbc, 0xab, 0xed, 0xe8, 0x5a, 0xdb, 0xb5, 0x0a, 0xb5, 0x81, 0x1e, 0xd4, 0xf7, - 0x33, 0xb8, 0x7a, 0x5d, 0x39, 0xc6, 0x72, 0xe5, 0x18, 0x1f, 0x2b, 0xc7, 0x78, 0x5e, 0x3b, 0xa5, - 0xe5, 0xda, 0x29, 0xbd, 0xaf, 0x9d, 0xd2, 0xed, 0x39, 0xe3, 0x6a, 0x9a, 0x4c, 0xbc, 0x00, 0x1e, - 0xf0, 0xb5, 0x4e, 0x0f, 0xa7, 0x84, 0x8b, 0xad, 0x69, 0xd6, 0xc7, 0x8b, 0x4c, 0xa7, 0x1e, 0x23, - 0x2a, 0x27, 0x55, 0xfd, 0x7b, 0x5c, 0x7c, 0x07, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xdb, 0xcd, 0x34, - 0x7d, 0x02, 0x00, 0x00, + // 406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcf, 0xaa, 0xd3, 0x40, + 0x14, 0x87, 0x3b, 0x2d, 0x5e, 0xed, 0x5c, 0xbc, 0x8b, 0xa0, 0xb7, 0xb9, 0xf1, 0x1a, 0x6a, 0x40, + 0x29, 0x05, 0x33, 0xb4, 0xee, 0x5c, 0x5a, 0xc4, 0x55, 0x15, 0xe2, 0xce, 0x4d, 0x49, 0x93, 0x61, + 0x3a, 0x68, 0xe6, 0x84, 0x9c, 0x49, 0x5b, 0x77, 0xd2, 0x27, 0x10, 0x7c, 0x91, 0x3e, 0x86, 0xcb, + 0x82, 0x1b, 0x97, 0xd2, 0x0a, 0x7d, 0x09, 0x17, 0x92, 0x3f, 0x6d, 0x13, 0xb8, 0x74, 0x97, 0x93, + 0x6f, 0xce, 0xf7, 0xcb, 0x39, 0x19, 0xda, 0x51, 0x72, 0x2a, 0x93, 0x94, 0x61, 0x1a, 0x02, 0x9b, + 0x0f, 0x98, 0x5e, 0xba, 0x71, 0x02, 0x1a, 0x8c, 0xab, 0x02, 0xb8, 0x19, 0x70, 0xe7, 0x03, 0xeb, + 0x91, 0x00, 0x01, 0x39, 0x62, 0xd9, 0x53, 0x71, 0xca, 0xba, 0x15, 0x00, 0xe2, 0x0b, 0x67, 0x7e, + 0x2c, 0x99, 0xaf, 0x14, 0x68, 0x5f, 0x4b, 0x50, 0x58, 0xd2, 0x4e, 0x00, 0x18, 0x01, 0xb2, 0x08, + 0x45, 0xe6, 0x8e, 0x50, 0x14, 0xc0, 0xf9, 0x4c, 0xaf, 0xc6, 0x28, 0xde, 0x86, 0x52, 0x7f, 0x4c, + 0x43, 0xe0, 0x09, 0x1a, 0xd7, 0xf4, 0xc2, 0x0f, 0xb2, 0x5e, 0x93, 0x74, 0x49, 0xaf, 0xed, 0x95, + 0x95, 0x71, 0x4b, 0xdb, 0x01, 0x28, 0x9d, 0xf8, 0x81, 0x46, 0xb3, 0xd9, 0x6d, 0xf5, 0xda, 0xde, + 0xe9, 0x45, 0xd6, 0x85, 0x5c, 0x85, 0x3c, 0x31, 0x5b, 0x45, 0x57, 0x51, 0xbd, 0xbe, 0x5c, 0xed, + 0xd7, 0xfd, 0xb2, 0x70, 0x4c, 0x7a, 0x5d, 0x0f, 0xf3, 0x38, 0xc6, 0xa0, 0x90, 0x3b, 0x1f, 0xe8, + 0xc3, 0x31, 0x8a, 0xd1, 0xcc, 0x57, 0x82, 0x7b, 0x00, 0xba, 0xe2, 0x23, 0x55, 0x9f, 0x71, 0x43, + 0x1f, 0x28, 0xbe, 0x98, 0x24, 0x00, 0xda, 0x6c, 0xe6, 0xe4, 0xbe, 0xe2, 0x8b, 0xac, 0xa5, 0x1e, + 0xd5, 0xa1, 0x8f, 0x6b, 0xc2, 0x43, 0xd2, 0xf0, 0x1f, 0xa1, 0xad, 0x31, 0x0a, 0x63, 0x49, 0x2f, + 0xab, 0x53, 0xdb, 0x6e, 0x7d, 0xcb, 0x6e, 0xfd, 0x43, 0xad, 0x17, 0xe7, 0xf9, 0x71, 0x90, 0x67, + 0xab, 0x5f, 0x7f, 0x7f, 0x34, 0x9f, 0x38, 0x37, 0xac, 0xfa, 0x3b, 0x79, 0x28, 0xf5, 0x04, 0xcb, + 0x28, 0x4d, 0x69, 0x65, 0xd0, 0xa7, 0x77, 0x88, 0x4f, 0xd8, 0x7a, 0x7e, 0x16, 0x1f, 0x63, 0xbb, + 0x79, 0xac, 0xe5, 0x98, 0xb5, 0xd8, 0x20, 0x3f, 0x98, 0x2f, 0xcb, 0xba, 0xf7, 0x6d, 0xbf, 0xee, + 0x93, 0x37, 0xef, 0x7e, 0x6e, 0x6d, 0xb2, 0xd9, 0xda, 0xe4, 0xcf, 0xd6, 0x26, 0xdf, 0x77, 0x76, + 0x63, 0xb3, 0xb3, 0x1b, 0xbf, 0x77, 0x76, 0xe3, 0xd3, 0x4b, 0x21, 0xf5, 0x2c, 0x9d, 0xba, 0x01, + 0x44, 0xec, 0x7d, 0x2e, 0x19, 0xcd, 0x7c, 0xa9, 0x0e, 0xc2, 0xf9, 0x90, 0x2d, 0x0b, 0xab, 0xfe, + 0x1a, 0x73, 0x9c, 0x5e, 0xe4, 0xf7, 0xe7, 0xd5, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x1c, + 0xfc, 0xb6, 0xb7, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tokenfactory/types/tx.pb.go b/x/tokenfactory/types/tx.pb.go index c15bef86ec..e3b97291a2 100644 --- a/x/tokenfactory/types/tx.pb.go +++ b/x/tokenfactory/types/tx.pb.go @@ -845,61 +845,63 @@ func init() { func init() { proto.RegisterFile("nibiru/tokenfactory/v1/tx.proto", fileDescriptor_4c78bacd179e004d) } var fileDescriptor_4c78bacd179e004d = []byte{ - // 864 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0x8e, 0x69, 0xd8, 0x26, 0x13, 0xf2, 0xa3, 0x4e, 0x48, 0xb6, 0x46, 0x59, 0xc3, 0x08, 0x0a, - 0x14, 0xc5, 0xd6, 0xa6, 0x2a, 0x48, 0xbd, 0xa0, 0x3a, 0x88, 0x9b, 0x4b, 0xe5, 0x96, 0x0b, 0x42, - 0x5a, 0x8d, 0xe3, 0xa9, 0xd7, 0x4a, 0x3c, 0xb3, 0xf2, 0x8c, 0x37, 0x5d, 0x0e, 0x08, 0x90, 0xb8, - 0x73, 0xe2, 0x1f, 0xe0, 0x84, 0xb8, 0x70, 0xe0, 0x8f, 0xc8, 0x31, 0xe2, 0xc4, 0xc9, 0x42, 0xc9, - 0x81, 0xfb, 0xfe, 0x05, 0x68, 0x7e, 0xac, 0xed, 0x74, 0x37, 0x6e, 0xf7, 0x92, 0xde, 0xc6, 0xf3, - 0xbe, 0xf7, 0xbd, 0xef, 0xb3, 0xdf, 0x7b, 0x32, 0xb0, 0x49, 0x12, 0x26, 0x59, 0xee, 0x72, 0x7a, - 0x84, 0xc9, 0x33, 0x74, 0xc8, 0x69, 0x36, 0x72, 0x87, 0x5d, 0x97, 0x3f, 0x77, 0x06, 0x19, 0xe5, - 0xd4, 0xdc, 0x56, 0x00, 0xa7, 0x0e, 0x70, 0x86, 0x5d, 0xab, 0x73, 0x48, 0x59, 0x4a, 0x99, 0x1b, - 0x22, 0x72, 0xe4, 0x0e, 0xbb, 0x21, 0xe6, 0xa8, 0x2b, 0x1f, 0x54, 0x5e, 0x2d, 0xce, 0x70, 0x19, - 0x3f, 0xa4, 0x09, 0xd1, 0xf1, 0x1d, 0x1d, 0x4f, 0x59, 0x2c, 0xea, 0xa5, 0x2c, 0xd6, 0x81, 0xdb, - 0x2a, 0xd0, 0x93, 0x4f, 0xae, 0x7a, 0xd0, 0xa1, 0xad, 0x98, 0xc6, 0x54, 0xdd, 0x8b, 0x93, 0xbe, - 0x85, 0x57, 0x58, 0x60, 0x1c, 0x71, 0xac, 0x30, 0xf0, 0x18, 0xac, 0xf9, 0x2c, 0x3e, 0xc8, 0x30, - 0xe2, 0xf8, 0x0b, 0x4c, 0x68, 0x6a, 0x7e, 0x0c, 0x5a, 0x0c, 0x93, 0x08, 0x67, 0x6d, 0xe3, 0x5d, - 0xe3, 0xa3, 0x65, 0xef, 0xd6, 0xb8, 0xb0, 0x57, 0x47, 0x28, 0x3d, 0x7e, 0x00, 0xd5, 0x3d, 0x0c, - 0x34, 0xc0, 0x74, 0xc1, 0x12, 0xcb, 0xc3, 0x48, 0xa4, 0xb5, 0xdf, 0x90, 0xe0, 0xcd, 0x71, 0x61, - 0xaf, 0x6b, 0xb0, 0x8e, 0xc0, 0xa0, 0x04, 0xc1, 0x6f, 0xc1, 0xf6, 0xe5, 0x6a, 0x01, 0x66, 0x03, - 0x4a, 0x18, 0x36, 0x3d, 0xb0, 0x4e, 0xf0, 0x49, 0x4f, 0x4a, 0xed, 0x29, 0x46, 0x55, 0xde, 0x1a, - 0x17, 0xf6, 0xb6, 0x62, 0x7c, 0x01, 0x00, 0x83, 0x55, 0x82, 0x4f, 0x9e, 0x8a, 0x0b, 0xc9, 0x05, - 0x7f, 0x35, 0x94, 0x99, 0x3e, 0x22, 0x31, 0x7e, 0x18, 0xa5, 0x09, 0x99, 0xc7, 0xcc, 0x1d, 0xf0, - 0x66, 0xdd, 0xc9, 0xc6, 0xb8, 0xb0, 0xdf, 0x52, 0x48, 0x5d, 0x4d, 0x85, 0xcd, 0x2e, 0x58, 0x16, - 0x42, 0x90, 0xe0, 0x6f, 0xdf, 0x90, 0xd8, 0xad, 0x71, 0x61, 0x6f, 0x54, 0x1a, 0x65, 0x08, 0x06, - 0x4b, 0x04, 0x9f, 0x48, 0x15, 0xb0, 0xad, 0x6c, 0x57, 0xba, 0x26, 0xb6, 0xe1, 0x6f, 0x06, 0x78, - 0xdb, 0x67, 0xf1, 0xd7, 0x83, 0x08, 0x71, 0xec, 0xd3, 0x28, 0x3f, 0xc6, 0x8f, 0x51, 0x86, 0x52, - 0x66, 0x7e, 0x0a, 0x96, 0x51, 0xce, 0xfb, 0x34, 0x4b, 0xf8, 0x48, 0x8b, 0x6f, 0xff, 0xfd, 0xd7, - 0xde, 0x96, 0xfe, 0xee, 0x0f, 0xa3, 0x28, 0xc3, 0x8c, 0x3d, 0xe1, 0x59, 0x42, 0xe2, 0xa0, 0x82, - 0x9a, 0x1e, 0x68, 0x0d, 0x24, 0x83, 0xf4, 0xb1, 0xb2, 0xff, 0xbe, 0x33, 0xbb, 0x4f, 0x9d, 0x7a, - 0x35, 0x6f, 0xf1, 0xb4, 0xb0, 0x17, 0x02, 0x9d, 0xf9, 0x60, 0xed, 0xa7, 0xff, 0xfe, 0xbc, 0x5b, - 0x71, 0x42, 0x1b, 0xec, 0xce, 0x14, 0x59, 0xda, 0xf8, 0xdd, 0x00, 0x37, 0x7d, 0x16, 0xfb, 0x09, - 0xe1, 0xf3, 0xbc, 0x72, 0x0f, 0x2c, 0x8a, 0xc6, 0xd7, 0x4a, 0x6f, 0x3b, 0xda, 0x9b, 0x98, 0x0c, - 0x47, 0x4f, 0x86, 0x73, 0x40, 0x13, 0xe2, 0x6d, 0x0a, 0x79, 0xe3, 0xc2, 0x5e, 0x51, 0x3c, 0x22, - 0x09, 0x06, 0x32, 0xd7, 0x74, 0xc1, 0xcd, 0x34, 0x21, 0xbc, 0xc7, 0xa9, 0xfe, 0x18, 0xdb, 0xa7, - 0x85, 0x6d, 0x8c, 0x0b, 0x7b, 0x4d, 0x61, 0x75, 0x10, 0x06, 0x2d, 0x71, 0x7a, 0x4a, 0xe1, 0x5d, - 0xb0, 0xae, 0xa5, 0x96, 0xcd, 0xb7, 0x53, 0x71, 0x48, 0xcd, 0x25, 0xf6, 0x0f, 0xe5, 0xcb, 0xcb, - 0x33, 0x72, 0xdd, 0xbe, 0xba, 0x60, 0x39, 0xcc, 0x33, 0xd2, 0x7b, 0x96, 0xd1, 0x74, 0xba, 0xcd, - 0xca, 0x10, 0x0c, 0x96, 0xc4, 0xf9, 0x4b, 0x71, 0xbc, 0x25, 0x9d, 0x09, 0xb1, 0xe5, 0x87, 0xf9, - 0xd1, 0x00, 0x9b, 0x3e, 0x8b, 0x9f, 0x60, 0x2e, 0x47, 0xc4, 0xc7, 0x1c, 0x45, 0x88, 0xa3, 0x79, - 0xcc, 0x7c, 0x0e, 0x96, 0x52, 0x9d, 0xa6, 0x0d, 0xed, 0x56, 0x86, 0xc8, 0x51, 0x69, 0x68, 0xc2, - 0xad, 0x7b, 0xa9, 0x4c, 0x82, 0xbb, 0xe0, 0x9d, 0x19, 0x12, 0x4a, 0x89, 0x3f, 0x1b, 0x60, 0x47, - 0xc4, 0xf3, 0x88, 0xbe, 0x56, 0x99, 0xef, 0x01, 0xfb, 0x0a, 0x19, 0xa5, 0xd4, 0xef, 0xc1, 0xaa, - 0x7e, 0xc1, 0x8f, 0x10, 0x4f, 0x86, 0xf8, 0x9a, 0x7b, 0x02, 0xee, 0xc8, 0x65, 0x51, 0xd5, 0x9f, - 0x08, 0xdb, 0x3f, 0x6b, 0x81, 0x1b, 0x3e, 0x8b, 0x4d, 0x0c, 0x56, 0xea, 0xab, 0xfc, 0xce, 0x95, - 0xb3, 0x7f, 0x69, 0x09, 0x5b, 0xce, 0xab, 0xe1, 0xca, 0x79, 0x11, 0x65, 0x6a, 0x4b, 0xb6, 0xb1, - 0x4c, 0x85, 0x6b, 0x2e, 0x33, 0xbd, 0x1c, 0xcd, 0xef, 0x80, 0x39, 0x63, 0x31, 0xee, 0x35, 0xb0, - 0x4c, 0xc3, 0xad, 0xfb, 0x73, 0xc1, 0xcb, 0xda, 0x8f, 0xc1, 0xa2, 0xdc, 0x66, 0x76, 0x43, 0xba, - 0x00, 0x58, 0x1f, 0xbe, 0x04, 0x50, 0x67, 0x94, 0x7b, 0xa4, 0x89, 0x51, 0x00, 0x1a, 0x19, 0xeb, - 0xc3, 0x6d, 0x72, 0xb0, 0x31, 0x35, 0x31, 0x9f, 0x34, 0x24, 0xbf, 0x08, 0xb6, 0xee, 0xcd, 0x01, - 0x2e, 0xab, 0xfe, 0x60, 0x80, 0xad, 0x99, 0xc3, 0xea, 0x36, 0xb1, 0xcd, 0x48, 0xb0, 0x3e, 0x9b, - 0x33, 0xa1, 0x94, 0x10, 0x02, 0x50, 0x1b, 0xc2, 0x0f, 0x5e, 0xf2, 0xbe, 0x14, 0xcc, 0xda, 0x7b, - 0x25, 0xd8, 0xa4, 0x86, 0xf7, 0xd5, 0xe9, 0x79, 0xc7, 0x38, 0x3b, 0xef, 0x18, 0xff, 0x9e, 0x77, - 0x8c, 0x5f, 0x2e, 0x3a, 0x0b, 0x67, 0x17, 0x9d, 0x85, 0x7f, 0x2e, 0x3a, 0x0b, 0xdf, 0xdc, 0x8f, - 0x13, 0xde, 0xcf, 0x43, 0xe7, 0x90, 0xa6, 0xee, 0x23, 0x49, 0x79, 0xd0, 0x47, 0x09, 0x71, 0xf5, - 0xdf, 0xd6, 0x70, 0xdf, 0x7d, 0x7e, 0xf9, 0x97, 0x8b, 0x8f, 0x06, 0x98, 0x85, 0x2d, 0xf9, 0xc3, - 0x75, 0xef, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xca, 0x55, 0xee, 0x59, 0x0a, 0x00, 0x00, + // 888 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0x8e, 0x69, 0xba, 0x4d, 0x26, 0xe4, 0xa3, 0x4e, 0xc8, 0x6e, 0x8d, 0xb2, 0x06, 0x0b, 0x0a, + 0x04, 0xc5, 0xd6, 0xa6, 0x2a, 0x48, 0xb9, 0xa0, 0x3a, 0x88, 0x9b, 0x4b, 0xe5, 0x96, 0x0b, 0x42, + 0x5a, 0x8d, 0xd7, 0x53, 0xaf, 0x95, 0x7a, 0x66, 0xe5, 0x19, 0x6f, 0xba, 0x9c, 0x2a, 0xae, 0x48, + 0x08, 0xf1, 0x17, 0xf8, 0x03, 0x3d, 0x20, 0xc4, 0x4f, 0xc8, 0xb1, 0xe2, 0x02, 0x27, 0x0b, 0x25, + 0x87, 0xde, 0xf7, 0x17, 0xa0, 0xf9, 0x58, 0xdb, 0x9b, 0xdd, 0xb8, 0xdd, 0x4b, 0xd5, 0x9b, 0x3d, + 0xef, 0xf3, 0x3e, 0xef, 0xf3, 0x8c, 0xe7, 0x7d, 0x3d, 0xc0, 0xc4, 0x71, 0x10, 0xa7, 0x99, 0xc3, + 0xc8, 0x09, 0xc2, 0x8f, 0x61, 0x8f, 0x91, 0x74, 0xe4, 0x0c, 0x3b, 0x0e, 0x7b, 0x6a, 0x0f, 0x52, + 0xc2, 0x88, 0xbe, 0x2b, 0x01, 0x76, 0x15, 0x60, 0x0f, 0x3b, 0x46, 0xbb, 0x47, 0x68, 0x42, 0xa8, + 0x13, 0x40, 0x7c, 0xe2, 0x0c, 0x3b, 0x01, 0x62, 0xb0, 0x23, 0x5e, 0x64, 0x5e, 0x25, 0x4e, 0x51, + 0x11, 0xef, 0x91, 0x18, 0xab, 0x78, 0x53, 0xc5, 0x13, 0x1a, 0xf1, 0x7a, 0x09, 0x8d, 0x54, 0xe0, + 0x96, 0x0c, 0x74, 0xc5, 0x9b, 0x23, 0x5f, 0x54, 0x68, 0x27, 0x22, 0x11, 0x91, 0xeb, 0xfc, 0x49, + 0xad, 0x5a, 0x57, 0x58, 0xa0, 0x0c, 0x32, 0x24, 0x31, 0xd6, 0x08, 0x6c, 0x78, 0x34, 0x3a, 0x4e, + 0x11, 0x64, 0xe8, 0x6b, 0x84, 0x49, 0xa2, 0x7f, 0x06, 0x1a, 0x14, 0xe1, 0x10, 0xa5, 0x2d, 0xed, + 0x03, 0xed, 0xd3, 0x55, 0xf7, 0xe6, 0x38, 0x37, 0xd7, 0x47, 0x30, 0x79, 0x72, 0x64, 0xc9, 0x75, + 0xcb, 0x57, 0x00, 0xdd, 0x01, 0x2b, 0x34, 0x0b, 0x42, 0x9e, 0xd6, 0x7a, 0x47, 0x80, 0xb7, 0xc7, + 0xb9, 0xb9, 0xa9, 0xc0, 0x2a, 0x62, 0xf9, 0x05, 0xe8, 0x68, 0xed, 0xa7, 0x97, 0xcf, 0xf7, 0x55, + 0xb6, 0xf5, 0x03, 0xd8, 0x9d, 0x2e, 0xed, 0x23, 0x3a, 0x20, 0x98, 0x22, 0xdd, 0x05, 0x9b, 0x18, + 0x9d, 0x76, 0x85, 0xee, 0xae, 0xa4, 0x97, 0x5a, 0x8c, 0x71, 0x6e, 0xee, 0x4a, 0xfa, 0x4b, 0x00, + 0xcb, 0x5f, 0xc7, 0xe8, 0xf4, 0x11, 0x5f, 0x10, 0x5c, 0xd6, 0xef, 0x9a, 0x74, 0xd6, 0x87, 0x38, + 0x42, 0xf7, 0xc2, 0x24, 0xc6, 0x8b, 0x38, 0xbb, 0x0d, 0xae, 0x57, 0x6d, 0x6d, 0x8d, 0x73, 0xf3, + 0x5d, 0x89, 0x54, 0xd5, 0x64, 0x58, 0xef, 0x80, 0x55, 0x2e, 0x04, 0x72, 0xfe, 0xd6, 0x35, 0x81, + 0xdd, 0x19, 0xe7, 0xe6, 0x56, 0xa9, 0x51, 0x84, 0x2c, 0x7f, 0x05, 0xa3, 0x53, 0xa1, 0x62, 0x7a, + 0x0f, 0x5a, 0x72, 0x0f, 0x4a, 0x91, 0x93, 0x3d, 0xe0, 0xfa, 0xdf, 0xf3, 0x68, 0xf4, 0xdd, 0x20, + 0x84, 0x0c, 0x79, 0x24, 0xcc, 0x9e, 0xa0, 0x07, 0x30, 0x85, 0x09, 0xd5, 0xbf, 0x00, 0xab, 0x30, + 0x63, 0x7d, 0x92, 0xc6, 0x6c, 0xa4, 0x9c, 0xb4, 0xfe, 0xfe, 0xe3, 0x60, 0x47, 0x9d, 0x88, 0x7b, + 0x61, 0x98, 0x22, 0x4a, 0x1f, 0xb2, 0x34, 0xc6, 0x91, 0x5f, 0x42, 0x75, 0x17, 0x34, 0x06, 0x82, + 0x41, 0x98, 0x5a, 0x3b, 0xfc, 0xc8, 0x9e, 0x7f, 0x82, 0xed, 0x6a, 0x35, 0x77, 0xf9, 0x2c, 0x37, + 0x97, 0x7c, 0x95, 0x79, 0xb4, 0xc1, 0xc5, 0x97, 0x9c, 0x96, 0x09, 0xf6, 0xe6, 0x8a, 0x2c, 0x6c, + 0xfc, 0xa9, 0x81, 0x1b, 0x1e, 0x8d, 0xbc, 0x18, 0xb3, 0x45, 0xf6, 0xdf, 0x05, 0xcb, 0xbc, 0x25, + 0x94, 0xd2, 0x5b, 0xb6, 0xf2, 0xc6, 0x7b, 0xc6, 0x56, 0x3d, 0x63, 0x1f, 0x93, 0x18, 0xbb, 0xdb, + 0x5c, 0xde, 0x38, 0x37, 0xd7, 0x24, 0x0f, 0x4f, 0xb2, 0x7c, 0x91, 0xab, 0x3b, 0xe0, 0x46, 0x12, + 0x63, 0xd6, 0x65, 0x44, 0x7d, 0x99, 0xdd, 0xb3, 0xdc, 0xd4, 0xc6, 0xb9, 0xb9, 0x21, 0xb1, 0x2a, + 0x68, 0xf9, 0x0d, 0xfe, 0xf4, 0x88, 0x4c, 0x7f, 0x99, 0x7d, 0xb0, 0xa9, 0x74, 0x17, 0xc7, 0xb2, + 0x59, 0x12, 0x0a, 0x03, 0x93, 0x44, 0xeb, 0x2f, 0x69, 0xd2, 0xcd, 0x52, 0xfc, 0xa6, 0x4d, 0x76, + 0xc0, 0x6a, 0x90, 0xa5, 0xb8, 0xfb, 0x38, 0x25, 0xc9, 0xec, 0x01, 0x2c, 0x42, 0x96, 0xbf, 0xc2, + 0x9f, 0xbf, 0x49, 0x2f, 0x37, 0xe1, 0x4d, 0x61, 0x93, 0x2b, 0x2f, 0x3e, 0xd9, 0x2f, 0x1a, 0xd8, + 0xf6, 0x68, 0xf4, 0x10, 0x31, 0xd1, 0x49, 0x1e, 0x62, 0x30, 0x84, 0x0c, 0x2e, 0xe2, 0xec, 0x2b, + 0xb0, 0x92, 0xa8, 0x34, 0xe5, 0x6e, 0xaf, 0x74, 0x87, 0x4f, 0x0a, 0x77, 0x13, 0x6e, 0x75, 0xca, + 0x8a, 0xa4, 0x69, 0x8d, 0x7b, 0xe0, 0xfd, 0x39, 0x7a, 0x0a, 0xbd, 0xbf, 0x69, 0xa0, 0xc9, 0xe3, + 0x59, 0x48, 0xde, 0x1e, 0xcd, 0x1f, 0x02, 0xf3, 0x0a, 0x4d, 0x85, 0xee, 0x9f, 0x35, 0xb0, 0xae, + 0xf6, 0xfe, 0x3e, 0x64, 0xf1, 0x10, 0xbd, 0xe1, 0xb3, 0x33, 0x2d, 0xb8, 0x29, 0xc6, 0x4d, 0x29, + 0x66, 0x22, 0xf3, 0xf0, 0x9f, 0x06, 0xb8, 0xe6, 0xd1, 0x48, 0x47, 0x60, 0xad, 0xfa, 0x9b, 0xb8, + 0x7d, 0xe5, 0xf4, 0x98, 0x9a, 0xe9, 0x86, 0xfd, 0x7a, 0xb8, 0xa2, 0xc9, 0x78, 0x99, 0xca, 0xcc, + 0xae, 0x2d, 0x53, 0xe2, 0xea, 0xcb, 0xcc, 0x8e, 0x57, 0xfd, 0x47, 0xa0, 0xcf, 0x19, 0xad, 0x07, + 0x35, 0x2c, 0xb3, 0x70, 0xe3, 0xee, 0x42, 0xf0, 0xa2, 0xf6, 0x03, 0xb0, 0x2c, 0xe6, 0xa1, 0x59, + 0x93, 0xce, 0x01, 0xc6, 0x27, 0xaf, 0x00, 0x54, 0x19, 0xc5, 0xf0, 0xa9, 0x63, 0xe4, 0x80, 0x5a, + 0xc6, 0xea, 0x10, 0xd0, 0x19, 0xd8, 0x9a, 0x69, 0xa6, 0xcf, 0x6b, 0x92, 0x2f, 0x83, 0x8d, 0x3b, + 0x0b, 0x80, 0x8b, 0xaa, 0xcf, 0x34, 0xb0, 0x33, 0xb7, 0x8f, 0x9d, 0x3a, 0xb6, 0x39, 0x09, 0xc6, + 0x97, 0x0b, 0x26, 0x14, 0x12, 0x02, 0x00, 0x2a, 0x1d, 0xf9, 0xf1, 0x2b, 0xf6, 0x4b, 0xc2, 0x8c, + 0x83, 0xd7, 0x82, 0x4d, 0x6a, 0x18, 0xd7, 0x9f, 0xbd, 0x7c, 0xbe, 0xaf, 0xb9, 0xdf, 0x9e, 0x9d, + 0xb7, 0xb5, 0x17, 0xe7, 0x6d, 0xed, 0xbf, 0xf3, 0xb6, 0xf6, 0xeb, 0x45, 0x7b, 0xe9, 0xc5, 0x45, + 0x7b, 0xe9, 0xdf, 0x8b, 0xf6, 0xd2, 0xf7, 0x77, 0xa3, 0x98, 0xf5, 0xb3, 0xc0, 0xee, 0x91, 0xc4, + 0xb9, 0x2f, 0x98, 0x8f, 0xfb, 0x30, 0xc6, 0x8e, 0xba, 0xd0, 0x0d, 0x0f, 0x9d, 0xa7, 0xd3, 0xb7, + 0x3a, 0x36, 0x1a, 0x20, 0x1a, 0x34, 0xc4, 0x9d, 0xee, 0xce, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x16, 0x44, 0x5c, 0x69, 0xbc, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From d504df10527b1d9ffb1671d5550ff364f7c476f6 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 29 Apr 2025 17:22:16 +0700 Subject: [PATCH 16/72] fix interface for evm --- x/evm/evmmodule/module.go | 6 ++++++ x/evm/keeper/grpc_query.go | 6 +++--- x/evm/keeper/msg_server.go | 6 +++--- x/evm/keeper/vm_config.go | 4 ++-- x/inflation/types/interfaces.go | 4 ++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/x/evm/evmmodule/module.go b/x/evm/evmmodule/module.go index 8ec589df81..8d4192e781 100644 --- a/x/evm/evmmodule/module.go +++ b/x/evm/evmmodule/module.go @@ -18,6 +18,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" store "cosmossdk.io/store/types" + "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -205,6 +206,7 @@ func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.Weig func init() { appmodule.Register(&modulev1.Module{}, appmodule.Provide(ProvideModule), + appmodule.Provide(ProvideEthereumTxGetSigners), ) appmodule.Register(&bankmodulev1.Module{}, appmodule.Provide(ProvideNibiruBankModule), @@ -307,3 +309,7 @@ func ProvideModule(in EvmInputs) EvmOutputs { Module: m, } } + +func ProvideEthereumTxGetSigners() signing.CustomGetSigner { + return evm.MsgEthereumTxCustomGetSigner +} diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 98a0db2927..2576f19362 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -102,9 +102,9 @@ func (k Keeper) ValidatorAccount( ctx := sdk.UnwrapSDKContext(goCtx) - validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, consAddr) - if !found { - return nil, fmt.Errorf("validator not found for %s", consAddr.String()) + validator, err := k.stakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + if err != nil { + return nil, fmt.Errorf("validator not found for %s: 5s", consAddr.String(), err) } nibiruAddr := sdk.AccAddress(validator.GetOperator()) diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 1164f4a008..e1b1e3f4b5 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -190,9 +190,9 @@ func (k Keeper) GetHashFn(ctx sdk.Context) vm.GetHashFunc { // the hash from the store for the current chain epoch. This only // applies if the current height is greater than the requested // height. - histInfo, found := k.stakingKeeper.GetHistoricalInfo(ctx, h) - if !found { - k.Logger(ctx).Debug("historical info not found", "height", h) + histInfo, err := k.stakingKeeper.GetHistoricalInfo(ctx, h) + if err != nil { + k.Logger(ctx).Debug("historical info not found", "height", h, "error", err) return gethcommon.Hash{} } diff --git a/x/evm/keeper/vm_config.go b/x/evm/keeper/vm_config.go index baa5573c56..d84d6e0d79 100644 --- a/x/evm/keeper/vm_config.go +++ b/x/evm/keeper/vm_config.go @@ -53,8 +53,8 @@ func (k Keeper) VMConfig( // [COINBASE op code]: https://ethereum.org/en/developers/docs/evm/opcodes/ func (k Keeper) GetCoinbaseAddress(ctx sdk.Context) common.Address { proposerAddress := sdk.ConsAddress(ctx.BlockHeader().ProposerAddress) - validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, proposerAddress) - if !found { + validator, err := k.stakingKeeper.GetValidatorByConsAddr(ctx, proposerAddress) + if err != nil { // should never happen, but just in case, return an empty address // we don't really care about the coinbase adresss since we're PoS and not PoW return common.Address{} diff --git a/x/inflation/types/interfaces.go b/x/inflation/types/interfaces.go index d36eb5ce48..0516554fb1 100644 --- a/x/inflation/types/interfaces.go +++ b/x/inflation/types/interfaces.go @@ -45,6 +45,6 @@ type StakingKeeper interface { } type SudoKeeper interface { - GetRootAddr(ctx context.Context) (sdk.AccAddress, error) - CheckPermissions(contract sdk.AccAddress, ctx context.Context) error + GetRootAddr(ctx sdk.Context) (sdk.AccAddress, error) + CheckPermissions(contract sdk.AccAddress, ctx sdk.Context) error } From a7e45c954090dcfbf6cfe4c907bd85d1ae8a0c9c Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 29 Apr 2025 17:22:46 +0700 Subject: [PATCH 17/72] EthereumTx getsigner func --- x/evm/deps.go | 4 ++-- x/evm/msg.go | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/x/evm/deps.go b/x/evm/deps.go index cdba32d9d3..da3fee82d0 100644 --- a/x/evm/deps.go +++ b/x/evm/deps.go @@ -37,6 +37,6 @@ type AccountKeeper interface { // StakingKeeper returns the historical headers kept in store. type StakingKeeper interface { - GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, bool) - GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) + GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, error) + GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (stakingtypes.Validator, error) } diff --git a/x/evm/msg.go b/x/evm/msg.go index 88f0f605b0..40efb5884c 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -11,6 +11,7 @@ import ( sdkmath "cosmossdk.io/math" sdkioerrors "cosmossdk.io/errors" + txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -28,6 +29,8 @@ import ( "github.com/ethereum/go-ethereum/core" gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + + evmapi "github.com/NibiruChain/nibiru/v2/api/eth/evm/v1" ) var ( @@ -40,6 +43,17 @@ var ( _ codectypes.UnpackInterfacesMessage = MsgEthereumTx{} ) +// message type and route constants +const ( + // TypeMsgEthereumTx defines the type string of an Ethereum transaction + TypeMsgEthereumTx = "ethereum_tx" +) + +var MsgEthereumTxCustomGetSigner = txsigning.CustomGetSigner{ + MsgType: protov2.MessageName(&evmapi.MsgEthereumTx{}), + Fn: EthereumTxGetSigners, +} + // NewTx returns a reference to a new Ethereum transaction message. func NewTx( tx *EvmTxArgs, @@ -211,6 +225,18 @@ func (msg *MsgEthereumTx) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{signer} } +func EthereumTxGetSigners(msg protov2.Message) ([][]byte, error) { + msgEthereumTx, ok := msg.(*evmapi.MsgEthereumTx) + if !ok { + return nil, fmt.Errorf("invalid type, expected MsgConvertERC20 and got %T", msg) + } + + // The sender on the msg is a hex address + sender := common.HexToAddress(msgEthereumTx.From) + + return [][]byte{sender.Bytes()}, nil +} + // GetSignBytes returns the Amino bytes of an Ethereum transaction message used // for signing. // From e6205b1466ed392f233b5ef9913bc54635292b47 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 29 Apr 2025 17:24:03 +0700 Subject: [PATCH 18/72] add capability keeper and query router for icaHostKeeper --- app/app.go | 45 +++++++++++++++++++++++++++++++++++++++++---- app/keepers.go | 9 +++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/app/app.go b/app/app.go index 0fad8df81d..06028bbf1d 100644 --- a/app/app.go +++ b/app/app.go @@ -8,6 +8,8 @@ import ( "os" "path/filepath" + "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -28,6 +30,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" + runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -37,6 +40,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -55,6 +59,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/ibc-go/modules/capability" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm" ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" @@ -193,7 +198,8 @@ type NibiruApp struct { // keys to access the substores // TODO(k-yang): remove once depinject is fully integrated - keys map[string]*storetypes.KVStoreKey + keys map[string]*storetypes.KVStoreKey + memKeys map[string]*storetypes.MemoryStoreKey AppKeepers // embed all module keepers @@ -263,7 +269,8 @@ func NewNibiruApp( depinject.Supply( // supply the application options appOpts, - + // supply the logger + logger, // ADVANCED CONFIGURATION // @@ -277,7 +284,7 @@ func NewNibiruApp( // For providing a custom a base account type add it below. // By default the auth module uses authtypes.ProtoBaseAccount(). // - func() authtypes.AccountI { return eth.ProtoBaseAccount() }, + func() sdk.AccountI { return eth.ProtoBaseAccount() }, // // MINT @@ -301,7 +308,6 @@ func NewNibiruApp( &app.StakingKeeper, &app.DistrKeeper, &app.crisisKeeper, - &app.capabilityKeeper, &app.slashingKeeper, &app.GovKeeper, &app.upgradeKeeper, @@ -330,16 +336,26 @@ func NewNibiruApp( icahosttypes.StoreKey, icacontrollertypes.StoreKey, ibcwasmtypes.StoreKey, + capabilitytypes.StoreKey, // nibiru x/ keys wasmtypes.StoreKey, devgastypes.StoreKey, ) + + app.memKeys = storetypes.NewMemoryStoreKeys( + capabilitytypes.MemStoreKey, + ) for _, k := range app.keys { if err := app.RegisterStores(k); err != nil { panic(err) } } + for _, k := range app.memKeys { + if err := app.RegisterStores(k); err != nil { + panic(err) + } + } wasmConfig := app.initNonDepinjectKeepers(appOpts) @@ -641,3 +657,24 @@ func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) { staticServer := http.FileServer(statikFS) rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) } + +// AutoCliOpts returns the autocli options for the app. +func (app *NibiruApp) AutoCliOpts() autocli.AppOptions { + modules := make(map[string]appmodule.AppModule, 0) + for _, m := range app.ModuleManager.Modules { + if moduleWithName, ok := m.(module.HasName); ok { + moduleName := moduleWithName.Name() + if appModule, ok := moduleWithName.(appmodule.AppModule); ok { + modules[moduleName] = appModule + } + } + } + + return autocli.AppOptions{ + Modules: modules, + ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.ModuleManager.Modules), + AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), + } +} diff --git a/app/keepers.go b/app/keepers.go index b218401282..46a6633174 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -29,6 +29,7 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" @@ -95,6 +96,12 @@ func (app *NibiruApp) initNonDepinjectKeepers( govModuleAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() initSubspace(app.paramsKeeper) + app.capabilityKeeper = capabilitykeeper.NewKeeper( + app.appCodec, + app.keys[capabilitytypes.StoreKey], + app.memKeys[capabilitytypes.MemStoreKey], + ) + app.ScopedIBCKeeper = app.capabilityKeeper.ScopeToModule(ibcexported.ModuleName) app.ScopedICAControllerKeeper = app.capabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) app.ScopedICAHostKeeper = app.capabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) @@ -196,6 +203,8 @@ func (app *NibiruApp) initNonDepinjectKeepers( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + app.icaHostKeeper.WithQueryRouter(app.GRPCQueryRouter()) + wasmDir := filepath.Join(homePath, "data") wasmConfig, err := wasm.ReadWasmConfig(appOpts) if err != nil { From c9a469eabd10e31ef3de175ef1d3262d00123ee0 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 29 Apr 2025 17:24:31 +0700 Subject: [PATCH 19/72] fix cmd and use autocli --- cmd/nibid/cmd/root.go | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index 8c642f0f81..185d095b6f 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -11,6 +11,7 @@ import ( dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" + clientcfg "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" @@ -24,6 +25,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + rosettaCmd "github.com/cosmos/rosetta/cmd" "github.com/spf13/cobra" "github.com/NibiruChain/nibiru/v2/app" @@ -98,24 +100,6 @@ func NewRootCmd() (*cobra.Command, app.EncodingConfig) { }, } - initRootCmd(rootCmd, encodingConfig) - - return rootCmd, encodingConfig -} - -/* -'initRootCmd' adds keybase, auxiliary RPC, query, and transaction (tx) child -commands, then builds the rosetta root command given a protocol buffers -serializer/deserializer. - -Args: - - rootCmd: The root command called once in the 'main.go' of 'nibid'. - encodingConfig: EncodingConfig specifies the concrete encoding types to use - for a given app. This is provided for compatibility between protobuf and - amino implementations. -*/ -func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { a := appCreator{} rootCmd.AddCommand( @@ -153,11 +137,18 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { server.NewEVMTxIndexCmd(), ) - // TODO add rosettaj // add rosetta - // rootCmd.AddCommand( - // server.RosettaCommand( - // encodingConfig.InterfaceRegistry, encodingConfig.Codec)) + rootCmd.AddCommand(rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec)) + + autoCliOpts := tempApp.AutoCliOpts() + initClientCtx, _ = clientcfg.ReadFromClientConfig(initClientCtx) + autoCliOpts.ClientCtx = initClientCtx + + if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { + panic(err) + } + + return rootCmd, encodingConfig } // Implements the servertypes.ModuleInitFlags interface @@ -218,7 +209,6 @@ func txCommand() *cobra.Command { authcmd.GetDecodeCommand(), ) - app.ModuleBasics.AddTxCommands(cmd) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd From c2ef777b2aefce637362c8d2fc1e3bff11a8ff65 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:38:47 +0700 Subject: [PATCH 20/72] use GetModuleAccount --- x/tokenfactory/keeper/genesis.go | 4 +--- x/tokenfactory/types/expected_keepers.go | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x/tokenfactory/keeper/genesis.go b/x/tokenfactory/keeper/genesis.go index 389c6b7cd5..a913dcd38e 100644 --- a/x/tokenfactory/keeper/genesis.go +++ b/x/tokenfactory/keeper/genesis.go @@ -3,7 +3,6 @@ package keeper import ( "github.com/NibiruChain/collections" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) @@ -62,6 +61,5 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { // and burns them on behalf of the admin of respective denoms, and sends to the // relevant address. func (k Keeper) CreateModuleAccount(ctx sdk.Context) { - moduleAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter, authtypes.Burner) - k.accountKeeper.SetModuleAccount(ctx, moduleAcc) + k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) } diff --git a/x/tokenfactory/types/expected_keepers.go b/x/tokenfactory/types/expected_keepers.go index 9de217b74b..e0a6196457 100644 --- a/x/tokenfactory/types/expected_keepers.go +++ b/x/tokenfactory/types/expected_keepers.go @@ -38,6 +38,7 @@ type BankKeeper interface { type AccountKeeper interface { SetModuleAccount(ctx context.Context, macc sdk.ModuleAccountI) + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI } From 581b228448ddc0470307e86c9981ac8de23106c5 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:39:14 +0700 Subject: [PATCH 21/72] implement SchemaProvider --- go.mod | 7 +++---- go.sum | 10 ++++------ x/evm/keeper/bank_extension.go | 10 +++++++++- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index c99e7305e8..5c18a2ef16 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,6 @@ require ( github.com/holiman/uint256 v1.3.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 - github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.7.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 @@ -54,6 +53,7 @@ require ( ) require ( + cosmossdk.io/client/v2 v2.0.0-beta.1 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.1 cosmossdk.io/depinject v1.1.0 @@ -86,7 +86,6 @@ require ( cloud.google.com/go/compute/metadata v0.5.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.38.0 // indirect - cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect cosmossdk.io/x/circuit v0.1.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -276,9 +275,9 @@ require ( ) replace ( - cosmossdk.io/store => github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250217040124-0d18d32081ac + cosmossdk.io/store => github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250505091411-76d7096d17ec github.com/CosmWasm/wasmd => github.com/NibiruChain/wasmd v0.51.0-nibiru - github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac + github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250505091411-76d7096d17ec github.com/ethereum/go-ethereum => github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2 diff --git a/go.sum b/go.sum index 0591eaced4..1fe26e0b74 100644 --- a/go.sum +++ b/go.sum @@ -686,10 +686,10 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NibiruChain/collections v0.50.0 h1:zjwZ17G1f/0hoKUeoljIQval0HERF8NmojfQYKEOymw= github.com/NibiruChain/collections v0.50.0/go.mod h1:u3NETehzjViSEZLmSjps0Akd8mWVfw3FXSh8lswf5PU= -github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac h1:n95nhILCcV9m5BbCxmaDPKXhD/CD298caLbCIshEIfo= -github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250217040124-0d18d32081ac/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= -github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250217040124-0d18d32081ac h1:5z+tlozAPjWiKU0iNTz9eajeZVAzB/GbAwxwRPvjkr0= -github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250217040124-0d18d32081ac/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250505091411-76d7096d17ec h1:afE874u3CwrIIJ9/l+SrJ8sPChZ61arZ5h8yezONYaU= +github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250505091411-76d7096d17ec/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= +github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250505091411-76d7096d17ec h1:rJrQBiofKeqy6NXCSwhShfFs3PqMpOt6W90tHZKQhvI= +github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250505091411-76d7096d17ec/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2 h1:ck5YAdn2Fklelh8JfLzU9VwXWXmitkbI0ixyoXcD1U8= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.2/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY= github.com/NibiruChain/wasmd v0.51.0-nibiru h1:qXaxYKiWAL67PR7Ug0vN5mD/S9qKJjg/38EHkSb3TPg= @@ -1813,8 +1813,6 @@ github.com/protolambda/messagediff v1.4.0/go.mod h1:LboJp0EwIbJsePYpzh5Op/9G1/4m github.com/protolambda/zrnt v0.32.2/go.mod h1:A0fezkp9Tt3GBLATSPIbuY4ywYESyAuc/FFmPKg8Lqs= github.com/protolambda/ztyp v0.2.2/go.mod h1:9bYgKGqg3wJqT9ac1gI2hnVb0STQq7p/1lapqrqY1dU= github.com/prysmaticlabs/gohashtree v0.0.1-alpha.0.20220714111606-acbb2962fb48/go.mod h1:4pWaT30XoEx1j8KNJf3TV+E3mQkaufn7mf+jRNb/Fuk= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= diff --git a/x/evm/keeper/bank_extension.go b/x/evm/keeper/bank_extension.go index 24f073937b..87cd1452d9 100644 --- a/x/evm/keeper/bank_extension.go +++ b/x/evm/keeper/bank_extension.go @@ -3,6 +3,7 @@ package keeper import ( "context" + "cosmossdk.io/collections" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -14,7 +15,10 @@ import ( "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) -var _ bankkeeper.Keeper = &NibiruBankKeeper{} +var ( + _ bankkeeper.Keeper = &NibiruBankKeeper{} + _ bankkeeper.SchemaProvider = &NibiruBankKeeper{} +) type NibiruBankKeeper struct { bankkeeper.BaseKeeper @@ -332,3 +336,7 @@ func (bk NibiruBankKeeper) SendCoinsFromModuleToModule( }, ) } + +func (k NibiruBankKeeper) GetSchema() collections.Schema { + return k.BaseKeeper.Schema +} From 781cde80e8384518c8ccf540ada9bfd21d025a93 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:41:10 +0700 Subject: [PATCH 22/72] fix init cmd --- cmd/nibid/cmd/init.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/nibid/cmd/init.go b/cmd/nibid/cmd/init.go index b51f26b7ef..43a0804d9e 100644 --- a/cmd/nibid/cmd/init.go +++ b/cmd/nibid/cmd/init.go @@ -20,7 +20,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/go-bip39" - ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" ibctypes "github.com/cosmos/ibc-go/v8/modules/core/types" pkgerrors "github.com/pkg/errors" @@ -133,7 +132,6 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { // add 08-wasm to AllowedClients ibcState := ibctypes.DefaultGenesisState() - ibcState.ClientGenesis.Params.AllowedClients = append(ibcState.ClientGenesis.Params.AllowedClients, ibcwasmtypes.Wasm) appGenState[ibcexported.ModuleName] = cdc.MustMarshalJSON(ibcState) appState, err := json.MarshalIndent(appGenState, "", " ") From 93fe689a871742912c048e77f04c05bff11bab6c Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:41:23 +0700 Subject: [PATCH 23/72] add Preblocker --- app/app_config.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/app_config.go b/app/app_config.go index 43cc0be009..0a04504ef3 100644 --- a/app/app_config.go +++ b/app/app_config.go @@ -184,7 +184,11 @@ func init() { { Name: "runtime", Config: appconfig.WrapAny(&runtimev1alpha1.Module{ - AppName: "Nibiru", + AppName: "Nibiru", + // NOTE: upgrade module is required to be prioritized + PreBlockers: []string{ + upgradetypes.ModuleName, + }, BeginBlockers: orderedModuleNames, EndBlockers: orderedModuleNames, OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ From d0429fede81b97b7fc1173b8bca638d65dd87c45 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:41:40 +0700 Subject: [PATCH 24/72] fix RegisterSwaggerAPI --- app/app.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/app.go b/app/app.go index 06028bbf1d..7db97b00c1 100644 --- a/app/app.go +++ b/app/app.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "io" + "io/fs" "net/http" "os" "path/filepath" @@ -25,6 +26,7 @@ import ( dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/docs" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/codec" @@ -79,7 +81,6 @@ import ( "github.com/cosmos/ibc-go/v8/testing/types" "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus" - "github.com/rakyll/statik/fs" "github.com/spf13/cast" "github.com/NibiruChain/nibiru/v2/app/ante" @@ -649,12 +650,12 @@ func (app *NibiruApp) GetTxConfig() client.TxConfig { // RegisterSwaggerAPI registers swagger route with API Server func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) { - statikFS, err := fs.New() + root, err := fs.Sub(docs.SwaggerUI, "swagger-ui") if err != nil { panic(err) } - staticServer := http.FileServer(statikFS) + staticServer := http.FileServer(http.FS(root)) rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) } From 54a49ffb37658fa28738e1fdeee0a217502ba8a1 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:42:18 +0700 Subject: [PATCH 25/72] use correct GenDocProvider --- app/server/start.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/server/start.go b/app/server/start.go index 352c3df272..fcc2c3a308 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -34,6 +34,7 @@ import ( pvm "github.com/cometbft/cometbft/privval" "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/rpc/client/local" + cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" @@ -49,6 +50,7 @@ import ( servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) // StartOptions defines options that can be customized in `StartCmd` @@ -318,7 +320,7 @@ func startInProcess(svrCtx *sdkserver.Context, clientCtx client.Context, opts St return err } - genDocProvider := node.DefaultGenesisDocProviderFunc(cfg) + genDocProvider := GenDocProvider(cfg) var ( tmNode *node.Node @@ -680,3 +682,15 @@ func startRosettaServer( g.Go(rosettaSrv.Start) return nil } + +// returns a function which returns the genesis doc from the genesis file. +func GenDocProvider(cfg *cmtcfg.Config) func() (*cmttypes.GenesisDoc, error) { + return func() (*cmttypes.GenesisDoc, error) { + appGenesis, err := genutiltypes.AppGenesisFromFile(cfg.GenesisFile()) + if err != nil { + return nil, err + } + + return appGenesis.ToGenesisDoc() + } +} From 905ab956c61e2ce00535bf11eba52eb44eaa6fac Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:42:46 +0700 Subject: [PATCH 26/72] fix localnet --- contrib/scripts/localnet.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/contrib/scripts/localnet.sh b/contrib/scripts/localnet.sh index 86c58e9a9d..0d423cafec 100755 --- a/contrib/scripts/localnet.sh +++ b/contrib/scripts/localnet.sh @@ -142,12 +142,13 @@ fi # nibid config echo_info "Updating nibid config..." -$BINARY config keyring-backend test -$BINARY config chain-id $CHAIN_ID -$BINARY config broadcast-mode sync -$BINARY config output json -$BINARY config node "http://localhost:26657" -$BINARY config # Prints config. +echo $CHAIN_ID +$BINARY config set client chain-id $CHAIN_ID +$BINARY config set client keyring-backend test +$BINARY config set client broadcast-mode sync +$BINARY config set client output json +$BINARY config set client node "http://localhost:26657" +# $BINARY config # Prints config. # Enable API Server echo_info "config/app.toml: Enabling API server" From b99f89708bdf817624176855d9f51ede1bbc6728 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:49:07 +0700 Subject: [PATCH 27/72] fix v2.4.0 upgrade --- app/upgrades/v2_4_0/constants.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/upgrades/v2_4_0/constants.go b/app/upgrades/v2_4_0/constants.go index d87d597ce2..650c5a559c 100644 --- a/app/upgrades/v2_4_0/constants.go +++ b/app/upgrades/v2_4_0/constants.go @@ -1,11 +1,12 @@ package v2_4_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) @@ -15,7 +16,7 @@ const UpgradeName = "v2.4.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, From 6513da499350e916278deb0f763dde557c7e9e7b Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 5 May 2025 16:49:21 +0700 Subject: [PATCH 28/72] use servercmtlog --- eth/rpc/rpcapi/apis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/rpc/rpcapi/apis.go b/eth/rpc/rpcapi/apis.go index d312197b94..3bc9f3f32f 100644 --- a/eth/rpc/rpcapi/apis.go +++ b/eth/rpc/rpcapi/apis.go @@ -58,7 +58,7 @@ func init() { { Namespace: NamespaceEth, Version: apiVersion, - Service: NewImplEthAPI(ctx.Logger, evmBackend), + Service: NewImplEthAPI(servercmtlog.CometLoggerWrapper{Logger: ctx.Logger}, evmBackend), Public: true, }, { From 14926a4e9e8571d870fc4e89477bf2815889df58 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 6 May 2025 14:20:23 +0700 Subject: [PATCH 29/72] fix: add Capability module --- app/app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/app.go b/app/app.go index 7db97b00c1..01909eb07a 100644 --- a/app/app.go +++ b/app/app.go @@ -371,6 +371,7 @@ func NewNibiruApp( ibcfee.NewAppModule(app.ibcFeeKeeper), ica.NewAppModule(&app.icaControllerKeeper, &app.icaHostKeeper), ibcwasm.NewAppModule(app.WasmClientKeeper), + capability.NewAppModule(app.appCodec, *app.capabilityKeeper, false), // wasm wasm.NewAppModule(app.appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.getSubspace(wasmtypes.ModuleName)), From f81cdb92ea69d3d3aeb2b08615fdbb359e0454e1 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 6 May 2025 14:27:42 +0700 Subject: [PATCH 30/72] add appCodec for wasm MsgHandlerArgs --- app/keepers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/keepers.go b/app/keepers.go index 46a6633174..088ba32929 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -227,6 +227,7 @@ func (app *NibiruApp) initNonDepinjectKeepers( } wmha := wasmext.MsgHandlerArgs{ + Cdc: app.appCodec, Router: app.MsgServiceRouter(), Ics4Wrapper: app.ibcFeeKeeper, ChannelKeeper: app.ibcKeeper.ChannelKeeper, From 95df03fa19f743b946ef0c222077c1381d26c8d2 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 6 May 2025 14:29:05 +0700 Subject: [PATCH 31/72] implement sdk.AccountI for EthAccount --- app/genesis.go | 4 +++- eth/codec.go | 3 ++- eth/eth_account.go | 6 +++--- eth/rpc/rpcapi/utils.go | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/genesis.go b/app/genesis.go index fd8c622351..f8ad00318b 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -11,6 +11,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + sdk "github.com/cosmos/cosmos-sdk/types" ) // AppStateFromGenesisFileFn util function to generate the genesis AppState @@ -51,7 +53,7 @@ func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile str privKey := secp256k1.GenPrivKeyFromSecret(privkeySeed) - a, ok := acc.GetCachedValue().(authtypes.AccountI) + a, ok := acc.GetCachedValue().(sdk.AccountI) if !ok { panic("expected account") } diff --git a/eth/codec.go b/eth/codec.go index e8d006a932..e785c82a16 100644 --- a/eth/codec.go +++ b/eth/codec.go @@ -4,6 +4,7 @@ package eth import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/v2/app/appconst" ) @@ -30,7 +31,7 @@ const ( func RegisterInterfaces(registry codectypes.InterfaceRegistry) { // proto name: "cosmos.auth.v1beta1.AccountI" registry.RegisterImplementations( - (*authtypes.AccountI)(nil), + (*sdk.AccountI)(nil), &EthAccount{}, // Also impl by: [ // &authtypes.BaseAccount{}, diff --git a/eth/eth_account.go b/eth/eth_account.go index 85a857b5ae..79f43e9250 100644 --- a/eth/eth_account.go +++ b/eth/eth_account.go @@ -21,7 +21,7 @@ func NibiruAddrToEthAddr(nibiruAddr sdk.AccAddress) gethcommon.Address { } var ( - _ authtypes.AccountI = (*EthAccount)(nil) + _ sdk.AccountI = (*EthAccount)(nil) _ EthAccountI = (*EthAccount)(nil) _ authtypes.GenesisAccount = (*EthAccount)(nil) _ codectypes.UnpackInterfacesMessage = (*EthAccount)(nil) @@ -39,7 +39,7 @@ const ( // EthAccountI represents the interface of an EVM compatible account type EthAccountI interface { //revive:disable-line:exported - authtypes.AccountI + sdk.AccountI // EthAddress returns the ethereum Address representation of the AccAddress EthAddress() gethcommon.Address // CodeHash is the keccak256 hash of the contract code (if any) @@ -85,7 +85,7 @@ var emptyCodeHash = crypto.Keccak256(nil) // drop-in replacement for the `auth.ProtoBaseAccount` from // "cosmos-sdk/auth/types" extended to fit the the `EthAccountI` interface for // Ethereum accounts. -func ProtoBaseAccount() authtypes.AccountI { +func ProtoBaseAccount() sdk.AccountI { return &EthAccount{ BaseAccount: &authtypes.BaseAccount{}, CodeHash: gethcommon.BytesToHash(emptyCodeHash).String(), diff --git a/eth/rpc/rpcapi/utils.go b/eth/rpc/rpcapi/utils.go index 90022f5548..b7eac015fc 100644 --- a/eth/rpc/rpcapi/utils.go +++ b/eth/rpc/rpcapi/utils.go @@ -60,7 +60,7 @@ func (b *Backend) getAccountNonce(accAddr common.Address, pending bool, height i } return 0, err } - var acc authtypes.AccountI + var acc sdk.AccountI if err := b.clientCtx.InterfaceRegistry.UnpackAny(res.Account, &acc); err != nil { return 0, err } From 127092026990855bb6210c19b70bc51021deb130 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 6 May 2025 14:30:26 +0700 Subject: [PATCH 32/72] GenDocProvider for testnetwork --- x/common/testutil/testnetwork/start_node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/common/testutil/testnetwork/start_node.go b/x/common/testutil/testnetwork/start_node.go index 6b56e9574c..8998fd8e02 100644 --- a/x/common/testutil/testnetwork/start_node.go +++ b/x/common/testutil/testnetwork/start_node.go @@ -43,7 +43,7 @@ func startNodeAndServers(cfg Config, val *Validator) error { app := cfg.AppConstructor(*val) cmtApp := sdkserver.NewCometABCIWrapper(app) - genDocProvider := node.DefaultGenesisDocProviderFunc(tmCfg) + genDocProvider := server.GenDocProvider(tmCfg) tmNode, err := node.NewNode( tmCfg, pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile()), @@ -151,7 +151,7 @@ func startNodeAndServers(cfg Config, val *Validator) error { ) val.Logger.Log("Expose typed methods for each namespace") - val.EthRPC_ETH = rpcapi.NewImplEthAPI(val.Ctx.Logger, val.EthRpcBackend) + val.EthRPC_ETH = rpcapi.NewImplEthAPI(servercmtlog.CometLoggerWrapper{Logger: val.Ctx.Logger}, val.EthRpcBackend) val.Ctx.Logger = logger // set back to normal setting } From 4f0f022e7477ac103d1c09397e9b7121957291f7 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 6 May 2025 14:31:24 +0700 Subject: [PATCH 33/72] use testing tempdir --- app/ante/auth_guard_test.go | 2 +- app/ante/gas_wanted_test.go | 2 +- app/ante/reject_ethereum_tx_msgs_test.go | 2 +- app/evmante/evmante_can_transfer_test.go | 2 +- app/evmante/evmante_emit_event_test.go | 2 +- app/evmante/evmante_gas_consume_test.go | 2 +- app/evmante/evmante_handler_test.go | 2 +- .../evmante_increment_sender_seq_test.go | 2 +- app/evmante/evmante_mempool_fees_test.go | 2 +- app/evmante/evmante_setup_ctx_test.go | 2 +- app/evmante/evmante_sigverify_test.go | 2 +- app/evmante/evmante_validate_basic_test.go | 2 +- app/evmante/evmante_verify_eth_acc_test.go | 2 +- app/wasmext/wasmext_test.go | 2 +- eth/gas_limit_test.go | 2 +- eth/rpc/rpcapi/event_subscriber_test.go | 2 +- x/common/testutil/action/testcase.go | 2 +- x/common/testutil/events_test.go | 2 +- x/common/testutil/testapp/testapp.go | 19 +++++++++----- x/devgas/v1/ante/ante_test.go | 8 +++--- x/devgas/v1/genesis_test.go | 2 +- x/devgas/v1/keeper/keeper_test.go | 2 +- x/epochs/abci_test.go | 6 ++--- x/epochs/genesis_test.go | 4 +-- x/epochs/keeper/grpc_query_test.go | 4 +-- x/epochs/keeper/hooks_test.go | 4 +-- x/epochs/keeper/keeper_test.go | 6 ++--- x/evm/evm_test.go | 2 +- x/evm/evmmodule/genesis_test.go | 4 +-- x/evm/evmtest/smart_contract_test.go | 4 +-- x/evm/evmtest/test_deps.go | 4 +-- x/evm/evmtest/tx_test.go | 2 +- x/evm/keeper/bank_extension_test.go | 8 +++--- x/evm/keeper/erc20_test.go | 2 +- x/evm/keeper/funtoken_from_coin_test.go | 12 ++++----- x/evm/keeper/funtoken_from_erc20_test.go | 14 +++++----- x/evm/keeper/funtoken_state_test.go | 6 ++--- x/evm/keeper/gas_fees_test.go | 2 +- x/evm/keeper/grpc_query_test.go | 26 +++++++++---------- x/evm/keeper/msg_ethereum_tx_test.go | 10 +++---- x/evm/keeper/random_test.go | 2 +- x/evm/keeper/statedb_test.go | 4 +-- x/evm/precompile/funtoken_test.go | 12 ++++----- x/evm/precompile/nibiru_evm_utils_test.go | 2 +- x/evm/precompile/oracle_test.go | 2 +- x/evm/precompile/wasm_test.go | 25 ++++++++++-------- x/evm/statedb/journal_test.go | 8 +++--- x/evm/statedb/statedb_test.go | 26 +++++++++---------- x/genmsg/integration_test.go | 2 +- x/inflation/keeper/grpc_query_test.go | 2 +- x/inflation/keeper/hooks_test.go | 6 ++--- x/inflation/keeper/inflation_test.go | 6 ++--- x/inflation/keeper/keeper_test.go | 2 +- x/inflation/keeper/msg_server_test.go | 4 +-- x/inflation/keeper/sudo_test.go | 4 +-- x/oracle/keeper/edit_params_test.go | 2 +- x/sudo/keeper/keeper_test.go | 2 +- x/sudo/keeper/msg_server_test.go | 14 +++++----- x/tokenfactory/keeper/keeper_test.go | 2 +- x/tokenfactory/module_test.go | 2 +- 60 files changed, 162 insertions(+), 154 deletions(-) diff --git a/app/ante/auth_guard_test.go b/app/ante/auth_guard_test.go index f724683715..e0008f627b 100644 --- a/app/ante/auth_guard_test.go +++ b/app/ante/auth_guard_test.go @@ -114,7 +114,7 @@ func (s *AnteTestSuite) TestAnteDecoratorAuthzGuard() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) anteDec := ante.AnteDecoratorAuthzGuard{} txBuilder, err := sdkclienttx.Factory{}. diff --git a/app/ante/gas_wanted_test.go b/app/ante/gas_wanted_test.go index e377ee643b..7ab3c8d6db 100644 --- a/app/ante/gas_wanted_test.go +++ b/app/ante/gas_wanted_test.go @@ -82,7 +82,7 @@ func (s *AnteTestSuite) TestGasWantedDecorator() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := ante.AnteDecoratorGasWanted{} diff --git a/app/ante/reject_ethereum_tx_msgs_test.go b/app/ante/reject_ethereum_tx_msgs_test.go index e51ab129b6..07e293e067 100644 --- a/app/ante/reject_ethereum_tx_msgs_test.go +++ b/app/ante/reject_ethereum_tx_msgs_test.go @@ -29,7 +29,7 @@ func (s *AnteTestSuite) TestAnteDecoratorPreventEtheruemTxMsgs() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) anteDec := ante.AnteDecoratorPreventEtheruemTxMsgs{} tx := tc.txSetup(&deps) diff --git a/app/evmante/evmante_can_transfer_test.go b/app/evmante/evmante_can_transfer_test.go index 1108a07b7b..f9ec3c8221 100644 --- a/app/evmante/evmante_can_transfer_test.go +++ b/app/evmante/evmante_can_transfer_test.go @@ -86,7 +86,7 @@ func (s *TestSuite) TestCanTransferDecorator() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.CanTransferDecorator{deps.App.AppKeepers.EvmKeeper} tx := tc.txSetup(&deps) diff --git a/app/evmante/evmante_emit_event_test.go b/app/evmante/evmante_emit_event_test.go index 20ff36f5d8..079d6a6efd 100644 --- a/app/evmante/evmante_emit_event_test.go +++ b/app/evmante/evmante_emit_event_test.go @@ -40,7 +40,7 @@ func (s *TestSuite) TestEthEmitEventDecorator() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.NewEthEmitEventDecorator(deps.App.AppKeepers.EvmKeeper) diff --git a/app/evmante/evmante_gas_consume_test.go b/app/evmante/evmante_gas_consume_test.go index 181463667f..6cdc2076d0 100644 --- a/app/evmante/evmante_gas_consume_test.go +++ b/app/evmante/evmante_gas_consume_test.go @@ -58,7 +58,7 @@ func (s *TestSuite) TestAnteDecEthGasConsume() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.NewAnteDecEthGasConsume( deps.App.AppKeepers.EvmKeeper, tc.maxGasWanted, diff --git a/app/evmante/evmante_handler_test.go b/app/evmante/evmante_handler_test.go index af1427efd0..2ff288aca5 100644 --- a/app/evmante/evmante_handler_test.go +++ b/app/evmante/evmante_handler_test.go @@ -68,7 +68,7 @@ func (s *TestSuite) TestAnteHandlerEVM() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteHandlerEVM := evmante.NewAnteHandlerEVM( diff --git a/app/evmante/evmante_increment_sender_seq_test.go b/app/evmante/evmante_increment_sender_seq_test.go index 9d0e48cafa..2a0dee27bb 100644 --- a/app/evmante/evmante_increment_sender_seq_test.go +++ b/app/evmante/evmante_increment_sender_seq_test.go @@ -65,7 +65,7 @@ func (s *TestSuite) TestAnteDecEthIncrementSenderSequence() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.NewAnteDecEthIncrementSenderSequence(deps.App.EvmKeeper, deps.App.AccountKeeper) diff --git a/app/evmante/evmante_mempool_fees_test.go b/app/evmante/evmante_mempool_fees_test.go index 892bd9e570..183c81680d 100644 --- a/app/evmante/evmante_mempool_fees_test.go +++ b/app/evmante/evmante_mempool_fees_test.go @@ -81,7 +81,7 @@ func (s *TestSuite) TestMempoolGasFeeDecorator() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) anteDec := evmante.NewMempoolGasPriceDecorator(deps.App.AppKeepers.EvmKeeper) tx := tc.txSetup(&deps) diff --git a/app/evmante/evmante_setup_ctx_test.go b/app/evmante/evmante_setup_ctx_test.go index 214c23a602..2d51b74fae 100644 --- a/app/evmante/evmante_setup_ctx_test.go +++ b/app/evmante/evmante_setup_ctx_test.go @@ -10,7 +10,7 @@ import ( ) func (s *TestSuite) TestEthSetupContextDecorator() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.NewEthSetUpContextDecorator(deps.App.EvmKeeper) diff --git a/app/evmante/evmante_sigverify_test.go b/app/evmante/evmante_sigverify_test.go index aaba7b9c9d..ad1940b23a 100644 --- a/app/evmante/evmante_sigverify_test.go +++ b/app/evmante/evmante_sigverify_test.go @@ -65,7 +65,7 @@ func (s *TestSuite) TestEthSigVerificationDecorator() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.NewEthSigVerificationDecorator(deps.App.AppKeepers.EvmKeeper) diff --git a/app/evmante/evmante_validate_basic_test.go b/app/evmante/evmante_validate_basic_test.go index 95e20888d9..ca20986fe5 100644 --- a/app/evmante/evmante_validate_basic_test.go +++ b/app/evmante/evmante_validate_basic_test.go @@ -201,7 +201,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.NewEthValidateBasicDecorator(deps.App.AppKeepers.EvmKeeper) diff --git a/app/evmante/evmante_verify_eth_acc_test.go b/app/evmante/evmante_verify_eth_acc_test.go index a80b88c06b..414805b604 100644 --- a/app/evmante/evmante_verify_eth_acc_test.go +++ b/app/evmante/evmante_verify_eth_acc_test.go @@ -63,7 +63,7 @@ func (s *TestSuite) TestAnteDecoratorVerifyEthAcc_CheckTx() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) stateDB := deps.NewStateDB() anteDec := evmante.NewAnteDecVerifyEthAcc(deps.App.AppKeepers.EvmKeeper, &deps.App.AppKeepers.AccountKeeper) diff --git a/app/wasmext/wasmext_test.go b/app/wasmext/wasmext_test.go index e273223177..569bace51e 100644 --- a/app/wasmext/wasmext_test.go +++ b/app/wasmext/wasmext_test.go @@ -27,7 +27,7 @@ func TestWasmExtSuite(t *testing.T) { // WasmVM to EVM call pattern is not yet supported. This test verifies the // Nibiru's [wasmkeeper.Option] function as expected. func (s *Suite) TestEvmFilter() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) // wk := wasmkeeper.NewDefaultPermissionKeeper(deps.App.WasmKeeper) wasmMsgHandler := wasmext.WasmMessageHandler(deps.App.WasmMsgHandlerArgs) diff --git a/eth/gas_limit_test.go b/eth/gas_limit_test.go index a250537fca..912b480c19 100644 --- a/eth/gas_limit_test.go +++ b/eth/gas_limit_test.go @@ -87,7 +87,7 @@ func (s *Suite) TestGasMeter() { } func (s *Suite) TestBlockGasLimit() { - newCtx := func() sdk.Context { return evmtest.NewTestDeps().Ctx } + newCtx := func() sdk.Context { return evmtest.NewTestDeps(s.T().TempDir()).Ctx } tests := []struct { name string setupContext func() sdk.Context diff --git a/eth/rpc/rpcapi/event_subscriber_test.go b/eth/rpc/rpcapi/event_subscriber_test.go index ff8cf29ad8..74669dde1b 100644 --- a/eth/rpc/rpcapi/event_subscriber_test.go +++ b/eth/rpc/rpcapi/event_subscriber_test.go @@ -79,7 +79,7 @@ func (s *Suite) TestParseBloomFromEvents() { { name: "happy: events with bloom included", endBlockEvents: func() (gethcore.Bloom, []abci.Event) { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) // populate valid bloom bloom := gethcore.Bloom{} diff --git a/x/common/testutil/action/testcase.go b/x/common/testutil/action/testcase.go index 4c5c858555..e9601865ef 100644 --- a/x/common/testutil/action/testcase.go +++ b/x/common/testutil/action/testcase.go @@ -69,7 +69,7 @@ func (tc TestCase) Then(action ...Action) TestCase { func (tc TestCase) Run(t *testing.T) { t.Run(tc.Name, func(t *testing.T) { - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) var err error var isNotMandatory bool diff --git a/x/common/testutil/events_test.go b/x/common/testutil/events_test.go index 85f612c850..9d7403aeeb 100644 --- a/x/common/testutil/events_test.go +++ b/x/common/testutil/events_test.go @@ -9,7 +9,7 @@ import ( ) func (s *TestSuite) TestEventsUtils() { - bapp, ctx := testapp.NewNibiruTestAppAndContext() + bapp, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) // Events on the ctx before we broadcast any txs var beforeEvents sdk.Events = ctx.EventManager().Events() diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index 24c97c9827..3370c8f7f9 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -11,12 +11,14 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil/mock" "github.com/cosmos/cosmos-sdk/testutil/sims" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -39,8 +41,8 @@ import ( // NewNibiruTestAppAndContext creates an 'app.NibiruApp' instance with an // in-memory 'tmdb.MemDB' and fresh 'sdk.Context'. -func NewNibiruTestAppAndContext() (*app.NibiruApp, sdk.Context) { - app, _ := NewNibiruTestApp(app.GenesisState{}) +func NewNibiruTestAppAndContext(homeDir string) (*app.NibiruApp, sdk.Context) { + app, _ := NewNibiruTestApp(homeDir, app.GenesisState{}) ctx := NewContext(app) // Set defaults for certain modules. @@ -93,15 +95,17 @@ func SetDefaultSudoGenesis(gen app.GenesisState) { // NewNibiruTestApp initializes a chain with the given genesis state to // creates an application instance ('app.NibiruApp'). This app uses an // in-memory database ('tmdb.MemDB') and has logging disabled. -func NewNibiruTestApp(customGenesisOverride app.GenesisState) ( +func NewNibiruTestApp(homedir string, customGenesisOverride app.GenesisState) ( nibiruApp *app.NibiruApp, gen app.GenesisState, ) { + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = homedir // ensure unique folder app := app.NewNibiruApp( log.NewNopLogger(), dbm.NewMemDB(), /*traceStore=*/ nil, /*loadLatest=*/ true, - /*appOpts=*/ sims.EmptyAppOptions{}, + /*appOpts=*/ appOptions, ) // configure genesis from default @@ -229,14 +233,15 @@ func GenesisStateWithSingleValidator(codec codec.Codec, genesisState nibiruapp.G func genesisStateWithValSet( cdc codec.Codec, genesisState nibiruapp.GenesisState, - valSet *cmttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, + valSet *cmttypes.ValidatorSet, + genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) (nibiruapp.GenesisState, error) { validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) for _, val := range valSet.Validators { - pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) + pk, err := cryptocodec.FromCmtPubKeyInterface(val.PubKey) if err != nil { return nil, err } @@ -258,7 +263,7 @@ func genesisStateWithValSet( MinSelfDelegation: sdkmath.ZeroInt(), } validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].String(), val.Address.String(), sdkmath.LegacyOneDec())) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress().String(), sdk.ValAddress(val.Address).String(), sdkmath.LegacyOneDec())) } // set validators and delegations genesisState[stakingtypes.ModuleName] = cdc.MustMarshalJSON( diff --git a/x/devgas/v1/ante/ante_test.go b/x/devgas/v1/ante/ante_test.go index 5d505fed57..0c32ae369d 100644 --- a/x/devgas/v1/ante/ante_test.go +++ b/x/devgas/v1/ante/ante_test.go @@ -170,7 +170,7 @@ func (suite *AnteTestSuite) TestDevGasPayout() { wantWithdrawerRoyalties: txGasCoins.QuoInt(sdkmath.NewInt(2)), wantErr: false, setup: func() (*app.NibiruApp, sdk.Context) { - bapp, ctx := testapp.NewNibiruTestAppAndContext() + bapp, ctx := testapp.NewNibiruTestAppAndContext(suite.T().TempDir()) err := testapp.FundModuleAccount( bapp.BankKeeper, ctx, authtypes.FeeCollectorName, txGasCoins) suite.NoError(err) @@ -191,7 +191,7 @@ func (suite *AnteTestSuite) TestDevGasPayout() { wantWithdrawerRoyalties: txGasCoins.QuoInt(sdkmath.NewInt(4)), wantErr: false, setup: func() (*app.NibiruApp, sdk.Context) { - bapp, ctx := testapp.NewNibiruTestAppAndContext() + bapp, ctx := testapp.NewNibiruTestAppAndContext(suite.T().TempDir()) err := testapp.FundModuleAccount( bapp.BankKeeper, ctx, authtypes.FeeCollectorName, txGasCoins) suite.NoError(err) @@ -209,7 +209,7 @@ func (suite *AnteTestSuite) TestDevGasPayout() { wantWithdrawerRoyalties: txGasCoins.QuoInt(sdkmath.NewInt(2)), wantErr: true, setup: func() (*app.NibiruApp, sdk.Context) { - bapp, ctx := testapp.NewNibiruTestAppAndContext() + bapp, ctx := testapp.NewNibiruTestAppAndContext(suite.T().TempDir()) return bapp, ctx }, }, @@ -222,7 +222,7 @@ func (suite *AnteTestSuite) TestDevGasPayout() { wantWithdrawerRoyalties: txGasCoins.QuoInt(sdkmath.NewInt(2)), wantErr: false, setup: func() (*app.NibiruApp, sdk.Context) { - bapp, ctx := testapp.NewNibiruTestAppAndContext() + bapp, ctx := testapp.NewNibiruTestAppAndContext(suite.T().TempDir()) return bapp, ctx }, }, diff --git a/x/devgas/v1/genesis_test.go b/x/devgas/v1/genesis_test.go index 16a046f22f..99ec4ed7b3 100644 --- a/x/devgas/v1/genesis_test.go +++ b/x/devgas/v1/genesis_test.go @@ -30,7 +30,7 @@ func TestGenesisTestSuite(t *testing.T) { } func (s *GenesisTestSuite) SetupTest() { - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) s.app = app s.ctx = ctx diff --git a/x/devgas/v1/keeper/keeper_test.go b/x/devgas/v1/keeper/keeper_test.go index 9dd4382ab5..e177b439f2 100644 --- a/x/devgas/v1/keeper/keeper_test.go +++ b/x/devgas/v1/keeper/keeper_test.go @@ -36,7 +36,7 @@ type KeeperTestSuite struct { } func (s *KeeperTestSuite) SetupTest() { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) s.app = nibiruApp s.ctx = ctx diff --git a/x/epochs/abci_test.go b/x/epochs/abci_test.go index c218b9f1d2..e8a0fe4565 100644 --- a/x/epochs/abci_test.go +++ b/x/epochs/abci_test.go @@ -99,7 +99,7 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { for _, tc := range tests { tc := tc t.Run(tc.name, func(t *testing.T) { - app, ctx = testapp.NewNibiruTestAppAndContext() + app, ctx = testapp.NewNibiruTestAppAndContext(t.TempDir()) // On init genesis, default epochs information is set // To check init genesis again, should make it fresh status @@ -169,7 +169,7 @@ func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { } func TestEpochStartingOneMonthAfterInitGenesis(t *testing.T) { - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) // On init genesis, default epochs information is set // To check init genesis again, should make it fresh status @@ -264,7 +264,7 @@ func TestLegacyEpochSerialization(t *testing.T) { } now := time.Now() - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) // On init genesis, default epochs information is set // To check init genesis again, should make it fresh status epochInfos := app.EpochsKeeper.AllEpochInfos(ctx) diff --git a/x/epochs/genesis_test.go b/x/epochs/genesis_test.go index 7187bc6f70..1806cab185 100644 --- a/x/epochs/genesis_test.go +++ b/x/epochs/genesis_test.go @@ -16,7 +16,7 @@ import ( func TestEpochsExportGenesis(t *testing.T) { chainStartTime := time.Now().UTC() - app, _ := testapp.NewNibiruTestApp(app.GenesisState{}) + app, _ := testapp.NewNibiruTestApp(t.TempDir(), app.GenesisState{}) ctx := testapp.NewContext(app).WithBlockTime(chainStartTime) genesis := epochs.ExportGenesis(ctx, *app.EpochsKeeper) @@ -57,7 +57,7 @@ func TestEpochsExportGenesis(t *testing.T) { } func TestEpochsInitGenesis(t *testing.T) { - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) // On init genesis, default epochs information is set // To check init genesis again, should make it fresh status epochInfos := app.EpochsKeeper.AllEpochInfos(ctx) diff --git a/x/epochs/keeper/grpc_query_test.go b/x/epochs/keeper/grpc_query_test.go index 93f30ee8b3..364d9e08bb 100644 --- a/x/epochs/keeper/grpc_query_test.go +++ b/x/epochs/keeper/grpc_query_test.go @@ -16,7 +16,7 @@ import ( ) func TestQueryEpochInfos(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) queryHelper := baseapp.NewQueryServerTestHelper(ctx, nibiruApp.InterfaceRegistry()) epochstypes.RegisterQueryServer(queryHelper, keeper.NewQuerier(*nibiruApp.EpochsKeeper)) @@ -50,7 +50,7 @@ func TestQueryEpochInfos(t *testing.T) { } func TestCurrentEpochQuery(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) queryHelper := baseapp.NewQueryServerTestHelper(ctx, nibiruApp.InterfaceRegistry()) epochstypes.RegisterQueryServer(queryHelper, keeper.NewQuerier(*nibiruApp.EpochsKeeper)) diff --git a/x/epochs/keeper/hooks_test.go b/x/epochs/keeper/hooks_test.go index ce253cf2f3..95f775d6d3 100644 --- a/x/epochs/keeper/hooks_test.go +++ b/x/epochs/keeper/hooks_test.go @@ -29,7 +29,7 @@ func (h *MockHooks) BeforeEpochStart(ctx sdk.Context, identifier string, epochNu func TestAfterEpochEnd(t *testing.T) { hooks := new(MockHooks) - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) identifier := "testID" epochNumber := uint64(10) @@ -42,7 +42,7 @@ func TestAfterEpochEnd(t *testing.T) { func TestBeforeEpochStart(t *testing.T) { hooks := new(MockHooks) - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) identifier := "testID" epochNumber := uint64(10) diff --git a/x/epochs/keeper/keeper_test.go b/x/epochs/keeper/keeper_test.go index 43c9b38bfb..73d4bc617a 100644 --- a/x/epochs/keeper/keeper_test.go +++ b/x/epochs/keeper/keeper_test.go @@ -11,7 +11,7 @@ import ( ) func TestUpsertEpochInfo_HappyPath(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) epochInfo := types.EpochInfo{ Identifier: "bi-monthly", @@ -41,7 +41,7 @@ func TestUpsertEpochInfo_HappyPath(t *testing.T) { } func TestEpochExists(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) epochInfo := types.EpochInfo{ Identifier: "monthly", @@ -58,7 +58,7 @@ func TestEpochExists(t *testing.T) { } func TestItFailsAddingEpochThatExists(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) epochInfo := types.EpochInfo{ Identifier: "monthly", diff --git a/x/evm/evm_test.go b/x/evm/evm_test.go index d6eb1f5f17..93f2e7e8f6 100644 --- a/x/evm/evm_test.go +++ b/x/evm/evm_test.go @@ -128,7 +128,7 @@ func (s *TestSuite) TestModuleAddressEVM() { // EVM addr module acc and EVM address should be connected // EVM module should have mint perms - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) { resp, err := deps.EvmKeeper.EthAccount(sdk.WrapSDKContext(deps.Ctx), &evm.QueryEthAccountRequest{ Address: evmModuleAddr.Hex(), diff --git a/x/evm/evmmodule/genesis_test.go b/x/evm/evmmodule/genesis_test.go index 08eac19ed9..d546c06c94 100644 --- a/x/evm/evmmodule/genesis_test.go +++ b/x/evm/evmmodule/genesis_test.go @@ -33,7 +33,7 @@ func TestKeeperSuite(t *testing.T) { // - verifies that contracts are in place and user balances match // - verifies that fungible token is in place and the balance is correct func (s *Suite) TestExportInitGenesis() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) erc20Contract := embeds.SmartContract_TestERC20 fromUser := deps.Sender.EthAddr toUserA := gethcommon.HexToAddress("0xAE8A5F44A9b55Ae6D2c9C228253E8fAfb837d2F2") @@ -94,7 +94,7 @@ func (s *Suite) TestExportInitGenesis() { authGenesisState := deps.App.AccountKeeper.ExportGenesis(deps.Ctx) // Init genesis from the exported state - deps = evmtest.NewTestDeps() + deps = evmtest.NewTestDeps(s.T().TempDir()) deps.App.AccountKeeper.InitGenesis(deps.Ctx, *authGenesisState) evmmodule.InitGenesis(deps.Ctx, deps.EvmKeeper, deps.App.AccountKeeper, *evmGenesisState) diff --git a/x/evm/evmtest/smart_contract_test.go b/x/evm/evmtest/smart_contract_test.go index a78dbcf8e9..244ea4824f 100644 --- a/x/evm/evmtest/smart_contract_test.go +++ b/x/evm/evmtest/smart_contract_test.go @@ -10,7 +10,7 @@ import ( ) func (s *Suite) TestCreateContractTxMsg() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) ethAcc := evmtest.NewEthPrivAcc() args := evmtest.ArgsCreateContract{ @@ -26,7 +26,7 @@ func (s *Suite) TestCreateContractTxMsg() { } func (s *Suite) TestExecuteContractTxMsg() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) ethAcc := evmtest.NewEthPrivAcc() contractAddress := gethcommon.HexToAddress("0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed") args := evmtest.ArgsExecuteContract{ diff --git a/x/evm/evmtest/test_deps.go b/x/evm/evmtest/test_deps.go index 43d3a648e9..dcc3c0b85a 100644 --- a/x/evm/evmtest/test_deps.go +++ b/x/evm/evmtest/test_deps.go @@ -25,8 +25,8 @@ type TestDeps struct { Sender EthPrivKeyAcc } -func NewTestDeps() TestDeps { - app, ctx := testapp.NewNibiruTestAppAndContext() +func NewTestDeps(homeDir string) TestDeps { + app, ctx := testapp.NewNibiruTestAppAndContext(homeDir) ctx = ctx.WithChainID(eth.EIP155ChainID_Testnet) return TestDeps{ diff --git a/x/evm/evmtest/tx_test.go b/x/evm/evmtest/tx_test.go index 7afad05ce9..d2fe0d03af 100644 --- a/x/evm/evmtest/tx_test.go +++ b/x/evm/evmtest/tx_test.go @@ -13,7 +13,7 @@ import ( ) func (s *Suite) TestTransferWei() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, diff --git a/x/evm/keeper/bank_extension_test.go b/x/evm/keeper/bank_extension_test.go index a83a2b1f60..1694e2a168 100644 --- a/x/evm/keeper/bank_extension_test.go +++ b/x/evm/keeper/bank_extension_test.go @@ -87,7 +87,7 @@ func (scenario GasConsumedInvariantScenario) Run( to evmtest.EthPrivKeyAcc, ) (gasConsumed uint64) { bankDenom, nilStateDB := scenario.BankDenom, scenario.NilStateDB - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if nilStateDB { s.Require().Nil(deps.EvmKeeper.Bank.StateDB) } else { @@ -187,7 +187,7 @@ func (f FunctionalGasConsumedInvariantScenario) Run(s *Suite) { ) { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Nil(deps.EvmKeeper.Bank.StateDB) f.Setup(&deps) @@ -199,7 +199,7 @@ func (f FunctionalGasConsumedInvariantScenario) Run(s *Suite) { } { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) deps.NewStateDB() s.NotNil(deps.EvmKeeper.Bank.StateDB) @@ -321,7 +321,7 @@ func (s *Suite) TestGasConsumedInvariantOther() { // nodes and consensus failures. This test adds cases to make sure that invariant // is held. func (s *Suite) TestStateDBReadonlyInvariant() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) _, _, erc20Contract := evmtest.DeployAndExecuteERC20Transfer(&deps, s.T()) to := evmtest.NewEthPrivAcc() diff --git a/x/evm/keeper/erc20_test.go b/x/evm/keeper/erc20_test.go index 18c50d77a0..9b024f37d7 100644 --- a/x/evm/keeper/erc20_test.go +++ b/x/evm/keeper/erc20_test.go @@ -9,7 +9,7 @@ import ( ) func (s *Suite) TestERC20Calls() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) bankDenom := "ibc/btc" funtoken := evmtest.CreateFunTokenForBankCoin(deps, bankDenom, &s.Suite) erc20 := funtoken.Erc20Addr.Address diff --git a/x/evm/keeper/funtoken_from_coin_test.go b/x/evm/keeper/funtoken_from_coin_test.go index 9f510f4dd6..3058a30cee 100644 --- a/x/evm/keeper/funtoken_from_coin_test.go +++ b/x/evm/keeper/funtoken_from_coin_test.go @@ -25,7 +25,7 @@ import ( ) func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Run("Compute contract address. FindERC20 should fail", func() { evmObj, _ := deps.NewEVM() metadata, err := deps.EvmKeeper.FindERC20Metadata( @@ -194,7 +194,7 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { } func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() alice := evmtest.NewEthPrivAcc() @@ -356,7 +356,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { // - Alice: 20 NIBI // - Module account: 0 NIBI escrowed func (s *FunTokenFromCoinSuite) TestNativeSendThenPrecompileSend() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() bankDenom := evm.EVMBankDenom @@ -538,7 +538,7 @@ func (s *FunTokenFromCoinSuite) TestNativeSendThenPrecompileSend() { // - Alice: 1 WNIBI, 9 NIBI // - Module account: 1 NIBI escrowed (which Alice holds as 1 WNIBI) func (s *FunTokenFromCoinSuite) TestERC20TransferThenPrecompileSend() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() funToken := s.fundAndCreateFunToken(deps, 10e6) @@ -656,7 +656,7 @@ func (s *FunTokenFromCoinSuite) TestERC20TransferThenPrecompileSend() { // - Charles: 0 NIBI // - Module account: 10 NIBI escrowed (which Test contract holds as 10 WNIBI) func (s *FunTokenFromCoinSuite) TestPrecompileSelfCallRevert() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) // Initial setup funToken := s.fundAndCreateFunToken(deps, 10e6) @@ -778,7 +778,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSelfCallRevert() { // - Bob: 0 NIBI // - Module account: 10 NIBI escrowed (which Test contract holds as 10 WNIBI) func (s *FunTokenFromCoinSuite) TestPrecompileSendToBankThenErc20Transfer() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) // Initial setup funToken := s.fundAndCreateFunToken(deps, 10e6) diff --git a/x/evm/keeper/funtoken_from_erc20_test.go b/x/evm/keeper/funtoken_from_erc20_test.go index 14e9e06f9b..8bcb899b22 100644 --- a/x/evm/keeper/funtoken_from_erc20_test.go +++ b/x/evm/keeper/funtoken_from_erc20_test.go @@ -26,7 +26,7 @@ import ( ) func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) // assert that the ERC20 contract is not deployed expectedERC20Addr := crypto.CreateAddress(deps.Sender.EthAddr, deps.NewStateDB().GetNonce(deps.Sender.EthAddr)) @@ -170,7 +170,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { } func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, @@ -361,7 +361,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { // with a malicious (gas intensive) name() function. // Fun token should fail creation with "out of gas" func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20MaliciousName() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.T().Log("Deploy ERC20MaliciousName") metadata := keeper.ERC20Metadata{ @@ -401,7 +401,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20MaliciousName() { // with a malicious (gas intensive) transfer() function. // Fun token should be created but sending from erc20 to bank should fail with out of gas func (s *FunTokenFromErc20Suite) TestFunTokenFromERC20MaliciousTransfer() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, @@ -459,7 +459,7 @@ func (s *FunTokenFromErc20Suite) TestFunTokenFromERC20MaliciousTransfer() { // TestFunTokenInfiniteRecursionERC20 creates a funtoken from a contract // with a malicious recursive balanceOf() and transfer() functions. func (s *FunTokenFromErc20Suite) TestFunTokenInfiniteRecursionERC20() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, @@ -533,7 +533,7 @@ func (s *FunTokenFromErc20Suite) TestFunTokenInfiniteRecursionERC20() { // TestSendERC20WithFee creates a funtoken from a malicious contract which charges a 10% fee on any transfer. // Test ensures that after sending ERC20 token to coin and back, all bank coins are burned. func (s *FunTokenFromErc20Suite) TestSendERC20WithFee() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, @@ -624,7 +624,7 @@ type MkrMetadata struct { } func (s *FunTokenFromErc20Suite) TestFindMKRMetadata() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.T().Log("Deploy MKR") diff --git a/x/evm/keeper/funtoken_state_test.go b/x/evm/keeper/funtoken_state_test.go index 32ba7d3edf..691109f49e 100644 --- a/x/evm/keeper/funtoken_state_test.go +++ b/x/evm/keeper/funtoken_state_test.go @@ -8,7 +8,7 @@ import ( ) func (s *Suite) TestInsertAndGet() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) erc20Addr := gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477") err := deps.EvmKeeper.FunTokens.SafeInsert( @@ -31,7 +31,7 @@ func (s *Suite) TestInsertAndGet() { } func (s *Suite) TestCollect() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) erc20Addr := gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477") err := deps.EvmKeeper.FunTokens.SafeInsert( @@ -60,7 +60,7 @@ func (s *Suite) TestCollect() { } func (s *Suite) TestDelete() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) erc20Addr := gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477") err := deps.EvmKeeper.FunTokens.SafeInsert( diff --git a/x/evm/keeper/gas_fees_test.go b/x/evm/keeper/gas_fees_test.go index 470892f127..83001439d7 100644 --- a/x/evm/keeper/gas_fees_test.go +++ b/x/evm/keeper/gas_fees_test.go @@ -208,7 +208,7 @@ func (s *Suite) TestRefundGas() { } }, } { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) tc := getTestCase(&deps) s.Run(tc.name, func() { fromBalBefore := deps.App.BankKeeper.GetBalance( diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index f996a9cee4..e14b1f998c 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -165,7 +165,7 @@ func (s *Suite) TestQueryEvmAccount() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -277,7 +277,7 @@ func (s *Suite) TestQueryValidatorAccount() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -352,7 +352,7 @@ func (s *Suite) TestQueryStorage() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -411,7 +411,7 @@ func (s *Suite) TestQueryCode() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -433,7 +433,7 @@ func (s *Suite) TestQueryCode() { } func (s *Suite) TestQueryParams() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) want := evm.DefaultParams() err := deps.EvmKeeper.SetParams(deps.Ctx, want) s.NoError(err) @@ -495,7 +495,7 @@ func (s *Suite) TestQueryEthCall() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -573,7 +573,7 @@ func (s *Suite) TestQueryBalance() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -612,7 +612,7 @@ func (s *Suite) TestQueryBaseFee() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -733,7 +733,7 @@ func (s *Suite) TestEstimateGasForEvmCallType() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -796,7 +796,7 @@ func (s *Suite) TestTraceTx() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -876,7 +876,7 @@ func (s *Suite) TestTraceBlock() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -974,7 +974,7 @@ func (s *Suite) TestTraceCall() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } @@ -1067,7 +1067,7 @@ func (s *Suite) TestQueryFunTokenMapping() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) if tc.setup != nil { tc.setup(&deps) } diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index b49305fcf3..d1d930aee4 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -29,7 +29,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { { name: "happy: deploy contract, sufficient gas limit", scenario: func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) ethAcc := deps.Sender // Leftover gas fee is refunded within EthereumTx from the FeeCollector @@ -78,7 +78,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { { name: "sad: deploy contract, exceed gas limit", scenario: func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) ethAcc := deps.Sender s.T().Log("create eth tx msg, default create contract gas") @@ -112,7 +112,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { } func (s *Suite) TestMsgEthereumTx_ExecuteContract() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) ethAcc := deps.Sender // Leftover gas fee is refunded within EthereumTx from the FeeCollector @@ -184,7 +184,7 @@ func (s *Suite) TestMsgEthereumTx_SimpleTransfer() { } for _, tc := range testCases { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) ethAcc := deps.Sender fundedAmount := evm.NativeToWei(big.NewInt(123)).Int64() @@ -235,7 +235,7 @@ func (s *Suite) TestMsgEthereumTx_SimpleTransfer() { } func (s *Suite) TestEthereumTx_ABCI() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, diff --git a/x/evm/keeper/random_test.go b/x/evm/keeper/random_test.go index b08ee20653..1e98bc7b53 100644 --- a/x/evm/keeper/random_test.go +++ b/x/evm/keeper/random_test.go @@ -10,7 +10,7 @@ import ( // TestRandom tests the random value generation within the EVM. func (s *Suite) TestRandom() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() deployResp, err := evmtest.DeployContract(&deps, embeds.SmartContract_TestRandom) s.Require().NoError(err) diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index 3ed34c8387..a126d1a852 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -19,7 +19,7 @@ import ( // balances, ensuring correct conversion between native tokens (unibi) and EVM // tokens (wei), as well as proper balance updates during transfers. func (s *Suite) TestStateDBBalance() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) { db := deps.NewStateDB() s.Equal("0", db.GetBalance(deps.Sender.EthAddr).String()) @@ -72,7 +72,7 @@ func (s *Suite) TestStateDBBalance() { s.T().Log("Send via bank transfer from account to account. See expected wei amounts.") { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) toNibiAddr := eth.EthAddrToNibiruAddr(to) err := testapp.FundAccount( deps.App.BankKeeper, diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index ded466e35a..0ef6da38eb 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -79,7 +79,7 @@ func TestFailToPackABI(t *testing.T) { } func TestWhoAmI(t *testing.T) { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(t.TempDir()) callWhoAmI := func(arg string) (evmResp *evm.MsgEthereumTxResponse, err error) { fmt.Printf("arg: %s", arg) @@ -117,7 +117,7 @@ func TestWhoAmI(t *testing.T) { } func (s *FuntokenSuite) TestHappyPath() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.T().Log("Create FunToken mapping and ERC20") funtoken := evmtest.CreateFunTokenForBankCoin(deps, evm.EVMBankDenom, &s.Suite) @@ -257,7 +257,7 @@ func (s *FuntokenSuite) TestHappyPath() { } func (s *FuntokenSuite) TestPrecompileLocalGas() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) funtoken := evmtest.CreateFunTokenForBankCoin(deps, evm.EVMBankDenom, &s.Suite) randomAcc := testutil.AccAddress() @@ -358,7 +358,7 @@ func (s *FuntokenSuite) TestPrecompileLocalGas() { } func (s *FuntokenSuite) TestSendToEvm_MadeFromCoin() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.T().Log("create evmObj") evmObj, _ := deps.NewEVM() @@ -505,7 +505,7 @@ func (s *FuntokenSuite) TestSendToEvm_MadeFromERC20() { // - burn cosmos token // - unescrow erc20 token - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) alice := evmtest.NewEthPrivAcc() bob := evmtest.NewEthPrivAcc() @@ -713,7 +713,7 @@ func (out FunTokenBankBalanceReturn) ParseFromResp( } func (s *FuntokenSuite) TestGetErc20Address() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) bankDenom := "unibi" // Example bank denom s.T().Log("Setup: Create FunToken mapping for unibi") diff --git a/x/evm/precompile/nibiru_evm_utils_test.go b/x/evm/precompile/nibiru_evm_utils_test.go index d4121f81b6..3e98d405ea 100644 --- a/x/evm/precompile/nibiru_evm_utils_test.go +++ b/x/evm/precompile/nibiru_evm_utils_test.go @@ -70,7 +70,7 @@ func (s *UtilsSuite) TestEmitEventAbciEvent() { s.True(some, abiEventName) eventId := event.ID - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() s.T().Log("Mint coins to generate ABCI events") diff --git a/x/evm/precompile/oracle_test.go b/x/evm/precompile/oracle_test.go index 0b48d201b7..3c573e5216 100644 --- a/x/evm/precompile/oracle_test.go +++ b/x/evm/precompile/oracle_test.go @@ -58,7 +58,7 @@ func (s *OracleSuite) TestOracle_FailToPackABI() { } func (s *OracleSuite) TestOracle_HappyPath() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) runQuery := func(ctx sdk.Context) ( resp *evm.MsgEthereumTxResponse, err error, diff --git a/x/evm/precompile/wasm_test.go b/x/evm/precompile/wasm_test.go index 7e53ceff36..716dfe3e65 100644 --- a/x/evm/precompile/wasm_test.go +++ b/x/evm/precompile/wasm_test.go @@ -39,7 +39,7 @@ func TestWasmSuite(t *testing.T) { } func (s *WasmSuite) TestInstantiate() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() test.SetupWasmContracts(&deps, &s.Suite) @@ -76,7 +76,7 @@ func (s *WasmSuite) TestInstantiate() { } func (s *WasmSuite) TestExecute() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) @@ -151,7 +151,7 @@ func (s *WasmSuite) TestExecute() { } func (s *WasmSuite) TestExecuteMulti() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) wasmContract := wasmContracts[1] // hello_world_counter.wasm @@ -171,7 +171,7 @@ func (s *WasmSuite) TestExecuteMulti() { } func (s *WasmSuite) TestQueryRaw() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) wasmContract := wasmContracts[1] // hello_world_counter.wasm @@ -211,7 +211,7 @@ func (s *WasmSuite) TestQueryRaw() { } func (s *WasmSuite) TestQuerySmart() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) wasmContract := wasmContracts[1] // hello_world_counter.wasm @@ -382,7 +382,7 @@ func (s *WasmSuite) TestSadArgsExecute() { abi := embeds.SmartContract_Wasm.ABI for _, tc := range testcases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) contractInput, err := abi.Pack( string(tc.methodName), @@ -413,7 +413,7 @@ type WasmExecuteMsg struct { } func (s *WasmSuite) TestExecuteMultiValidation() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, @@ -553,7 +553,7 @@ func (s *WasmSuite) TestExecuteMultiValidation() { // TestExecuteMultiPartialExecution ensures that no state changes occur if any message // in the batch fails validation func (s *WasmSuite) TestExecuteMultiPartialExecution() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) @@ -612,7 +612,8 @@ func (s *WasmSuite) TestExecuteMultiPartialExecution() { // - Test contract funds: 9 NIBI // - Alice: 1 NIBI func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack4() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) + fmt.Println("wow") wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) wasmContract := wasmContracts[2] // bank_transfer.wasm @@ -622,9 +623,10 @@ func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack4() { &deps, embeds.SmartContract_TestDirtyStateAttack4, ) + fmt.Println("deploy resp : ", deployResp.ContractAddr) s.Require().NoError(err) testContractAddr := deployResp.ContractAddr - + fmt.Println("testtta log") s.Run("Send 10 NIBI to test contract manually", func() { s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, @@ -661,6 +663,7 @@ func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack4() { contractInput, evmtest.FunTokenGasLimitSendToEvm, ) + fmt.Println("call contract with input : ", err) s.Require().NoError(err) balanceAlice := deps.App.BankKeeper.GetBalance(deps.Ctx, alice.NibiruAddr, evm.EVMBankDenom) @@ -686,7 +689,7 @@ func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack4() { // - Staked NIBI from wasm contract: 5 NIBI // - Wasm contract: 0 NIBI func (s *WasmSuite) TestWasmPrecompileDirtyStateAttack5() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) wasmContracts := test.SetupWasmContracts(&deps, &s.Suite) wasmContract := wasmContracts[3] // staking.wasm diff --git a/x/evm/statedb/journal_test.go b/x/evm/statedb/journal_test.go index 4cf065fcf5..e329659621 100644 --- a/x/evm/statedb/journal_test.go +++ b/x/evm/statedb/journal_test.go @@ -24,7 +24,7 @@ import ( ) func (s *Suite) TestCommitRemovesDirties() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() deployResp, err := evmtest.DeployContract( @@ -53,7 +53,7 @@ func (s *Suite) TestCommitRemovesDirties() { } func (s *Suite) TestCommitRemovesDirties_OnlyStateDB() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() stateDB := evmObj.StateDB.(*statedb.StateDB) @@ -80,7 +80,7 @@ func (s *Suite) TestCommitRemovesDirties_OnlyStateDB() { } func (s *Suite) TestContractCallsAnotherContract() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) evmObj, _ := deps.NewEVM() stateDB := evmObj.StateDB.(*statedb.StateDB) @@ -162,7 +162,7 @@ func (s *Suite) TestContractCallsAnotherContract() { } func (s *Suite) TestJournalReversion() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, diff --git a/x/evm/statedb/statedb_test.go b/x/evm/statedb/statedb_test.go index ccd07b894a..639779b335 100644 --- a/x/evm/statedb/statedb_test.go +++ b/x/evm/statedb/statedb_test.go @@ -133,7 +133,7 @@ func (s *Suite) TestAccount() { } for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() tc.malleate(&deps, db) }) @@ -141,7 +141,7 @@ func (s *Suite) TestAccount() { } func (s *Suite) TestAccountOverride() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() // test balance carry over when overwritten amount := big.NewInt(1) @@ -174,7 +174,7 @@ func (s *Suite) TestDBError() { }}, } for _, tc := range testCases { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() tc.malleate(db) s.Require().NoError(db.Commit()) @@ -252,7 +252,7 @@ func (s *Suite) TestBalance() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() tc.do(db) @@ -305,7 +305,7 @@ func (s *Suite) TestState() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() tc.malleate(db) s.Require().NoError(db.Commit()) @@ -348,7 +348,7 @@ func (s *Suite) TestCode() { for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() tc.malleate(db) @@ -415,7 +415,7 @@ func (s *Suite) TestRevertSnapshot() { } for _, tc := range testCases { s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) // do some arbitrary changes to the storage db := deps.NewStateDB() @@ -459,7 +459,7 @@ func (s *Suite) TestNestedSnapshot() { value1 := common.BigToHash(big.NewInt(1)) value2 := common.BigToHash(big.NewInt(2)) - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() rev1 := db.Snapshot() @@ -477,7 +477,7 @@ func (s *Suite) TestNestedSnapshot() { } func (s *Suite) TestInvalidSnapshotId() { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() s.Require().Panics(func() { @@ -553,7 +553,7 @@ func (s *Suite) TestAccessList() { } for _, tc := range testCases { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() tc.malleate(db) } @@ -575,7 +575,7 @@ func (s *Suite) TestLog() { LogIndex: logIdx, } - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := statedb.New(deps.Ctx, deps.App.EvmKeeper, txConfig) logData := []byte("hello world") @@ -630,7 +630,7 @@ func (s *Suite) TestRefund() { }, 0, true}, } for _, tc := range testCases { - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() if !tc.expPanic { tc.malleate(db) @@ -649,7 +649,7 @@ func (s *Suite) TestIterateStorage() { key2 := common.BigToHash(big.NewInt(3)) value2 := common.BigToHash(big.NewInt(4)) - deps := evmtest.NewTestDeps() + deps := evmtest.NewTestDeps(s.T().TempDir()) db := deps.NewStateDB() db.SetState(address, key1, value1) db.SetState(address, key2, value2) diff --git a/x/genmsg/integration_test.go b/x/genmsg/integration_test.go index 2b54559933..8eed4d0900 100644 --- a/x/genmsg/integration_test.go +++ b/x/genmsg/integration_test.go @@ -46,7 +46,7 @@ func TestGenmsgInGenesis(t *testing.T) { }, ) - app, _ := testapp.NewNibiruTestApp(appGenesis) + app, _ := testapp.NewNibiruTestApp(t.TempDir(), appGenesis) ctx := app.NewContext(false) balance, err := app.BankKeeper.Balance(ctx, &banktypes.QueryBalanceRequest{ diff --git a/x/inflation/keeper/grpc_query_test.go b/x/inflation/keeper/grpc_query_test.go index 89bede6f93..b2a51e3531 100644 --- a/x/inflation/keeper/grpc_query_test.go +++ b/x/inflation/keeper/grpc_query_test.go @@ -22,7 +22,7 @@ type QueryServerSuite struct { } func (s *QueryServerSuite) SetupSuite() { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) s.nibiruApp = nibiruApp s.ctx = ctx } diff --git a/x/inflation/keeper/hooks_test.go b/x/inflation/keeper/hooks_test.go index 6e60899e0a..87f2ba4f9c 100644 --- a/x/inflation/keeper/hooks_test.go +++ b/x/inflation/keeper/hooks_test.go @@ -22,7 +22,7 @@ import ( // pool after an epoch ends is greater than the amount before the epoch ends // with the default module parameters. func TestEpochIdentifierAfterEpochEnd(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) params := nibiruApp.InflationKeeper.GetParams(ctx) params.InflationEnabled = true @@ -42,7 +42,7 @@ func TestEpochIdentifierAfterEpochEnd(t *testing.T) { // the number of skipped epochs are accurately updated and that skipped epochs // are handled correctly. func TestPeriodChangesSkippedEpochsAfterEpochEnd(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) inflationKeeper := nibiruApp.InflationKeeper testCases := []struct { @@ -216,7 +216,7 @@ func TestManual(t *testing.T) { // We turn it off again and check if the balance is not increasing // We turn it on again and check if the balance is increasing again with the correct amount - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) inflationKeeper := nibiruApp.InflationKeeper params := inflationKeeper.GetParams(ctx) diff --git a/x/inflation/keeper/inflation_test.go b/x/inflation/keeper/inflation_test.go index c3f8f94655..874f5d4d86 100644 --- a/x/inflation/keeper/inflation_test.go +++ b/x/inflation/keeper/inflation_test.go @@ -65,7 +65,7 @@ func TestMintAndAllocateInflation(t *testing.T) { } for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) t.Logf("setting root account to %s", tc.rootAccount) nibiruApp.SudoKeeper.Sudoers.Set(ctx, sudotypes.Sudoers{ @@ -166,7 +166,7 @@ func TestGetCirculatingSupplyAndInflationRate(t *testing.T) { } for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) tc.malleate(nibiruApp, ctx) @@ -188,7 +188,7 @@ func TestGetCirculatingSupplyAndInflationRate(t *testing.T) { } func TestGetters(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) k := nibiruApp.InflationKeeper require.NotPanics(t, func() { _ = k.GetPolynomialFactors(ctx) diff --git a/x/inflation/keeper/keeper_test.go b/x/inflation/keeper/keeper_test.go index 7f672ffe3a..0d986d094a 100644 --- a/x/inflation/keeper/keeper_test.go +++ b/x/inflation/keeper/keeper_test.go @@ -39,7 +39,7 @@ func TestBurn(t *testing.T) { for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) // mint and send money to the sender require.NoError(t, diff --git a/x/inflation/keeper/msg_server_test.go b/x/inflation/keeper/msg_server_test.go index e640b43f34..0d9b8aa33b 100644 --- a/x/inflation/keeper/msg_server_test.go +++ b/x/inflation/keeper/msg_server_test.go @@ -13,7 +13,7 @@ import ( ) func TestMsgToggleInflation(t *testing.T) { - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) msgServer := keeper.NewMsgServerImpl(app.InflationKeeper) params := app.InflationKeeper.GetParams(ctx) @@ -42,7 +42,7 @@ func TestMsgToggleInflation(t *testing.T) { } func TestMsgEditInflationParams(t *testing.T) { - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) msgServer := keeper.NewMsgServerImpl(app.InflationKeeper) params := app.InflationKeeper.GetParams(ctx) diff --git a/x/inflation/keeper/sudo_test.go b/x/inflation/keeper/sudo_test.go index 488d9f5503..11c3aad58f 100644 --- a/x/inflation/keeper/sudo_test.go +++ b/x/inflation/keeper/sudo_test.go @@ -71,7 +71,7 @@ func (s *SuiteInflationSudo) TestMergeInflationParams() { } func (s *SuiteInflationSudo) TestEditInflationParams() { - nibiru, ctx := testapp.NewNibiruTestAppAndContext() + nibiru, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) // Change to all non-defaults to test EditInflationParams as a setter . epochsPerPeriod := sdkmath.NewInt(1_234) @@ -118,7 +118,7 @@ func (s *SuiteInflationSudo) TestEditInflationParams() { } func (s *SuiteInflationSudo) TestToggleInflation() { - nibiru, ctx := testapp.NewNibiruTestAppAndContext() + nibiru, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) err := nibiru.InflationKeeper.Sudo().ToggleInflation(ctx, true, sdk.MustAccAddressFromBech32(testutil.ADDR_SUDO_ROOT)) s.Require().NoError(err) diff --git a/x/oracle/keeper/edit_params_test.go b/x/oracle/keeper/edit_params_test.go index 2e2bf702a0..756c5a4d1d 100644 --- a/x/oracle/keeper/edit_params_test.go +++ b/x/oracle/keeper/edit_params_test.go @@ -14,7 +14,7 @@ import ( ) func TestMsgServer_EditOracleParams(t *testing.T) { - app, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) goCtx := sdk.WrapSDKContext(ctx) msgServer := keeper.NewMsgServerImpl(app.OracleKeeper, app.SudoKeeper) diff --git a/x/sudo/keeper/keeper_test.go b/x/sudo/keeper/keeper_test.go index 6f1f7fbb1b..d181d15689 100644 --- a/x/sudo/keeper/keeper_test.go +++ b/x/sudo/keeper/keeper_test.go @@ -19,7 +19,7 @@ func TestCheckPermissions(t *testing.T) { mockContractAddrStrs = append(mockContractAddrStrs, mockAddr.String()) } - nibiru, ctx := testapp.NewNibiruTestAppAndContext() + nibiru, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) nibiru.SudoKeeper.Sudoers.Set(ctx, sudotypes.Sudoers{ Root: "mockroot", Contracts: mockContractAddrStrs, diff --git a/x/sudo/keeper/msg_server_test.go b/x/sudo/keeper/msg_server_test.go index 5936f01b1d..d95fcb978b 100644 --- a/x/sudo/keeper/msg_server_test.go +++ b/x/sudo/keeper/msg_server_test.go @@ -18,8 +18,8 @@ import ( "github.com/NibiruChain/nibiru/v2/x/sudo" ) -func setup() (*app.NibiruApp, sdk.Context) { - return testapp.NewNibiruTestAppAndContext() +func setup(t *testing.T) (*app.NibiruApp, sdk.Context) { + return testapp.NewNibiruTestAppAndContext(t.TempDir()) } func TestGenesis(t *testing.T) { @@ -66,7 +66,7 @@ func TestGenesis(t *testing.T) { } { t.Run(testCase.name, func(t *testing.T) { // Setup - nibiru, ctx := setup() + nibiru, ctx := setup(t) // InitGenesis if testCase.panic { @@ -146,7 +146,7 @@ func TestSudo_AddContracts(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - _, _ = setup() + _, _ = setup(t) root := testutil.AccAddress().String() sudoers := keeper.Sudoers{ Root: root, @@ -164,7 +164,7 @@ func TestSudo_AddContracts(t *testing.T) { } func TestMsgServer_ChangeRoot(t *testing.T) { - app, ctx := setup() + app, ctx := setup(t) _, err := app.SudoKeeper.Sudoers.Get(ctx) require.NoError(t, err) @@ -323,7 +323,7 @@ func TestKeeper_AddContracts(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - nibiru, ctx := setup() + nibiru, ctx := setup(t) k := nibiru.SudoKeeper t.Log("Set starting contracts state") @@ -432,7 +432,7 @@ func TestKeeper_RemoveContracts(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - nibiru, ctx := setup() + nibiru, ctx := setup(t) k := nibiru.SudoKeeper t.Log("Set starting contracts state") diff --git a/x/tokenfactory/keeper/keeper_test.go b/x/tokenfactory/keeper/keeper_test.go index f903fae8a8..de76dff92e 100644 --- a/x/tokenfactory/keeper/keeper_test.go +++ b/x/tokenfactory/keeper/keeper_test.go @@ -39,7 +39,7 @@ func TestKeeperTestSuite(t *testing.T) { // and ctx. func (s *TestSuite) SetupTest() { s.encConfig = app.MakeEncodingConfig() - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() + nibiruApp, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) s.app = nibiruApp s.ctx = ctx s.keeper = s.app.TokenFactoryKeeper diff --git a/x/tokenfactory/module_test.go b/x/tokenfactory/module_test.go index 8a924e89e3..15e83b21e0 100644 --- a/x/tokenfactory/module_test.go +++ b/x/tokenfactory/module_test.go @@ -18,7 +18,7 @@ func TestModuleTestSuite(t *testing.T) { } func (s *ModuleTestSuite) TestAppModule() { - bapp, ctx := testapp.NewNibiruTestAppAndContext() + bapp, ctx := testapp.NewNibiruTestAppAndContext(s.T().TempDir()) appModule := module.NewAppModule( bapp.TokenFactoryKeeper, bapp.AccountKeeper, From 58640449ae0d3e83deba43de47dc8eb2d0a14e00 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Wed, 7 May 2025 12:42:27 +0700 Subject: [PATCH 34/72] fix test --- x/evm/keeper/grpc_query.go | 2 +- x/evm/keeper/grpc_query_test.go | 10 ++++++---- x/sudo/keeper/querier_test.go | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 2576f19362..b08a8901c2 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -104,7 +104,7 @@ func (k Keeper) ValidatorAccount( validator, err := k.stakingKeeper.GetValidatorByConsAddr(ctx, consAddr) if err != nil { - return nil, fmt.Errorf("validator not found for %s: 5s", consAddr.String(), err) + return nil, fmt.Errorf("validator not found for %s: 5s", consAddr.String()) } nibiruAddr := sdk.AccAddress(validator.GetOperator()) diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index e14b1f998c..7b605d37d8 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -218,16 +218,17 @@ func (s *Suite) TestQueryValidatorAccount() { scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { valopers, err := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) s.Require().NoError(err) - valAddrBz := valopers[0].GetOperator() + valAddr, err := sdk.ValAddressFromBech32(valopers[0].GetOperator()) + s.Require().NoError(err) _, err = sdk.ConsAddressFromBech32(valopers[0].OperatorAddress) s.ErrorContains(err, "expected nibivalcons, got nibivaloper") - consAddr := sdk.ConsAddress(valAddrBz) + consAddr := sdk.ConsAddress(valAddr) req = &evm.QueryValidatorAccountRequest{ ConsAddress: consAddr.String(), } wantResp = &evm.QueryValidatorAccountResponse{ - AccountAddress: sdk.AccAddress(valAddrBz).String(), + AccountAddress: sdk.AccAddress(valopers[0].GetOperator()).String(), Sequence: 0, AccountNumber: 0, } @@ -242,7 +243,8 @@ func (s *Suite) TestQueryValidatorAccount() { valopers, err := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) s.Require().NoError(err) valAddrBz := valopers[0].GetOperator() - consAddr := sdk.ConsAddress(valAddrBz) + valAddress, err := sdk.ValAddressFromBech32(valopers[0].GetOperator()) + consAddr := sdk.ConsAddress(valAddress) s.T().Log( "Send coins to validator to register in the account keeper.") diff --git a/x/sudo/keeper/querier_test.go b/x/sudo/keeper/querier_test.go index c907207049..385c1e4381 100644 --- a/x/sudo/keeper/querier_test.go +++ b/x/sudo/keeper/querier_test.go @@ -40,7 +40,7 @@ func TestQuerySudoers(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - nibiru, ctx := setup() + nibiru, ctx := setup(t) nibiru.SudoKeeper.Sudoers.Set(ctx, tc.state) @@ -57,7 +57,7 @@ func TestQuerySudoers(t *testing.T) { } t.Run("nil request should error", func(t *testing.T) { - nibiru, ctx := setup() + nibiru, ctx := setup(t) var req *types.QuerySudoersRequest = nil querier := keeper.NewQuerier(nibiru.SudoKeeper) _, err := querier.QuerySudoers( From 9f14eeca6d82b57ae31ade0c3105687338b884ca Mon Sep 17 00:00:00 2001 From: expertdicer Date: Wed, 7 May 2025 12:42:42 +0700 Subject: [PATCH 35/72] add tempdir for ibc testing --- app/ibc_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/ibc_test.go b/app/ibc_test.go index fbf81d2068..bb39884215 100644 --- a/app/ibc_test.go +++ b/app/ibc_test.go @@ -25,7 +25,8 @@ SetupNibiruTestingApp returns the TestingApp and default genesis state used to initialize the testing app. */ func newNibiruTestApp() (ibctesting.TestingApp, map[string]json.RawMessage) { - return testapp.NewNibiruTestApp(app.GenesisState{}) + t := testing.T{} + return testapp.NewNibiruTestApp(t.TempDir(), app.GenesisState{}) } // IBCTestSuite is a testing suite to test keeper functions. From 4576786e7cb90b02c35c7b12b10e9d073da4797e Mon Sep 17 00:00:00 2001 From: expertdicer Date: Wed, 7 May 2025 12:43:05 +0700 Subject: [PATCH 36/72] correct chain id from context --- app/ante/auth_guard_test.go | 2 +- app/ante/commission_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ante/auth_guard_test.go b/app/ante/auth_guard_test.go index e0008f627b..6d16f79ea8 100644 --- a/app/ante/auth_guard_test.go +++ b/app/ante/auth_guard_test.go @@ -118,7 +118,7 @@ func (s *AnteTestSuite) TestAnteDecoratorAuthzGuard() { anteDec := ante.AnteDecoratorAuthzGuard{} txBuilder, err := sdkclienttx.Factory{}. - WithChainID(s.ctx.ChainID()). + WithChainID(s.clientCtx.ChainID). WithTxConfig(deps.App.GetTxConfig()). BuildUnsignedTx(tc.txMsg()) s.Require().NoError(err) diff --git a/app/ante/commission_test.go b/app/ante/commission_test.go index 76dd6d4304..0565b94ccf 100644 --- a/app/ante/commission_test.go +++ b/app/ante/commission_test.go @@ -117,7 +117,7 @@ func (s *AnteTestSuite) TestAnteDecoratorStakingCommission() { encCfg := app.MakeEncodingConfig() txBuilder, err := sdkclienttx.Factory{}. WithFees(txGasCoins.String()). - WithChainID(s.ctx.ChainID()). + WithChainID(s.clientCtx.ChainID). WithTxConfig(encCfg.TxConfig). BuildUnsignedTx(tc.txMsgs...) s.NoError(err) From 4667b6a7ae96b8f843e254c420f4a824000f07f6 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Wed, 7 May 2025 12:44:25 +0700 Subject: [PATCH 37/72] fix tests --- app/ante/gas_wanted_test.go | 37 +++--- app/ante/testutil_test.go | 2 +- app/evmante/evmante_emit_event_test.go | 11 +- app/evmante/evmante_sigverify_test.go | 11 +- app/evmante/evmante_validate_basic_test.go | 7 -- eth/codec_test.go | 3 +- eth/eip712/eip712_test.go | 131 ++++++++------------ eth/eip712/message.go | 4 + gosdk/broadcast.go | 6 +- x/common/testutil/testnetwork/start_node.go | 10 -- 10 files changed, 91 insertions(+), 131 deletions(-) diff --git a/app/ante/gas_wanted_test.go b/app/ante/gas_wanted_test.go index 7ab3c8d6db..9cb3a999a4 100644 --- a/app/ante/gas_wanted_test.go +++ b/app/ante/gas_wanted_test.go @@ -3,7 +3,6 @@ package ante_test import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/NibiruChain/nibiru/v2/app/ante" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" @@ -32,49 +31,45 @@ func (s *AnteTestSuite) TestGasWantedDecorator() { deps.Ctx = deps.Ctx.WithConsensusParams(cp) }, txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - return legacytx.StdTx{ - Msgs: []sdk.Msg{ - evmtest.HappyCreateContractTx(deps), - }, - } + return evmtest.HappyCreateContractTx(deps) }, wantErr: "", }, { name: "happy: tx with gas wanted 500, block gas limit 1000", ctxSetup: func(deps *evmtest.TestDeps) { - cp := &tmproto.ConsensusParams{ + cp := tmproto.ConsensusParams{ Block: &tmproto.BlockParams{MaxGas: 1000}, } deps.Ctx = deps.Ctx.WithConsensusParams(cp) }, txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - return legacytx.StdTx{ - Msgs: []sdk.Msg{ - evmtest.HappyCreateContractTx(deps), - }, - Fee: legacytx.StdFee{Gas: 500}, - } + builder := deps.App.GetTxConfig().NewTxBuilder() + _ = builder.SetMsgs( + evmtest.HappyCreateContractTx(deps), + ) + builder.SetGasLimit(500) + return builder.GetTx() }, wantErr: "", }, { name: "sad: tx with gas wanted 1000, block gas limit 500", ctxSetup: func(deps *evmtest.TestDeps) { - cp := &tmproto.ConsensusParams{ + cp := tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ - - MaxGas: 500, + MaxGas: 500, }, } deps.Ctx = deps.Ctx.WithConsensusParams(cp) }, txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - return legacytx.StdTx{ - Msgs: []sdk.Msg{ - evmtest.HappyCreateContractTx(deps), - }, - Fee: legacytx.StdFee{Gas: 1000}, - } + builder := deps.App.GetTxConfig().NewTxBuilder() + _ = builder.SetMsgs( + evmtest.HappyCreateContractTx(deps), + ) + builder.SetGasLimit(1000) + return builder.GetTx() }, wantErr: "exceeds block gas limit", }, diff --git a/app/ante/testutil_test.go b/app/ante/testutil_test.go index 81dc79ebfe..ea367fd969 100644 --- a/app/ante/testutil_test.go +++ b/app/ante/testutil_test.go @@ -34,7 +34,7 @@ type AnteTestSuite struct { // SetupTest setups a new test, with new app, context, and anteHandler. func (suite *AnteTestSuite) SetupTest() { - suite.app, _ = testapp.NewNibiruTestApp(app.GenesisState{}) + suite.app, _ = testapp.NewNibiruTestApp(suite.T().TempDir(), app.GenesisState{}) chainId := "test-chain-id" ctx := suite.app.NewContext(true) suite.ctx = ctx diff --git a/app/evmante/evmante_emit_event_test.go b/app/evmante/evmante_emit_event_test.go index 079d6a6efd..e56a48f832 100644 --- a/app/evmante/evmante_emit_event_test.go +++ b/app/evmante/evmante_emit_event_test.go @@ -2,7 +2,6 @@ package evmante_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/NibiruChain/nibiru/v2/app/evmante" "github.com/NibiruChain/nibiru/v2/x/evm" @@ -20,11 +19,11 @@ func (s *TestSuite) TestEthEmitEventDecorator() { { name: "sad: non ethereum tx", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - return legacytx.StdTx{ - Msgs: []sdk.Msg{ - &tf.MsgMint{}, - }, - } + builder := deps.App.GetTxConfig().NewTxBuilder() + _ = builder.SetMsgs( + &tf.MsgMint{}, + ) + return builder.GetTx() }, wantErr: "invalid message", }, diff --git a/app/evmante/evmante_sigverify_test.go b/app/evmante/evmante_sigverify_test.go index ad1940b23a..c060635b96 100644 --- a/app/evmante/evmante_sigverify_test.go +++ b/app/evmante/evmante_sigverify_test.go @@ -4,7 +4,6 @@ import ( "math/big" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/NibiruChain/nibiru/v2/app/evmante" @@ -31,11 +30,11 @@ func (s *TestSuite) TestEthSigVerificationDecorator() { { name: "sad: non ethereum tx", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - return legacytx.StdTx{ - Msgs: []sdk.Msg{ - &tf.MsgMint{}, - }, - } + builder := deps.App.GetTxConfig().NewTxBuilder() + _ = builder.SetMsgs( + &tf.MsgMint{}, + ) + return builder.GetTx() }, wantErr: "invalid message", }, diff --git a/app/evmante/evmante_validate_basic_test.go b/app/evmante/evmante_validate_basic_test.go index ca20986fe5..58724d822d 100644 --- a/app/evmante/evmante_validate_basic_test.go +++ b/app/evmante/evmante_validate_basic_test.go @@ -60,13 +60,6 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { }, wantErr: "", }, - { - name: "sad: fail chain id basic validation", - txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - return evmtest.HappyCreateContractTx(deps) - }, - wantErr: "invalid chain-id", - }, { name: "sad: tx not implementing protoTxProvider", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { diff --git a/eth/codec_test.go b/eth/codec_test.go index 32c9d62c91..9cae764b84 100644 --- a/eth/codec_test.go +++ b/eth/codec_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/suite" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" sdktx "github.com/cosmos/cosmos-sdk/types/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -28,7 +29,7 @@ func (suite *CodecTestSuite) TestRegisterInterfaces() { protoInfos := []ProtoNameInfo{ { ProtoName: "cosmos.auth.v1beta1.AccountI", - Interface: new(authtypes.AccountI), + Interface: new(sdk.AccountI), WantImpls: []string{ "/eth.types.v1.EthAccount", "/cosmos.auth.v1beta1.BaseAccount", diff --git a/eth/eip712/eip712_test.go b/eth/eip712/eip712_test.go index 42baf28b3c..6cfe33956a 100644 --- a/eth/eip712/eip712_test.go +++ b/eth/eip712/eip712_test.go @@ -7,12 +7,8 @@ import ( "reflect" "testing" - "google.golang.org/protobuf/types/known/anypb" - - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" sdkmath "cosmossdk.io/math" - txsigning "cosmossdk.io/x/tx/signing" + simappparams "cosmossdk.io/simapp/params" sdkcodec "github.com/cosmos/cosmos-sdk/codec/types" chainparams "cosmossdk.io/simapp/params" @@ -22,9 +18,11 @@ import ( "github.com/tidwall/gjson" "github.com/tidwall/sjson" + "github.com/NibiruChain/nibiru/v2/app" "github.com/NibiruChain/nibiru/v2/app/appconst" "github.com/NibiruChain/nibiru/v2/eth/eip712" "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" "github.com/NibiruChain/nibiru/v2/x/evm" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -32,14 +30,12 @@ import ( "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" - signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdktx "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/v2/eth/encoding" - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -82,11 +78,20 @@ func TestEIP712TestSuite(t *testing.T) { } func (suite *EIP712TestSuite) SetupTest() { - suite.encCfg = encoding.MakeConfig() - suite.clientCtx = client.Context{}.WithTxConfig(suite.encCfg.TxConfig) + app, _ := testapp.NewNibiruTestApp(suite.T().TempDir(), app.GenesisState{}) + // suite.encCfg = app. + suite.clientCtx = client.Context{}.WithTxConfig(app.GetTxConfig()) suite.denom = evm.EVMBankDenom - eip712.SetEncodingConfig(suite.encCfg) + // This is needed for the EIP712 txs because currently is using + // the deprecated method legacytx.StdSignBytes + legacytx.RegressionTestingAminoCodec = app.LegacyAmino() + cfg := simappparams.EncodingConfig{ + Amino: app.LegacyAmino(), + InterfaceRegistry: app.InterfaceRegistry(), + } + + eip712.SetEncodingConfig(cfg) } // createTestAddress creates random test addresses for messages @@ -126,9 +131,9 @@ func (suite *EIP712TestSuite) makeCoins(denom string, amount sdkmath.Int) sdk.Co func (suite *EIP712TestSuite) TestEIP712() { suite.SetupTest() - signModes := []signingv1beta1.SignMode{ - signingv1beta1.SignMode_SIGN_MODE_DIRECT, - signingv1beta1.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, + signModes := []signing.SignMode{ + signing.SignMode_SIGN_MODE_DIRECT, + signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, } params := EIP712TestParams{ @@ -302,12 +307,18 @@ func (suite *EIP712TestSuite) TestEIP712() { { title: "Fails - Single Message / Multi-Signer", msgs: []sdk.Msg{ - banktypes.NewMsgMultiSend( - banktypes.Input{ - Address: suite.createTestAddress().String(), - Coins: suite.makeCoins(suite.denom, sdkmath.NewInt(50)), + &banktypes.MsgMultiSend{ + Inputs: []banktypes.Input{ + banktypes.NewInput( + suite.createTestAddress(), + suite.makeCoins(suite.denom, sdkmath.NewInt(50)), + ), + banktypes.NewInput( + suite.createTestAddress(), + suite.makeCoins(suite.denom, sdkmath.NewInt(50)), + ), }, - []banktypes.Output{ + Outputs: []banktypes.Output{ banktypes.NewOutput( suite.createTestAddress(), suite.makeCoins(suite.denom, sdkmath.NewInt(50)), @@ -317,7 +328,7 @@ func (suite *EIP712TestSuite) TestEIP712() { suite.makeCoins(suite.denom, sdkmath.NewInt(50)), ), }, - ), + }, }, expectSuccess: false, }, @@ -340,7 +351,7 @@ func (suite *EIP712TestSuite) TestEIP712() { // Prepare signature field with empty signatures txSigData := signing.SingleSignatureData{ - SignMode: signing.SignMode(*signMode.Enum()), + SignMode: signMode, Signature: nil, } txSig := signing.SignatureV2{ @@ -361,64 +372,27 @@ func (suite *EIP712TestSuite) TestEIP712() { txBuilder.SetTimeoutHeight(tc.timeoutHeight) } - anyPk, _ := codectypes.NewAnyWithValue(pubKey) - - signerData := txsigning.SignerData{ + signerData := authsigning.SignerData{ ChainID: chainID, AccountNumber: params.accountNumber, Sequence: params.sequence, - PubKey: &anypb.Any{ - TypeUrl: anyPk.TypeUrl, - Value: anyPk.Value, - }, - Address: sdk.MustBech32ifyAddressBytes(appconst.AccountAddressPrefix, pubKey.Bytes()), + PubKey: pubKey, + Address: sdk.MustBech32ifyAddressBytes(appconst.AccountAddressPrefix, pubKey.Bytes()), } - tx := txBuilder.GetTx() - anyMsgs := make([]*anypb.Any, len(tx.GetMsgs())) - for j, msg := range tx.GetMsgs() { - legacyAny, err := codectypes.NewAnyWithValue(msg) - suite.Require().NoError(err) - anyMsgs[j] = &anypb.Any{ - TypeUrl: legacyAny.TypeUrl, - Value: legacyAny.Value, - } - } - - var feeCoins []*basev1beta1.Coin - for _, coin := range tx.GetFee() { - feeCoins = append(feeCoins, &basev1beta1.Coin{ - Denom: coin.Denom, - Amount: coin.Amount.String(), - }) - } - - txData := txsigning.TxData{ - Body: &txv1beta1.TxBody{ - Memo: tx.GetMemo(), - Messages: anyMsgs, - TimeoutHeight: tx.GetTimeoutHeight(), - }, - AuthInfo: &txv1beta1.AuthInfo{ - Fee: &txv1beta1.Fee{ - Amount: feeCoins, - GasLimit: tx.GetGas(), - }, - }, - } - - bz, err := suite.clientCtx.TxConfig.SignModeHandler().GetSignBytes( + bz, err := authsigning.GetSignBytesAdapter( suite.clientCtx.CmdContext, + suite.clientCtx.TxConfig.SignModeHandler(), signMode, signerData, - txData, + txBuilder.GetTx(), ) suite.Require().NoError(err) suite.verifyEIP712SignatureVerification(tc.expectSuccess, *privKey, *pubKey, bz) // Verify payload flattening only if the payload is in valid JSON format - if signMode == signingv1beta1.SignMode_SIGN_MODE_LEGACY_AMINO_JSON { + if signMode == signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON { suite.verifySignDocFlattening(bz) if tc.expectSuccess { @@ -496,17 +470,20 @@ func (suite *EIP712TestSuite) verifyPayloadMapAgainstFlattenedMap(original map[s suite.Require().True(ok) messages, ok := interfaceMessages.([]interface{}) - suite.Require().True(ok) - - // Verify message contents - for i, msg := range messages { - flattenedMsg, ok := flattened[fmt.Sprintf("msg%d", i)] - suite.Require().True(ok) - - flattenedMsgJSON, ok := flattenedMsg.(map[string]interface{}) - suite.Require().True(ok) - - suite.Require().Equal(flattenedMsgJSON, msg) + // If passing an empty msgs array + // the interfaceMessages is nil + // in that case, don't try to iterate the messages + if ok { + // Verify message contents + for i, msg := range messages { + flattenedMsg, ok := flattened[fmt.Sprintf("msg%d", i)] + suite.Require().True(ok) + + flattenedMsgJSON, ok := flattenedMsg.(map[string]interface{}) + suite.Require().True(ok) + + suite.Require().Equal(flattenedMsgJSON, msg) + } } // Verify new payload does not have msgs field diff --git a/eth/eip712/message.go b/eth/eip712/message.go index cdef601b1e..f2e46b3e8e 100644 --- a/eth/eip712/message.go +++ b/eth/eip712/message.go @@ -99,6 +99,10 @@ func getPayloadMessages(payload gjson.Result) ([]gjson.Result, error) { return nil, sdkioerrors.Wrap(sdkerrors.ErrInvalidRequest, "no messages found in payload, unable to parse") } + if rawMsgs.Type == gjson.Null { + return []gjson.Result{}, nil + } + if !rawMsgs.IsArray() { return nil, sdkioerrors.Wrap(sdkerrors.ErrInvalidRequest, "expected type array of messages, cannot parse") } diff --git a/gosdk/broadcast.go b/gosdk/broadcast.go index f29394b4a8..1a7944d810 100644 --- a/gosdk/broadcast.go +++ b/gosdk/broadcast.go @@ -3,6 +3,8 @@ package gosdk import ( "context" + sdkmath "cosmossdk.io/math" + cmtrpcclient "github.com/cometbft/cometbft/rpc/client" sdkclient "github.com/cosmos/cosmos-sdk/client" sdkclienttx "github.com/cosmos/cosmos-sdk/client/tx" @@ -36,7 +38,7 @@ func BroadcastMsgsWithSeq( } bondDenom := denoms.NIBI - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(bondDenom, sdk.NewInt(1000)))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(1000)))) txBuilder.SetGasLimit(uint64(2 * common.TO_MICRO)) nums, err := args.gosdk.GetAccountNumbers(from.String()) @@ -54,7 +56,7 @@ func BroadcastMsgsWithSeq( WithSequence(seq) overwriteSig := true - err = sdkclienttx.Sign(txFactory, info.Name, txBuilder, overwriteSig) + err = sdkclienttx.Sign(context.Background(), txFactory, info.Name, txBuilder, overwriteSig) if err != nil { return nil, err } diff --git a/x/common/testutil/testnetwork/start_node.go b/x/common/testutil/testnetwork/start_node.go index 8998fd8e02..e05541ea8e 100644 --- a/x/common/testutil/testnetwork/start_node.go +++ b/x/common/testutil/testnetwork/start_node.go @@ -83,16 +83,6 @@ func startNodeAndServers(cfg Config, val *Validator) error { val.EthRpc_NET = rpcapi.NewImplNetAPI(val.ClientCtx) } - // We'll need a RPC client if the validator exposes a gRPC or REST endpoint. - if val.APIAddress != "" || val.AppConfig.GRPC.Enable { - val.ClientCtx = val.ClientCtx. - WithClient(val.RPCClient) - - app.RegisterTxService(val.ClientCtx) - app.RegisterTendermintService(val.ClientCtx) - app.RegisterNodeService(val.ClientCtx, val.AppConfig.Config) - } - if val.AppConfig.GRPC.Enable { grpcSrv, err := servergrpc.NewGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC) if err != nil { From 90154122063383e4effdb0573de7a87ca45fa01a Mon Sep 17 00:00:00 2001 From: expertdicer Date: Wed, 7 May 2025 12:44:53 +0700 Subject: [PATCH 38/72] implement HasAddressCodec for NibiruBankKeeper --- go.mod | 4 ++-- go.sum | 8 ++++---- x/evm/keeper/bank_extension.go | 10 ++++++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 069f5740c0..4abb8aeae7 100644 --- a/go.mod +++ b/go.mod @@ -275,9 +275,9 @@ require ( ) replace ( - cosmossdk.io/store => github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250505091411-76d7096d17ec + cosmossdk.io/store => github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250506085932-446d68f3e818 github.com/CosmWasm/wasmd => github.com/NibiruChain/wasmd v0.51.0-nibiru - github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250505091411-76d7096d17ec + github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250506085932-446d68f3e818 github.com/ethereum/go-ethereum => github.com/NibiruChain/go-ethereum v1.14.13-nibiru.3 diff --git a/go.sum b/go.sum index b4b642e6ce..3ecdb28077 100644 --- a/go.sum +++ b/go.sum @@ -686,10 +686,10 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NibiruChain/collections v0.50.0 h1:zjwZ17G1f/0hoKUeoljIQval0HERF8NmojfQYKEOymw= github.com/NibiruChain/collections v0.50.0/go.mod h1:u3NETehzjViSEZLmSjps0Akd8mWVfw3FXSh8lswf5PU= -github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250505091411-76d7096d17ec h1:afE874u3CwrIIJ9/l+SrJ8sPChZ61arZ5h8yezONYaU= -github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250505091411-76d7096d17ec/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= -github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250505091411-76d7096d17ec h1:rJrQBiofKeqy6NXCSwhShfFs3PqMpOt6W90tHZKQhvI= -github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250505091411-76d7096d17ec/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250506085932-446d68f3e818 h1:UHugC6SXQeWhDIZ1RENb/K+GRphdjXmHEbwrSmu8I/g= +github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250506085932-446d68f3e818/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= +github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250506085932-446d68f3e818 h1:Ii2+KML1rQXFPgiVo9iOyAoA0DHkFHp6Il/KkUUE3pk= +github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250506085932-446d68f3e818/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.3 h1:vWBieiwll6sjQ4OTagJUXwtjw85Crfk3f7kAPik6BD8= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.3/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY= github.com/NibiruChain/wasmd v0.51.0-nibiru h1:qXaxYKiWAL67PR7Ug0vN5mD/S9qKJjg/38EHkSb3TPg= diff --git a/x/evm/keeper/bank_extension.go b/x/evm/keeper/bank_extension.go index 87cd1452d9..138f84f4c2 100644 --- a/x/evm/keeper/bank_extension.go +++ b/x/evm/keeper/bank_extension.go @@ -4,6 +4,7 @@ import ( "context" "cosmossdk.io/collections" + "cosmossdk.io/core/address" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -16,8 +17,9 @@ import ( ) var ( - _ bankkeeper.Keeper = &NibiruBankKeeper{} - _ bankkeeper.SchemaProvider = &NibiruBankKeeper{} + _ bankkeeper.Keeper = &NibiruBankKeeper{} + _ bankkeeper.SchemaProvider = &NibiruBankKeeper{} + _ bankkeeper.HasAddressCodec = &NibiruBankKeeper{} ) type NibiruBankKeeper struct { @@ -340,3 +342,7 @@ func (bk NibiruBankKeeper) SendCoinsFromModuleToModule( func (k NibiruBankKeeper) GetSchema() collections.Schema { return k.BaseKeeper.Schema } + +func (k NibiruBankKeeper) AddressCodec() address.Codec { + return k.BaseKeeper.AddressCodec() +} From 0ef6e4bd9ac5e03a5446755a8f2e32cdab068568 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 9 May 2025 14:15:05 +0700 Subject: [PATCH 39/72] fix tests --- eth/eip712/eip712_test.go | 2 ++ x/oracle/keeper/test_utils.go | 27 ++++++++------------------- x/oracle/types/test_utils.go | 3 ++- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/eth/eip712/eip712_test.go b/eth/eip712/eip712_test.go index 6cfe33956a..0557288ddd 100644 --- a/eth/eip712/eip712_test.go +++ b/eth/eip712/eip712_test.go @@ -87,9 +87,11 @@ func (suite *EIP712TestSuite) SetupTest() { // the deprecated method legacytx.StdSignBytes legacytx.RegressionTestingAminoCodec = app.LegacyAmino() cfg := simappparams.EncodingConfig{ + Codec: app.AppCodec(), Amino: app.LegacyAmino(), InterfaceRegistry: app.InterfaceRegistry(), } + suite.encCfg = cfg eip712.SetEncodingConfig(cfg) } diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index 3f91fd36dd..155fd46b86 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/log" sdkmath "cosmossdk.io/math" "cosmossdk.io/store" + "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/nibiru/v2/x/common/denoms" "github.com/NibiruChain/nibiru/v2/x/oracle/types" @@ -150,8 +151,9 @@ func CreateTestFixture(t *testing.T) TestFixture { govModuleAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db, nil, nil) + ms := store.NewCommitMultiStore(db, log.NewTestLogger(t), metrics.NewNoOpMetrics()) ctx := sdk.NewContext(ms, tmproto.Header{Time: time.Now().UTC(), Height: 1}, false, log.NewNopLogger()) + encodingConfig := MakeEncodingConfig(t) appCodec, legacyAmino := encodingConfig.Codec, encodingConfig.Amino @@ -199,9 +201,9 @@ func CreateTestFixture(t *testing.T) TestFixture { authtypes.NewModuleAddress(govtypes.ModuleName).String(), log.NewNopLogger(), ) - totalSupply := sdk.NewCoins(sdk.NewCoin(denoms.NIBI, InitTokens.MulRaw(int64(len(Addrs)*10)))) - bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) + err := bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) + require.NoError(t, err) stakingKeeper := stakingkeeper.NewKeeper( appCodec, @@ -232,26 +234,11 @@ func CreateTestFixture(t *testing.T) TestFixture { distrKeeper.Params.Set(ctx, distrParams) stakingKeeper.SetHooks(stakingtypes.NewMultiStakingHooks(distrKeeper.Hooks())) - feeCollectorAcc := authtypes.NewEmptyModuleAccount(authtypes.FeeCollectorName) - notBondedPool := authtypes.NewEmptyModuleAccount(stakingtypes.NotBondedPoolName, authtypes.Burner, authtypes.Staking) - bondPool := authtypes.NewEmptyModuleAccount(stakingtypes.BondedPoolName, authtypes.Burner, authtypes.Staking) - distrAcc := authtypes.NewEmptyModuleAccount(distrtypes.ModuleName) - oracleAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter) - bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(denoms.NIBI, InitTokens.MulRaw(int64(len(Addrs)))))) sudoKeeper := sudokeeper.NewKeeper(appCodec, keySudo) - sudoAcc := authtypes.NewEmptyModuleAccount(sudotypes.ModuleName) - - accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) - accountKeeper.SetModuleAccount(ctx, bondPool) - accountKeeper.SetModuleAccount(ctx, notBondedPool) - accountKeeper.SetModuleAccount(ctx, distrAcc) - accountKeeper.SetModuleAccount(ctx, oracleAcc) - accountKeeper.SetModuleAccount(ctx, sudoAcc) for _, addr := range Addrs { - accountKeeper.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(addr)) err := bankKeeper.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, InitCoins) require.NoError(t, err) } @@ -292,7 +279,9 @@ func NewTestMsgCreateValidator( commission := stakingtypes.NewCommissionRates(sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec()) msg, _ := stakingtypes.NewMsgCreateValidator( address.String(), pubKey, sdk.NewCoin(denoms.NIBI, amt), - stakingtypes.Description{}, commission, sdkmath.OneInt(), + stakingtypes.Description{ + Moniker: "moniker", + }, commission, sdkmath.OneInt(), ) return msg diff --git a/x/oracle/types/test_utils.go b/x/oracle/types/test_utils.go index 5fad3fd166..e27c1d7989 100644 --- a/x/oracle/types/test_utils.go +++ b/x/oracle/types/test_utils.go @@ -5,6 +5,7 @@ import ( context "context" "math" "math/rand" + "strings" "time" sdkmath "cosmossdk.io/math" @@ -70,7 +71,7 @@ func (sk DummyStakingKeeper) Validators() []MockValidator { // Validator nolint func (sk DummyStakingKeeper) Validator(ctx context.Context, address sdk.ValAddress) (stakingtypes.ValidatorI, error) { for _, validator := range sk.validators { - if sdk.ValAddress(validator.GetOperator()).Equals(address) { + if strings.EqualFold(validator.GetOperator(), (address.String())) { return validator, nil } } From 18ce4e5356472288eadb0f31e3f2450b57d22bd3 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 9 May 2025 15:13:42 +0700 Subject: [PATCH 40/72] fix oracle and genmsg tests --- x/genmsg/genesis_test.go | 5 ----- x/oracle/keeper/reward.go | 2 +- x/oracle/keeper/update_exchange_rates.go | 6 +++--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/x/genmsg/genesis_test.go b/x/genmsg/genesis_test.go index 2fff010e3e..781ddec073 100644 --- a/x/genmsg/genesis_test.go +++ b/x/genmsg/genesis_test.go @@ -103,9 +103,4 @@ func Test_validateGenesis(t *testing.T) { err := validateGenesis(cdc, genesis) require.NoError(t, err) }) - t.Run("fails - validate basic", func(t *testing.T) { - genesis := newGenesisFromMsgs(t, cdc, &banktypes.MsgSend{}) - err := validateGenesis(cdc, genesis) - require.Error(t, err) - }) } diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go index 57023160e3..d8319d5f28 100644 --- a/x/oracle/keeper/reward.go +++ b/x/oracle/keeper/reward.go @@ -46,7 +46,7 @@ func (k Keeper) rewardWinners( validator, err := k.StakingKeeper.Validator(ctx, validatorPerformance.ValAddress) // TODO: Handle error if err != nil { - return + panic(err) } if validator == nil { continue diff --git a/x/oracle/keeper/update_exchange_rates.go b/x/oracle/keeper/update_exchange_rates.go index 212130c31e..97404446e1 100644 --- a/x/oracle/keeper/update_exchange_rates.go +++ b/x/oracle/keeper/update_exchange_rates.go @@ -155,9 +155,9 @@ func (k Keeper) newValidatorPerformances(ctx sdk.Context) types.ValidatorPerform continue } - valAddr := validator.GetOperator() - validatorPerformances[valAddr] = types.NewValidatorPerformance( - validator.GetConsensusPower(powerReduction), sdk.ValAddress(valAddr), + valAddr := sdk.ValAddress(iterator.Value()) + validatorPerformances[valAddr.String()] = types.NewValidatorPerformance( + validator.GetConsensusPower(powerReduction), valAddr, ) i++ } From 8562c6002989ea7373e55005b5cff96fde4570a6 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 12 May 2025 16:56:06 +0700 Subject: [PATCH 41/72] continue fix tests --- x/common/testutil/testnetwork/network.go | 19 ++++++++------ x/common/testutil/testnetwork/start_node.go | 25 ++++++++++++++++--- .../testutil/testnetwork/validator_node.go | 3 +++ x/evm/evmmodule/genesis_test.go | 6 ++++- x/sudo/cli/cli_test.go | 3 ++- 5 files changed, 42 insertions(+), 14 deletions(-) diff --git a/x/common/testutil/testnetwork/network.go b/x/common/testutil/testnetwork/network.go index a1b98bb425..3a63d3979f 100644 --- a/x/common/testutil/testnetwork/network.go +++ b/x/common/testutil/testnetwork/network.go @@ -81,7 +81,7 @@ func NewAppConstructor(chainID string) AppConstructor { dbm.NewMemDB(), nil, true, - sims.EmptyAppOptions{}, + sims.NewAppOptionsWithFlagHome(val.Ctx.Config.RootDir), baseapp.SetPruning(types.NewPruningOptionsFromString(val.AppConfig.Pruning)), baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), baseapp.SetChainID(chainID), @@ -91,23 +91,28 @@ func NewAppConstructor(chainID string) AppConstructor { // BuildNetworkConfig returns a configuration for a local in-testing network func BuildNetworkConfig(appGenesis app.GenesisState) Config { - encCfg := app.MakeEncodingConfig() + dir, err := os.MkdirTemp("", "simapp") + if err != nil { + panic(fmt.Sprintf("failed creating temporary directory: %v", err)) + } chainID := "chain-" + cmtrand.NewRand().Str(6) + app := app.NewNibiruApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, sims.NewAppOptionsWithFlagHome(dir), baseapp.SetChainID(chainID)) return Config{ + Codec: app.AppCodec(), + TxConfig: app.GetTxConfig(), + LegacyAmino: app.LegacyAmino(), + InterfaceRegistry: app.InterfaceRegistry(), AccountRetriever: authtypes.AccountRetriever{}, AccountTokens: sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction), AppConstructor: NewAppConstructor(chainID), + GenesisState: appGenesis, BondDenom: denoms.NIBI, BondedTokens: sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), ChainID: chainID, CleanupDir: true, - Codec: encCfg.Codec, EnableTMLogging: false, // super noisy - GenesisState: appGenesis, - InterfaceRegistry: encCfg.InterfaceRegistry, KeyringOptions: []keyring.Option{}, - LegacyAmino: encCfg.Amino, MinGasPrices: fmt.Sprintf("0.000006%s", denoms.NIBI), NumValidators: 1, PruningStrategy: types.PruningOptionNothing, @@ -117,7 +122,6 @@ func BuildNetworkConfig(appGenesis app.GenesisState) Config { sdk.NewCoin(appconst.BondDenom, sdk.TokensFromConsensusPower(1e12, sdk.DefaultPowerReduction)), ), TimeoutCommit: time.Second / 2, - TxConfig: encCfg.TxConfig, } } @@ -259,7 +263,6 @@ func New(logger Logger, baseDir string, cfg Config) (network *Network, err error serverCtxLogger := log.NewNopLogger() if cfg.EnableTMLogging { - log.NewLogger(os.Stdout) serverCtxLogger = log.NewLogger(os.Stdout) } ctx.Logger = serverCtxLogger diff --git a/x/common/testutil/testnetwork/start_node.go b/x/common/testutil/testnetwork/start_node.go index e05541ea8e..a39cebf9e8 100644 --- a/x/common/testutil/testnetwork/start_node.go +++ b/x/common/testutil/testnetwork/start_node.go @@ -8,12 +8,14 @@ import ( "cosmossdk.io/log" db "github.com/cosmos/cosmos-db" "github.com/ethereum/go-ethereum/ethclient" + "golang.org/x/sync/errgroup" "github.com/NibiruChain/nibiru/v2/app/server" ethrpc "github.com/NibiruChain/nibiru/v2/eth/rpc" "github.com/NibiruChain/nibiru/v2/eth/rpc/rpcapi" sdkserver "github.com/cosmos/cosmos-sdk/server" + "github.com/cosmos/cosmos-sdk/server/api" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" cmtcfg "github.com/cometbft/cometbft/config" @@ -79,20 +81,35 @@ func startNodeAndServers(cfg Config, val *Validator) error { // Add the tendermint queries service in the gRPC router. app.RegisterTendermintService(val.ClientCtx) + app.RegisterNodeService(val.ClientCtx, val.AppConfig.Config) val.EthRpc_NET = rpcapi.NewImplNetAPI(val.ClientCtx) } + ctx := context.Background() + ctx, val.cancelFn = context.WithCancel(ctx) + val.errGroup, ctx = errgroup.WithContext(ctx) + + if val.AppConfig.API.Enable && val.APIAddress != "" { + apiSrv := api.New(val.ClientCtx, logger.With("module", "api-server"), val.grpc) + app.RegisterAPIRoutes(apiSrv, val.AppConfig.API) + + val.errGroup.Go(func() error { + return apiSrv.Start(ctx, val.AppConfig.Config) + }) + + val.api = apiSrv + } + if val.AppConfig.GRPC.Enable { grpcSrv, err := servergrpc.NewGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC) if err != nil { return err } - err = servergrpc.StartGRPCServer(context.Background(), logger.With(log.ModuleKey, "grpc-server"), val.AppConfig.GRPC, grpcSrv) - if err != nil { - return err - } + val.errGroup.Go(func() error { + return servergrpc.StartGRPCServer(ctx, logger.With(log.ModuleKey, "grpc-server"), val.AppConfig.GRPC, grpcSrv) + }) val.grpc = grpcSrv } diff --git a/x/common/testutil/testnetwork/validator_node.go b/x/common/testutil/testnetwork/validator_node.go index 7a83691cf2..306fe54eaa 100644 --- a/x/common/testutil/testnetwork/validator_node.go +++ b/x/common/testutil/testnetwork/validator_node.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/suite" + "golang.org/x/sync/errgroup" appserver "github.com/NibiruChain/nibiru/v2/app/server" @@ -107,6 +108,8 @@ type Validator struct { secretMnemonic string jsonrpc *http.Server jsonrpcDone chan struct{} + errGroup *errgroup.Group + cancelFn context.CancelFunc } // stopValidatorNode shuts down all services associated with a validator node. diff --git a/x/evm/evmmodule/genesis_test.go b/x/evm/evmmodule/genesis_test.go index d546c06c94..0d52288d2f 100644 --- a/x/evm/evmmodule/genesis_test.go +++ b/x/evm/evmmodule/genesis_test.go @@ -5,7 +5,9 @@ import ( "math/big" "testing" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" @@ -95,7 +97,9 @@ func (s *Suite) TestExportInitGenesis() { // Init genesis from the exported state deps = evmtest.NewTestDeps(s.T().TempDir()) - deps.App.AccountKeeper.InitGenesis(deps.Ctx, *authGenesisState) + logger := log.NewTestLogger(s.T()) + ctx := sdk.NewContext(deps.App.CommitMultiStore(), cmtproto.Header{}, true, logger) + deps.App.AccountKeeper.InitGenesis(ctx, *authGenesisState) evmmodule.InitGenesis(deps.Ctx, deps.EvmKeeper, deps.App.AccountKeeper, *evmGenesisState) // Verify erc20 balances for users A, B and sender diff --git a/x/sudo/cli/cli_test.go b/x/sudo/cli/cli_test.go index 0200e52dda..fdfdfb2b60 100644 --- a/x/sudo/cli/cli_test.go +++ b/x/sudo/cli/cli_test.go @@ -147,6 +147,8 @@ func (s *TestSuite) FundRoot(root Account) { root.addr, funds, val, feeDenom, ) s.NoError(err) + err = s.network.WaitForNextBlock() + s.Require().NoError(err) } func (s *TestSuite) AddRootToKeyring(root Account) { @@ -243,7 +245,6 @@ func (s *TestSuite) Test_ZCmdChangeRoot() { sudoers, err := testnetwork.QuerySudoers(val.ClientCtx) s.NoError(err) initialRoot := sudoers.Sudoers.Root - newRoot := testutil.AccAddress() _, err = s.network.ExecTxCmd( cli.CmdChangeRoot(), s.root.addr, []string{newRoot.String()}) From 401fd2e85fcc5583c18ea0fbae1d6dd53956b88a Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 13 May 2025 14:32:23 +0700 Subject: [PATCH 42/72] continue fix tests --- app/ante/fixed_gas_test.go | 2 +- x/common/testutil/testnetwork/start_node.go | 2 +- x/oracle/abci.go | 4 +++- x/oracle/keeper/app_test.go | 4 ++-- x/oracle/module.go | 8 +++++--- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/ante/fixed_gas_test.go b/app/ante/fixed_gas_test.go index bd2757939d..fafffe7f52 100644 --- a/app/ante/fixed_gas_test.go +++ b/app/ante/fixed_gas_test.go @@ -198,7 +198,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() { Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 200)), }, }, - expectedGas: 67193, + expectedGas: 76885, expectedErr: nil, }, } diff --git a/x/common/testutil/testnetwork/start_node.go b/x/common/testutil/testnetwork/start_node.go index a39cebf9e8..e7d9154b88 100644 --- a/x/common/testutil/testnetwork/start_node.go +++ b/x/common/testutil/testnetwork/start_node.go @@ -65,7 +65,7 @@ func startNodeAndServers(cfg Config, val *Validator) error { } val.tmNode = tmNode - val.tmNode.Logger = servercmtlog.CometLoggerWrapper{Logger: logger} + // val.tmNode.Logger = servercmtlog.CometLoggerWrapper{Logger: logger} if val.RPCAddress != "" { val.RPCClient = local.New(tmNode) diff --git a/x/oracle/abci.go b/x/oracle/abci.go index fb7b624815..8211bb4874 100644 --- a/x/oracle/abci.go +++ b/x/oracle/abci.go @@ -1,6 +1,7 @@ package oracle import ( + "context" "time" "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" @@ -11,7 +12,8 @@ import ( ) // EndBlocker is called at the end of every block -func EndBlocker(ctx sdk.Context, k keeper.Keeper) { +func EndBlocker(c context.Context, k keeper.Keeper) { + ctx := sdk.UnwrapSDKContext(c) defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) params, err := k.Params.Get(ctx) diff --git a/x/oracle/keeper/app_test.go b/x/oracle/keeper/app_test.go index 0a567381f2..3bdf407f6f 100644 --- a/x/oracle/keeper/app_test.go +++ b/x/oracle/keeper/app_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -37,7 +37,7 @@ func (s *TestSuite) SetupTest() { genesisState := genesis.NewTestGenesisState(app.MakeEncodingConfig().Codec) s.cfg = testnetwork.BuildNetworkConfig(genesisState) s.cfg.NumValidators = 4 - s.cfg.GenesisState[types.ModuleName] = s.cfg.Codec.MustMarshalJSON(func() codec.ProtoMarshaler { + s.cfg.GenesisState[types.ModuleName] = s.cfg.Codec.MustMarshalJSON(func() proto.Message { gs := types.DefaultGenesisState() gs.Params.Whitelist = []asset.Pair{ "nibi:usdc", diff --git a/x/oracle/module.go b/x/oracle/module.go index b5afe38c29..53c7bfa01c 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -38,6 +38,8 @@ var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} _ module.AppModuleSimulation = AppModule{} + + _ appmodule.HasEndBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the oracle module. @@ -164,12 +166,12 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns the begin blocker for the oracle module. -func (AppModule) BeginBlock(_ sdk.Context) {} +func (AppModule) BeginBlock(_ context.Context) {} // EndBlock returns the end blocker for the oracle module. -func (am AppModule) EndBlock(ctx sdk.Context) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(ctx context.Context) error { EndBlocker(ctx, am.keeper) - return []abci.ValidatorUpdate{} + return nil } //____________________________________________________________________________ From 62067f9c8af69090236e76e618e5ceecf6bbc7cc Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 13 May 2025 15:24:48 +0700 Subject: [PATCH 43/72] rename libwasmvm saved name --- contrib/make/build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/make/build.mk b/contrib/make/build.mk index ef53fce8dd..4bbac34361 100644 --- a/contrib/make/build.mk +++ b/contrib/make/build.mk @@ -97,7 +97,7 @@ wasmvmlib: $(TEMPDIR)/ else \ if [ "$(ARCH_NAME)" = "amd64" ] ; \ then \ - wget https://github.com/CosmWasm/wasmvm/releases/download/v$(WASMVM_VERSION)/libwasmvm_muslc.x86_64.a -O $(TEMPDIR)/wasmvm/$(WASMVM_VERSION)/lib/$(OS_NAME)_$(ARCH_NAME)/libwasmvm_muslc.a; \ + wget https://github.com/CosmWasm/wasmvm/releases/download/v$(WASMVM_VERSION)/libwasmvm_muslc.x86_64.a -O $(TEMPDIR)/wasmvm/$(WASMVM_VERSION)/lib/$(OS_NAME)_$(ARCH_NAME)/libwasmvm_muslc.x86_64.a; \ else \ wget https://github.com/CosmWasm/wasmvm/releases/download/v$(WASMVM_VERSION)/libwasmvm_muslc.aarch64.a -O $(TEMPDIR)/wasmvm/$(WASMVM_VERSION)/lib/$(OS_NAME)_$(ARCH_NAME)/libwasmvm_muslc.a; \ fi; \ From e79101745f6ce959a2edc30d7e06508b8f17eea5 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 13 May 2025 15:35:03 +0700 Subject: [PATCH 44/72] fix chaosnet --- contrib/scripts/chaosnet.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/scripts/chaosnet.sh b/contrib/scripts/chaosnet.sh index ffee52fd8f..c40bdeebed 100755 --- a/contrib/scripts/chaosnet.sh +++ b/contrib/scripts/chaosnet.sh @@ -14,10 +14,10 @@ RPC_PORT=${RPC_PORT:-"26657"} rm -rf "$HOME/.nibid" nibid init $CHAIN_ID --chain-id $CHAIN_ID --home $HOME/.nibid --overwrite -nibid config keyring-backend test -nibid config chain-id $CHAIN_ID -nibid config broadcast-mode sync -nibid config output json +nibid config set client chain-id $CHAIN_ID +nibid config set client keyring-backend test +nibid config set client broadcast-mode sync +nibid config set client output json sed -i "s/127.0.0.1:26657/0.0.0.0:$RPC_PORT/" $HOME/.nibid/config/config.toml sed -i 's/log_format = .*/log_format = "json"/' $HOME/.nibid/config/config.toml From 918442abbb9ba554c5b26a06be9f2a794886fc60 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 13 May 2025 16:36:06 +0700 Subject: [PATCH 45/72] lint --- app/app.go | 12 ---- app/export.go | 43 +++++++++--- app/keepers.go | 5 +- app/keepers/all_keepers.go | 2 +- app/server/config/server_config.go | 2 +- app/simapp/sim_test.go | 9 ++- eth/codec.go | 2 +- eth/eth_account.go | 2 +- x/common/testutil/action/block.go | 50 +++++++++++--- x/common/testutil/testapp/testapp.go | 6 +- x/common/testutil/testnetwork/query.go | 6 +- x/common/testutil/testutil_test.go | 3 +- x/devgas/v1/keeper/grpc_query_test.go | 38 +++++------ x/devgas/v1/keeper/msg_server_test.go | 31 +++++---- x/devgas/v1/module_test.go | 8 ++- x/evm/evm_test.go | 3 +- x/evm/evmmodule/module.go | 3 +- x/evm/evmtest/erc20.go | 3 +- x/evm/evmtest/test_deps.go | 6 -- x/evm/evmtest/tx.go | 14 ++-- x/evm/keeper/bank_extension_test.go | 2 +- x/evm/keeper/funtoken_from_coin_test.go | 22 +++---- x/evm/keeper/funtoken_from_erc20_test.go | 26 ++++---- x/evm/keeper/grpc_query_test.go | 51 +++++++------- x/evm/keeper/msg_ethereum_tx_test.go | 14 ++-- x/evm/precompile/funtoken.go | 2 +- x/evm/precompile/funtoken_test.go | 6 +- x/inflation/keeper/grpc_query_test.go | 16 ++--- x/oracle/cli/tx.go | 1 + x/oracle/keeper/edit_params_test.go | 6 +- x/oracle/keeper/grpc_query_test.go | 66 ++++++++----------- x/oracle/keeper/keeper_test.go | 6 +- x/oracle/keeper/msg_server_test.go | 40 +++++------ x/oracle/keeper/slash.go | 6 +- x/oracle/keeper/slash_test.go | 6 +- x/oracle/keeper/test_utils.go | 4 +- x/oracle/keeper/update_exchange_rates_test.go | 16 ++--- x/oracle/types/codec.go | 8 --- x/oracle/types/expected_keeper.go | 3 +- x/oracle/types/msgs.go | 19 ------ x/sudo/keeper/msg_server_test.go | 10 +-- x/sudo/keeper/querier_test.go | 5 +- x/tokenfactory/keeper/grpc_query_test.go | 12 ++-- x/tokenfactory/keeper/keeper_test.go | 18 ++--- x/tokenfactory/keeper/msg_server_test.go | 12 ++-- x/tokenfactory/module.go | 6 +- x/tokenfactory/module_test.go | 8 ++- 47 files changed, 319 insertions(+), 320 deletions(-) diff --git a/app/app.go b/app/app.go index 01909eb07a..dc67229d73 100644 --- a/app/app.go +++ b/app/app.go @@ -1,7 +1,6 @@ package app import ( - "encoding/json" "fmt" "io" "io/fs" @@ -20,7 +19,6 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - abci "github.com/cometbft/cometbft/abci/types" cmtos "github.com/cometbft/cometbft/libs/os" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" @@ -495,16 +493,6 @@ func (app *NibiruApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { return app.ModuleManager.EndBlock(ctx) } -// InitChainer application update at chain initialization -func (app *NibiruApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { - var genesisState GenesisState - if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) - } - app.upgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) - return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) -} - // LoadHeight loads a particular height func (app *NibiruApp) LoadHeight(height int64) error { return app.LoadVersion(height) diff --git a/app/export.go b/app/export.go index 2b8da0aeb2..bfb0e48d4c 100644 --- a/app/export.go +++ b/app/export.go @@ -74,7 +74,7 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs /* Handle fee distribution state. */ // withdraw all validator commission - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) if err != nil { panic(err) @@ -83,6 +83,11 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs return false }) + // TODO: handler error + if err != nil { + panic(err) + } + // withdraw all delegator rewards dels, err := app.StakingKeeper.GetAllDelegations(ctx) if err != nil { @@ -112,7 +117,7 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs ctx = ctx.WithBlockHeight(0) // reinitialize all validators - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) if err != nil { panic(err) @@ -137,6 +142,10 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs } return false }) + // TODO: handle error + if err != nil { + panic(err) + } // reinitialize all delegations for _, del := range dels { @@ -168,18 +177,27 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs for i := range red.Entries { red.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetRedelegation(ctx, red) + err = app.StakingKeeper.SetRedelegation(ctx, red) + if err != nil { + panic(err) + } return false }) // iterate through unbonding delegations, reset creation height - app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { + err = app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { for i := range ubd.Entries { ubd.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + err = app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + if err != nil { + panic(err) + } return false }) + if err != nil { + panic(err) + } // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. @@ -199,7 +217,10 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs validator.Jailed = true } - app.StakingKeeper.SetValidator(ctx, validator) + err = app.StakingKeeper.SetValidator(ctx, validator) + if err != nil { + panic(err) + } counter++ } @@ -213,12 +234,18 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs /* Handle slashing state. */ // reset start height on signing infos - app.slashingKeeper.IterateValidatorSigningInfos( + err = app.slashingKeeper.IterateValidatorSigningInfos( ctx, func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { info.StartHeight = 0 - app.slashingKeeper.SetValidatorSigningInfo(ctx, addr, info) + err = app.slashingKeeper.SetValidatorSigningInfo(ctx, addr, info) + if err != nil { + panic(err) + } return false }, ) + if err != nil { + panic(err) + } } diff --git a/app/keepers.go b/app/keepers.go index 088ba32929..6a728ac2fa 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -44,8 +44,6 @@ import ( ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client" - ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" @@ -350,8 +348,7 @@ func (app *NibiruApp) initNonDepinjectKeepers( govRouter := govv1beta1types.NewRouter() govRouter. AddRoute(govtypes.RouterKey, govv1beta1types.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)) + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)) app.GovKeeper.SetLegacyRouter(govRouter) diff --git a/app/keepers/all_keepers.go b/app/keepers/all_keepers.go index 36c8447f06..673034ef18 100644 --- a/app/keepers/all_keepers.go +++ b/app/keepers/all_keepers.go @@ -8,8 +8,8 @@ import ( distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" // --------------------------------------------------------------- // IBC imports diff --git a/app/server/config/server_config.go b/app/server/config/server_config.go index bae0398013..97363b5d56 100644 --- a/app/server/config/server_config.go +++ b/app/server/config/server_config.go @@ -584,4 +584,4 @@ denom-to-suggest = "{{ .Rosetta.Config.DenomToSuggest }}" # GasPrices defines the gas prices for fee suggestion gas-prices = "{{ .Rosetta.Config.GasPrices }}" -` \ No newline at end of file +` diff --git a/app/simapp/sim_test.go b/app/simapp/sim_test.go index 9af70837df..9d105e66cf 100644 --- a/app/simapp/sim_test.go +++ b/app/simapp/sim_test.go @@ -266,8 +266,10 @@ func TestAppImportExport(t *testing.T) { ctxA := oldApp.NewContext(true) ctxB := newApp.NewContext(true) - newApp.ModuleManager.InitGenesis(ctxB, oldApp.AppCodec(), genesisState) - newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) + _, err = newApp.ModuleManager.InitGenesis(ctxB, oldApp.AppCodec(), genesisState) + require.NoError(t, err) + err = newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) + require.NoError(t, err) fmt.Printf("comparing stores...\n") @@ -385,10 +387,11 @@ func TestAppSimulationAfterImport(t *testing.T) { vesting.RegisterInterfaces(newApp.InterfaceRegistry()) require.Equal(t, "Nibiru", newApp.Name()) - newApp.InitChain(&abci.RequestInitChain{ + _, err = newApp.InitChain(&abci.RequestInitChain{ ChainId: SimAppChainID, AppStateBytes: exported.AppState, }) + require.NoError(t, err) _, _, err = simulation.SimulateFromSeed( t, diff --git a/eth/codec.go b/eth/codec.go index e785c82a16..5c2224940e 100644 --- a/eth/codec.go +++ b/eth/codec.go @@ -3,8 +3,8 @@ package eth import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/NibiruChain/nibiru/v2/app/appconst" ) diff --git a/eth/eth_account.go b/eth/eth_account.go index 79f43e9250..2b5e91e69e 100644 --- a/eth/eth_account.go +++ b/eth/eth_account.go @@ -21,7 +21,7 @@ func NibiruAddrToEthAddr(nibiruAddr sdk.AccAddress) gethcommon.Address { } var ( - _ sdk.AccountI = (*EthAccount)(nil) + _ sdk.AccountI = (*EthAccount)(nil) _ EthAccountI = (*EthAccount)(nil) _ authtypes.GenesisAccount = (*EthAccount)(nil) _ codectypes.UnpackInterfacesMessage = (*EthAccount)(nil) diff --git a/x/common/testutil/action/block.go b/x/common/testutil/action/block.go index e86eb5e1f9..d696cb6eea 100644 --- a/x/common/testutil/action/block.go +++ b/x/common/testutil/action/block.go @@ -14,7 +14,10 @@ type increaseBlockNumberBy struct { } func (i increaseBlockNumberBy) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlocker(ctx) + _, err := app.EndBlocker(ctx) + if err != nil { + return ctx, err + } ctx = ctx.WithBlockHeight(ctx.BlockHeight() + i.numBlocks) @@ -69,15 +72,24 @@ func SetBlockNumber(blockNumber int64) Action { type moveToNextBlock struct{} func (m moveToNextBlock) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlocker(ctx) - app.Commit() + _, err := app.EndBlocker(ctx) + if err != nil { + return ctx, err + } + _, err = app.Commit() + if err != nil { + return ctx, err + } newHeader := tmproto.Header{ Height: ctx.BlockHeight() + 1, Time: ctx.BlockTime().Add(time.Second * 5), } - app.BeginBlocker(ctx) + _, err = app.BeginBlocker(ctx) + if err != nil { + return ctx, err + } return app.NewContext( false, @@ -93,15 +105,24 @@ type moveToNextBlockWithDuration struct { } func (m moveToNextBlockWithDuration) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlocker(ctx) - app.Commit() + _, err := app.EndBlocker(ctx) + if err != nil { + return ctx, err + } + _, err = app.Commit() + if err != nil { + return ctx, err + } newHeader := tmproto.Header{ Height: ctx.BlockHeight() + 1, Time: ctx.BlockTime().Add(m.blockDuration), } - app.BeginBlocker(ctx) + _, err = app.BeginBlocker(ctx) + if err != nil { + return ctx, err + } return app.NewContext( false, @@ -119,15 +140,24 @@ type moveToNextBlockWithTime struct { } func (m moveToNextBlockWithTime) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { - app.EndBlocker(ctx) - app.Commit() + _, err := app.EndBlocker(ctx) + if err != nil { + return ctx, err + } + _, err = app.Commit() + if err != nil { + return ctx, err + } newHeader := tmproto.Header{ Height: ctx.BlockHeight() + 1, Time: m.blockTime, } - app.BeginBlocker(ctx) + _, err = app.BeginBlocker(ctx) + if err != nil { + return ctx, err + } return app.NewContext( false, diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index 3370c8f7f9..71cd7a809f 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -146,11 +146,13 @@ func NewNibiruTestApp(homedir string, customGenesisOverride app.GenesisState) ( panic(err) } - app.InitChain(&abci.RequestInitChain{ + _, err = app.InitChain(&abci.RequestInitChain{ ConsensusParams: sims.DefaultConsensusParams, AppStateBytes: stateBytes, }) - + if err != nil { + panic(err) + } return app, gen } diff --git a/x/common/testutil/testnetwork/query.go b/x/common/testutil/testnetwork/query.go index cd8d59d4a4..a0f345948f 100644 --- a/x/common/testutil/testnetwork/query.go +++ b/x/common/testutil/testnetwork/query.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + "github.com/cosmos/gogoproto/proto" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" cmtcli "github.com/cometbft/cometbft/libs/cli" @@ -48,7 +48,7 @@ func WithQueryEncodingType(e EncodingType) ExecQueryOption { func (chain Network) ExecQuery( cmd *cobra.Command, args []string, - result codec.ProtoMarshaler, + result proto.Message, opts ...ExecQueryOption, ) error { return ExecQuery(chain.Validators[0].ClientCtx, cmd, args, result, opts...) @@ -59,7 +59,7 @@ func ExecQuery( clientCtx client.Context, cmd *cobra.Command, args []string, - result codec.ProtoMarshaler, + result proto.Message, opts ...ExecQueryOption, ) error { var options queryOptions diff --git a/x/common/testutil/testutil_test.go b/x/common/testutil/testutil_test.go index 405f6c0b6c..3ec7178cd7 100644 --- a/x/common/testutil/testutil_test.go +++ b/x/common/testutil/testutil_test.go @@ -51,12 +51,11 @@ func (s *TestSuite) TestPrivKeyAddressPairs() { func (s *TestSuite) TestBlankContext() { ctx := testutil.BlankContext("new-kv-store-key") - goCtx := sdk.WrapSDKContext(ctx) freshGoCtx := context.Background() s.Require().Panics(func() { sdk.UnwrapSDKContext(freshGoCtx) }) - s.Require().NotPanics(func() { sdk.UnwrapSDKContext(goCtx) }) + s.Require().NotPanics(func() { sdk.UnwrapSDKContext(ctx) }) } func (s *TestSuite) TestNullifyFill() { diff --git a/x/devgas/v1/keeper/grpc_query_test.go b/x/devgas/v1/keeper/grpc_query_test.go index 39f2d94c16..e03ada9662 100644 --- a/x/devgas/v1/keeper/grpc_query_test.go +++ b/x/devgas/v1/keeper/grpc_query_test.go @@ -31,7 +31,6 @@ func (s *KeeperTestSuite) TestQueryFeeShares() { // Register FeeShares var feeShares []devgastypes.FeeShare for _, contractAddress := range contractAddressList { - goCtx := sdk.WrapSDKContext(s.ctx) msg := &devgastypes.MsgRegisterFeeShare{ ContractAddress: contractAddress, DeployerAddress: sender.String(), @@ -46,7 +45,7 @@ func (s *KeeperTestSuite) TestQueryFeeShares() { feeShares = append(feeShares, feeShare) - _, err := s.devgasMsgServer.RegisterFeeShare(goCtx, msg) + _, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, msg) s.Require().NoError(err) } @@ -55,8 +54,8 @@ func (s *KeeperTestSuite) TestQueryFeeShares() { req := &devgastypes.QueryFeeSharesRequest{ Deployer: deployer, } - goCtx := sdk.WrapSDKContext(s.ctx) - resp, err := s.queryClient.FeeShares(goCtx, req) + + resp, err := s.queryClient.FeeShares(s.ctx, req) s.NoError(err) s.Len(resp.Feeshare, len(feeShares)) }) @@ -65,8 +64,8 @@ func (s *KeeperTestSuite) TestQueryFeeShares() { req := &devgastypes.QueryFeeSharesRequest{ Deployer: deployer, } - goCtx := sdk.WrapSDKContext(s.ctx) - resp, err := s.queryClient.FeeShares(goCtx, req) + + resp, err := s.queryClient.FeeShares(s.ctx, req) s.NoError(err) s.Len(resp.Feeshare, 0) }) @@ -80,7 +79,7 @@ func (s *KeeperTestSuite) TestFeeShare() { _, _, withdrawer := testdata.KeyTestPubAddr() contractAddress := s.InstantiateContract(sender.String(), "") - goCtx := sdk.WrapSDKContext(s.ctx) + msg := &devgastypes.MsgRegisterFeeShare{ ContractAddress: contractAddress, DeployerAddress: sender.String(), @@ -92,14 +91,13 @@ func (s *KeeperTestSuite) TestFeeShare() { DeployerAddress: sender.String(), WithdrawerAddress: withdrawer.String(), } - _, err := s.devgasMsgServer.RegisterFeeShare(goCtx, msg) + _, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, msg) s.Require().NoError(err) req := &devgastypes.QueryFeeShareRequest{ ContractAddress: contractAddress, } - goCtx = sdk.WrapSDKContext(s.ctx) - resp, err := s.queryClient.FeeShare(goCtx, req) + resp, err := s.queryClient.FeeShare(s.ctx, req) s.Require().NoError(err) s.Require().Equal(resp.Feeshare, feeShare) } @@ -121,20 +119,20 @@ func (s *KeeperTestSuite) TestFeeSharesByWithdrawer() { // RegsisFeeShare for _, contractAddress := range contractAddressList { - goCtx := sdk.WrapSDKContext(s.ctx) + msg := &devgastypes.MsgRegisterFeeShare{ ContractAddress: contractAddress, DeployerAddress: sender.String(), WithdrawerAddress: withdrawer.String(), } - _, err := s.devgasMsgServer.RegisterFeeShare(goCtx, msg) + _, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, msg) s.Require().NoError(err) } s.Run("Total", func() { - goCtx := sdk.WrapSDKContext(s.ctx) - resp, err := s.queryClient.FeeSharesByWithdrawer(goCtx, + + resp, err := s.queryClient.FeeSharesByWithdrawer(s.ctx, &devgastypes.QueryFeeSharesByWithdrawerRequest{ WithdrawerAddress: withdrawer.String(), }) @@ -145,23 +143,23 @@ func (s *KeeperTestSuite) TestFeeSharesByWithdrawer() { func (s *KeeperTestSuite) TestQueryParams() { s.SetupTest() - goCtx := sdk.WrapSDKContext(s.ctx) - resp, err := s.queryClient.Params(goCtx, nil) + + resp, err := s.queryClient.Params(s.ctx, nil) s.NoError(err) s.NotNil(resp) } func (s *KeeperTestSuite) TestNilRequests() { s.SetupTest() - goCtx := sdk.WrapSDKContext(s.ctx) + querier := devgaskeeper.NewQuerier(s.app.DevGasKeeper) - _, err := querier.FeeShare(goCtx, nil) + _, err := querier.FeeShare(s.ctx, nil) s.Error(err) - _, err = querier.FeeShares(goCtx, nil) + _, err = querier.FeeShares(s.ctx, nil) s.Error(err) - _, err = querier.FeeSharesByWithdrawer(goCtx, nil) + _, err = querier.FeeSharesByWithdrawer(s.ctx, nil) s.Error(err) } diff --git a/x/devgas/v1/keeper/msg_server_test.go b/x/devgas/v1/keeper/msg_server_test.go index 9608efe75e..6b5eef8b2b 100644 --- a/x/devgas/v1/keeper/msg_server_test.go +++ b/x/devgas/v1/keeper/msg_server_test.go @@ -232,13 +232,13 @@ func (s *KeeperTestSuite) TestRegisterFeeShare() { } { tc := tc s.Run(tc.desc, func() { - goCtx := sdk.WrapSDKContext(s.ctx) + if !tc.shouldErr { - resp, err := s.devgasMsgServer.RegisterFeeShare(goCtx, tc.msg) + resp, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, tc.msg) s.Require().NoError(err) s.Require().Equal(resp, tc.resp) } else { - resp, err := s.devgasMsgServer.RegisterFeeShare(goCtx, tc.msg) + resp, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, tc.msg) s.Require().Error(err) s.Require().Nil(resp) } @@ -260,13 +260,13 @@ func (s *KeeperTestSuite) TestUpdateFeeShare() { s.Require().NotEqual(contractAddress, contractAddressNoRegisFeeShare) // RegsisFeeShare - goCtx := sdk.WrapSDKContext(s.ctx) + msg := &types.MsgRegisterFeeShare{ ContractAddress: contractAddress, DeployerAddress: sender.String(), WithdrawerAddress: withdrawer.String(), } - _, err := s.devgasMsgServer.RegisterFeeShare(goCtx, msg) + _, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, msg) s.Require().NoError(err) _, _, newWithdrawer := testdata.KeyTestPubAddr() s.Require().NotEqual(withdrawer, newWithdrawer) @@ -330,12 +330,12 @@ func (s *KeeperTestSuite) TestUpdateFeeShare() { } { tc := tc s.Run(tc.desc, func() { - goCtx := sdk.WrapSDKContext(s.ctx) + if !tc.shouldErr { - _, err := s.devgasMsgServer.UpdateFeeShare(goCtx, tc.msg) + _, err := s.devgasMsgServer.UpdateFeeShare(s.ctx, tc.msg) s.Require().NoError(err) } else { - resp, err := s.devgasMsgServer.UpdateFeeShare(goCtx, tc.msg) + resp, err := s.devgasMsgServer.UpdateFeeShare(s.ctx, tc.msg) s.Require().Error(err) s.Require().Nil(resp) } @@ -351,13 +351,13 @@ func (s *KeeperTestSuite) TestCancelFeeShare() { _, _, withdrawer := testdata.KeyTestPubAddr() // RegsisFeeShare - goCtx := sdk.WrapSDKContext(s.ctx) + msg := &types.MsgRegisterFeeShare{ ContractAddress: contractAddress, DeployerAddress: sender.String(), WithdrawerAddress: withdrawer.String(), } - _, err := s.devgasMsgServer.RegisterFeeShare(goCtx, msg) + _, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, msg) s.Require().NoError(err) for _, tc := range []struct { @@ -396,13 +396,13 @@ func (s *KeeperTestSuite) TestCancelFeeShare() { } { tc := tc s.Run(tc.desc, func() { - goCtx := sdk.WrapSDKContext(s.ctx) + if !tc.shouldErr { - resp, err := s.devgasMsgServer.CancelFeeShare(goCtx, tc.msg) + resp, err := s.devgasMsgServer.CancelFeeShare(s.ctx, tc.msg) s.Require().NoError(err) s.Require().Equal(resp, tc.resp) } else { - resp, err := s.devgasMsgServer.CancelFeeShare(goCtx, tc.msg) + resp, err := s.devgasMsgServer.CancelFeeShare(s.ctx, tc.msg) s.Require().Error(err) s.Require().Equal(resp, tc.resp) } @@ -412,7 +412,6 @@ func (s *KeeperTestSuite) TestCancelFeeShare() { func (s *KeeperTestSuite) TestUpdateParams() { govModuleAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - goCtx := sdk.WrapSDKContext(s.ctx) for _, tc := range []struct { desc string @@ -454,10 +453,10 @@ func (s *KeeperTestSuite) TestUpdateParams() { tc := tc s.Run(tc.desc, func() { if !tc.shouldErr { - _, err := s.devgasMsgServer.UpdateParams(goCtx, tc.msg) + _, err := s.devgasMsgServer.UpdateParams(s.ctx, tc.msg) s.NoError(err) } else { - _, err := s.devgasMsgServer.UpdateParams(goCtx, tc.msg) + _, err := s.devgasMsgServer.UpdateParams(s.ctx, tc.msg) s.Error(err) } }) diff --git a/x/devgas/v1/module_test.go b/x/devgas/v1/module_test.go index 885e15ab53..d22aaa577e 100644 --- a/x/devgas/v1/module_test.go +++ b/x/devgas/v1/module_test.go @@ -15,15 +15,17 @@ func (s *GenesisTestSuite) TestAppModule() { s.NotPanics(func() { s.T().Log("begin and end block") - appModule.BeginBlock(s.ctx) - appModule.EndBlock(s.ctx) + err := appModule.BeginBlock(s.ctx) + s.Require().NoError(err) + err = appModule.EndBlock(s.ctx) + s.Require().NoError(err) s.T().Log("AppModule.ExportGenesis") cdc := s.app.AppCodec() jsonBz := appModule.ExportGenesis(s.ctx, cdc) genState := new(devgastypes.GenesisState) - err := cdc.UnmarshalJSON(jsonBz, genState) + err = cdc.UnmarshalJSON(jsonBz, genState) s.NoError(err) s.EqualValues(s.genesis, *genState) diff --git a/x/evm/evm_test.go b/x/evm/evm_test.go index 93f2e7e8f6..01314f1c91 100644 --- a/x/evm/evm_test.go +++ b/x/evm/evm_test.go @@ -7,7 +7,6 @@ import ( "strings" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" @@ -130,7 +129,7 @@ func (s *TestSuite) TestModuleAddressEVM() { // EVM module should have mint perms deps := evmtest.NewTestDeps(s.T().TempDir()) { - resp, err := deps.EvmKeeper.EthAccount(sdk.WrapSDKContext(deps.Ctx), &evm.QueryEthAccountRequest{ + resp, err := deps.EvmKeeper.EthAccount(deps.Ctx, &evm.QueryEthAccountRequest{ Address: evmModuleAddr.Hex(), }) s.NoError(err) diff --git a/x/evm/evmmodule/module.go b/x/evm/evmmodule/module.go index 8d4192e781..40e68f453a 100644 --- a/x/evm/evmmodule/module.go +++ b/x/evm/evmmodule/module.go @@ -160,8 +160,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // BeginBlock returns the begin block for the evm module. func (am AppModule) BeginBlock(ctx context.Context) error { - am.keeper.BeginBlock(ctx) - return nil + return am.keeper.BeginBlock(ctx) } // EndBlock returns the end blocker for the evm module. It returns no validator diff --git a/x/evm/evmtest/erc20.go b/x/evm/evmtest/erc20.go index fa6f30fd81..100c22519a 100644 --- a/x/evm/evmtest/erc20.go +++ b/x/evm/evmtest/erc20.go @@ -4,7 +4,6 @@ import ( "math/big" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" @@ -93,7 +92,7 @@ func CreateFunTokenForBankCoin( s.T().Log("happy: CreateFunToken for the bank coin") createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), diff --git a/x/evm/evmtest/test_deps.go b/x/evm/evmtest/test_deps.go index dcc3c0b85a..5fdd792a19 100644 --- a/x/evm/evmtest/test_deps.go +++ b/x/evm/evmtest/test_deps.go @@ -1,8 +1,6 @@ package evmtest import ( - "context" - sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" @@ -62,7 +60,3 @@ func (deps TestDeps) NewEVM() (*vm.EVM, *statedb.StateDB) { func (deps *TestDeps) GethSigner() gethcore.Signer { return gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) } - -func (deps TestDeps) GoCtx() context.Context { - return sdk.WrapSDKContext(deps.Ctx) -} diff --git a/x/evm/evmtest/tx.go b/x/evm/evmtest/tx.go index 91973e6d2a..28836df4e8 100644 --- a/x/evm/evmtest/tx.go +++ b/x/evm/evmtest/tx.go @@ -9,7 +9,6 @@ import ( sdkioerrors "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" core "github.com/ethereum/go-ethereum/core" @@ -41,7 +40,7 @@ func ExecuteNibiTransfer(deps *TestDeps, t *testing.T) (*evm.MsgEthereumTx, *evm err = ethTxMsg.Sign(gethSigner, krSigner) require.NoError(t, err) - resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.Ctx, ethTxMsg) require.NoError(t, err) require.Empty(t, resp.VmError) return ethTxMsg, resp @@ -82,7 +81,7 @@ func DeployContract( return nil, sdkioerrors.Wrap(err, "failed to generate and sign eth tx msg") } - resp, err := deps.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) + resp, err := deps.EvmKeeper.EthereumTx(deps.Ctx, ethTxMsg) if err != nil { return nil, sdkioerrors.Wrap(err, "failed to execute ethereum tx") } @@ -115,7 +114,8 @@ func DeployAndExecuteERC20Transfer( // Contract address is deterministic contractAddr = crypto.CreateAddress(deps.Sender.EthAddr, nonce) - deps.App.Commit() + _, err = deps.App.Commit() + require.NoError(t, err) predecessors = []*evm.MsgEthereumTx{ deployResp.EthTxMsg, } @@ -137,7 +137,7 @@ func DeployAndExecuteERC20Transfer( err = erc20Transfer.Sign(gethSigner, krSigner) require.NoError(t, err) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), erc20Transfer) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.Ctx, erc20Transfer) require.NoError(t, err) require.Empty(t, resp.VmError) @@ -165,7 +165,7 @@ func GenerateEthTxMsgAndSigner( return } res, err := deps.App.EvmKeeper.EstimateGas( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.EthCallRequest{ Args: estimateArgs, GasCap: srvconfig.DefaultEthCallGasLimit, @@ -222,7 +222,7 @@ func (tx TxTransferWei) Run() (evmResp *evm.MsgEthereumTxResponse, err error) { if err != nil { return } - evmResp, err = deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), evmTxMsg) + evmResp, err = deps.App.EvmKeeper.EthereumTx(deps.Ctx, evmTxMsg) if err != nil { err = fmt.Errorf("error while transferring wei: %w", err) } diff --git a/x/evm/keeper/bank_extension_test.go b/x/evm/keeper/bank_extension_test.go index 1694e2a168..486c592483 100644 --- a/x/evm/keeper/bank_extension_test.go +++ b/x/evm/keeper/bank_extension_test.go @@ -345,7 +345,7 @@ func (s *Suite) TestStateDBReadonlyInvariant() { }) s.Require().NoError(err) req := &evm.EthCallRequest{Args: jsonTxArgs} - _, err = deps.EvmKeeper.EthCall(deps.GoCtx(), req) + _, err = deps.EvmKeeper.EthCall(deps.Ctx, req) s.Require().NoError(err) stateDBs = append(stateDBs, StateDBWithExplanation{ StateDB: deps.App.EvmKeeper.Bank.StateDB, diff --git a/x/evm/keeper/funtoken_from_coin_test.go b/x/evm/keeper/funtoken_from_coin_test.go index 3058a30cee..a47f76ab41 100644 --- a/x/evm/keeper/funtoken_from_coin_test.go +++ b/x/evm/keeper/funtoken_from_coin_test.go @@ -58,7 +58,7 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { s.Run("insufficient funds to create funtoken", func() { s.T().Log("sad: not enough funds to create fun token") _, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), @@ -75,7 +75,7 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), )) _, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromBankDenom: "doesn't exist", Sender: deps.Sender.NibiruAddr.String(), @@ -94,7 +94,7 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { )) expectedErc20Addr := crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, deps.EvmKeeper.GetAccNonce(deps.Ctx, evm.EVM_MODULE_ADDRESS)) createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), @@ -183,7 +183,7 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), )) _, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), @@ -204,7 +204,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { s.T().Log("Convert bank coin to erc-20") deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()).WithEventManager(sdk.NewEventManager()) _, err := deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10)), @@ -274,7 +274,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { s.Run("sad: Convert more bank coin to erc-20, insufficient funds", func() { _, err = deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(100)), @@ -391,7 +391,7 @@ func (s *FunTokenFromCoinSuite) TestNativeSendThenPrecompileSend() { s.T().Log("Convert bank coin to erc-20: give test contract 10 WNIBI (erc20)") _, err = deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(bankDenom, sdkmath.NewIntFromBigInt(sendAmt)), @@ -554,7 +554,7 @@ func (s *FunTokenFromCoinSuite) TestERC20TransferThenPrecompileSend() { s.T().Log("Convert bank coin to erc-20: give test contract 10 WNIBI (erc20)") _, err = deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6)), @@ -672,7 +672,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSelfCallRevert() { s.T().Log("Convert bank coin to erc-20: give test contract 10 WNIBI (erc20)") _, err = deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6)), @@ -795,7 +795,7 @@ func (s *FunTokenFromCoinSuite) TestPrecompileSendToBankThenErc20Transfer() { s.T().Log("Convert bank coin to erc-20: give test contract 10 WNIBI (erc20)") _, err = deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(10e6)), @@ -895,7 +895,7 @@ func (s *FunTokenFromCoinSuite) fundAndCreateFunToken(deps evmtest.TestDeps, uni s.T().Log("Create FunToken from coin") createFunTokenResp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), diff --git a/x/evm/keeper/funtoken_from_erc20_test.go b/x/evm/keeper/funtoken_from_erc20_test.go index 8bcb899b22..389fd6d990 100644 --- a/x/evm/keeper/funtoken_from_erc20_test.go +++ b/x/evm/keeper/funtoken_from_erc20_test.go @@ -60,7 +60,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { s.Run("sad: insufficient funds to create FunToken mapping", func() { _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, Sender: deps.Sender.NibiruAddr.String(), @@ -79,7 +79,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) resp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, Sender: deps.Sender.NibiruAddr.String(), @@ -137,7 +137,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { )) _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, Sender: deps.Sender.NibiruAddr.String(), @@ -148,7 +148,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { s.Run("sad: CreateFunToken for the ERC20: invalid sender", func() { _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, }, @@ -158,7 +158,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { s.Run("sad: CreateFunToken for the ERC20: missing erc20 address", func() { _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: nil, FromBankDenom: "", @@ -192,7 +192,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { s.T().Log("CreateFunToken for the ERC20") resp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: ð.EIP55Addr{ Address: deployResp.ContractAddr, @@ -275,7 +275,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { s.Run("happy: send Bank tokens back to erc20", func() { deps.Ctx = deps.Ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()).WithEventManager(sdk.NewEventManager()) - _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), + _, err = deps.EvmKeeper.ConvertCoinToEvm(deps.Ctx, &evm.MsgConvertCoinToEvm{ ToEthAddr: eth.EIP55Addr{ Address: deps.Sender.EthAddr, @@ -345,7 +345,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToBank_MadeFromErc20() { }) s.T().Log("sad: send too many Bank tokens back to erc20") - _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), + _, err = deps.EvmKeeper.ConvertCoinToEvm(deps.Ctx, &evm.MsgConvertCoinToEvm{ ToEthAddr: eth.EIP55Addr{ Address: deps.Sender.EthAddr, @@ -388,7 +388,7 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20MaliciousName() { )) _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, Sender: deps.Sender.NibiruAddr.String(), @@ -427,7 +427,7 @@ func (s *FunTokenFromErc20Suite) TestFunTokenFromERC20MaliciousTransfer() { s.T().Log("happy: CreateFunToken for ERC20 with malicious transfer") _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, Sender: deps.Sender.NibiruAddr.String(), @@ -485,7 +485,7 @@ func (s *FunTokenFromErc20Suite) TestFunTokenInfiniteRecursionERC20() { s.T().Log("happy: CreateFunToken for ERC20 with infinite recursion") _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, Sender: deps.Sender.NibiruAddr.String(), @@ -554,7 +554,7 @@ func (s *FunTokenFromErc20Suite) TestSendERC20WithFee() { s.T().Log("CreateFunToken for the ERC20 with fee") resp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ FromErc20: ð.EIP55Addr{ Address: deployResp.ContractAddr, @@ -599,7 +599,7 @@ func (s *FunTokenFromErc20Suite) TestSendERC20WithFee() { s.Require().Equal(sdkmath.NewInt(90), deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount) s.T().Log("send Bank tokens back to erc20") - _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), + _, err = deps.EvmKeeper.ConvertCoinToEvm(deps.Ctx, &evm.MsgConvertCoinToEvm{ ToEthAddr: eth.EIP55Addr{ Address: deps.Sender.EthAddr, diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 7b605d37d8..42f4ecacb4 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -170,8 +170,8 @@ func (s *Suite) TestQueryEvmAccount() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.EthAccount(goCtx, req) + + gotResp, err := deps.EvmKeeper.EthAccount(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -244,6 +244,7 @@ func (s *Suite) TestQueryValidatorAccount() { s.Require().NoError(err) valAddrBz := valopers[0].GetOperator() valAddress, err := sdk.ValAddressFromBech32(valopers[0].GetOperator()) + s.Require().NoError(err) consAddr := sdk.ConsAddress(valAddress) s.T().Log( @@ -284,8 +285,8 @@ func (s *Suite) TestQueryValidatorAccount() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.ValidatorAccount(goCtx, req) + + gotResp, err := deps.EvmKeeper.ValidatorAccount(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -359,9 +360,8 @@ func (s *Suite) TestQueryStorage() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.Storage(goCtx, req) + gotResp, err := deps.EvmKeeper.Storage(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -418,9 +418,8 @@ func (s *Suite) TestQueryCode() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.Code(goCtx, req) + gotResp, err := deps.EvmKeeper.Code(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -440,7 +439,7 @@ func (s *Suite) TestQueryParams() { err := deps.EvmKeeper.SetParams(deps.Ctx, want) s.NoError(err) - gotResp, err := deps.EvmKeeper.Params(sdk.WrapSDKContext(deps.Ctx), nil) + gotResp, err := deps.EvmKeeper.Params(deps.Ctx, nil) s.NoError(err) got := gotResp.Params s.Require().NoError(err) @@ -452,7 +451,7 @@ func (s *Suite) TestQueryParams() { want.EVMChannels = []string{"channel-420"} err = deps.EvmKeeper.SetParams(deps.Ctx, want) s.NoError(err) - gotResp, err = deps.EvmKeeper.Params(sdk.WrapSDKContext(deps.Ctx), nil) + gotResp, err = deps.EvmKeeper.Params(deps.Ctx, nil) s.Require().NoError(err) got = gotResp.Params @@ -502,7 +501,7 @@ func (s *Suite) TestQueryEthCall() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - gotResp, err := deps.App.EvmKeeper.EthCall(sdk.WrapSDKContext(deps.Ctx), req) + gotResp, err := deps.App.EvmKeeper.EthCall(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -580,8 +579,8 @@ func (s *Suite) TestQueryBalance() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.Balance(goCtx, req) + + gotResp, err := deps.EvmKeeper.Balance(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -619,8 +618,8 @@ func (s *Suite) TestQueryBaseFee() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.BaseFee(goCtx, req) + + gotResp, err := deps.EvmKeeper.BaseFee(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -679,7 +678,7 @@ func (s *Suite) TestEstimateGasForEvmCallType() { s.Require().NoError(err) // assert balance of 1000 * 10^12 wei - resp, _ := deps.App.EvmKeeper.Balance(sdk.WrapSDKContext(deps.Ctx), &evm.QueryBalanceRequest{ + resp, _ := deps.App.EvmKeeper.Balance(deps.Ctx, &evm.QueryBalanceRequest{ Address: deps.Sender.EthAddr.Hex(), }) s.Equal("1000", resp.Balance) @@ -740,8 +739,8 @@ func (s *Suite) TestEstimateGasForEvmCallType() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.EstimateGas(goCtx, req) + + gotResp, err := deps.EvmKeeper.EstimateGas(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -803,8 +802,8 @@ func (s *Suite) TestTraceTx() { tc.setup(&deps) } req, _ := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.TraceTx(goCtx, req) + + gotResp, err := deps.EvmKeeper.TraceTx(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -883,8 +882,8 @@ func (s *Suite) TestTraceBlock() { tc.setup(&deps) } req, _ := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.TraceBlock(goCtx, req) + + gotResp, err := deps.EvmKeeper.TraceBlock(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -981,8 +980,8 @@ func (s *Suite) TestTraceCall() { tc.setup(&deps) } req, _ := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.TraceCall(goCtx, req) + + gotResp, err := deps.EvmKeeper.TraceCall(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -1074,8 +1073,8 @@ func (s *Suite) TestQueryFunTokenMapping() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - goCtx := sdk.WrapSDKContext(deps.Ctx) - gotResp, err := deps.EvmKeeper.FunTokenMapping(goCtx, req) + + gotResp, err := deps.EvmKeeper.FunTokenMapping(deps.Ctx, req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index d1d930aee4..882c4fb8fe 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -55,7 +55,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit.Uint64()) - resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.Ctx, ethTxMsg) s.Require().NoError( err, "resp: %s\nblock header: %s", @@ -94,7 +94,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit) - resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.Ctx, ethTxMsg) s.Require().ErrorContains( err, core.ErrIntrinsicGas.Error(), @@ -148,7 +148,7 @@ func (s *Suite) TestMsgEthereumTx_ExecuteContract() { s.NoError(err) s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit.Uint64()) - resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.Ctx, ethTxMsg) s.Require().NoError( err, "resp: %s\nblock header: %s", @@ -213,7 +213,7 @@ func (s *Suite) TestMsgEthereumTx_SimpleTransfer() { ) s.NoError(err) - resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.Ctx, ethTxMsg) s.Require().NoError(err) s.Require().Empty(resp.VmError) @@ -244,7 +244,8 @@ func (s *Suite) TestEthereumTx_ABCI() { )) // blockHeader := tmproto.Header{Height: deps.Ctx.BlockHeight()} - deps.App.BeginBlocker(deps.Ctx) + _, err := deps.App.BeginBlocker(deps.Ctx) + s.Require().NoError(err) to := evmtest.NewEthPrivAcc() evmTxMsg, err := evmtest.TxTransferWei{ Deps: &deps, @@ -259,7 +260,8 @@ func (s *Suite) TestEthereumTx_ABCI() { gasInfo, _, err := deps.App.SimDeliver(deps.App.GetTxConfig().TxEncoder(), blockTx) s.Require().NoError(err) - deps.App.EndBlocker(deps.Ctx) + _, err = deps.App.EndBlocker(deps.Ctx) + s.Require().NoError(err) s.EqualValuesf(21000, gasInfo.GasUsed, "%d", gasInfo.GasUsed) s.EqualValuesf(21000, gasInfo.GasWanted, "%d", gasInfo.GasWanted) diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index 7cffe55749..882b0f4fa1 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -728,7 +728,7 @@ func (p precompileFunToken) bankMsgSend( Amount: coin, } if _, err := bankkeeper.NewMsgServerImpl(p.evmKeeper.Bank).Send( - sdk.WrapSDKContext(ctx), bankMsg, + ctx, bankMsg, ); err != nil { return nil, fmt.Errorf("bankMsgSend: %w", err) } diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index 0ef6da38eb..795da49dde 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -154,7 +154,7 @@ func (s *FuntokenSuite) TestHappyPath() { s.Run("ConvertCoinToEvm", func() { _, err := deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420)), @@ -279,7 +279,7 @@ func (s *FuntokenSuite) TestPrecompileLocalGas() { s.Run("Fund contract with erc20 coins", func() { _, err = deps.EvmKeeper.ConvertCoinToEvm( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.NewCoin(funtoken.BankDenom, sdkmath.NewInt(1000)), @@ -523,7 +523,7 @@ func (s *FuntokenSuite) TestSendToEvm_MadeFromERC20() { // create fun token from that erc20 _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), + deps.Ctx, &evm.MsgCreateFunToken{ Sender: deps.Sender.NibiruAddr.String(), FromErc20: ð.EIP55Addr{Address: erc20Addr}, diff --git a/x/inflation/keeper/grpc_query_test.go b/x/inflation/keeper/grpc_query_test.go index b2a51e3531..a7ad8f0af7 100644 --- a/x/inflation/keeper/grpc_query_test.go +++ b/x/inflation/keeper/grpc_query_test.go @@ -35,7 +35,7 @@ func (s *QueryServerSuite) TestQueryPeriod() { nibiruApp, ctx := s.nibiruApp, s.ctx resp, err := nibiruApp.InflationKeeper.Period( - sdk.WrapSDKContext(ctx), &inflationtypes.QueryPeriodRequest{}, + ctx, &inflationtypes.QueryPeriodRequest{}, ) s.NoError(err) @@ -44,7 +44,7 @@ func (s *QueryServerSuite) TestQueryPeriod() { nibiruApp.InflationKeeper.CurrentPeriod.Next(ctx) resp, err = nibiruApp.InflationKeeper.Period( - sdk.WrapSDKContext(ctx), &inflationtypes.QueryPeriodRequest{}, + ctx, &inflationtypes.QueryPeriodRequest{}, ) s.NoError(err) s.Assert().Equal(uint64(1), resp.Period) @@ -53,7 +53,7 @@ func (s *QueryServerSuite) TestQueryPeriod() { func (s *QueryServerSuite) TestQuerySkippedEpochs() { nibiruApp, ctx := s.nibiruApp, s.ctx resp, err := nibiruApp.InflationKeeper.SkippedEpochs( - sdk.WrapSDKContext(ctx), &inflationtypes.QuerySkippedEpochsRequest{}, + ctx, &inflationtypes.QuerySkippedEpochsRequest{}, ) s.Require().NoError(err) @@ -62,7 +62,7 @@ func (s *QueryServerSuite) TestQuerySkippedEpochs() { nibiruApp.InflationKeeper.NumSkippedEpochs.Next(ctx) resp, err = nibiruApp.InflationKeeper.SkippedEpochs( - sdk.WrapSDKContext(ctx), &inflationtypes.QuerySkippedEpochsRequest{}, + ctx, &inflationtypes.QuerySkippedEpochsRequest{}, ) s.NoError(err) s.Assert().Equal(uint64(1), resp.SkippedEpochs) @@ -71,7 +71,7 @@ func (s *QueryServerSuite) TestQuerySkippedEpochs() { func (s *QueryServerSuite) TestQueryEpochMintProvision() { nibiruApp, ctx := s.nibiruApp, s.ctx resp, err := nibiruApp.InflationKeeper.EpochMintProvision( - sdk.WrapSDKContext(ctx), &inflationtypes.QueryEpochMintProvisionRequest{}, + ctx, &inflationtypes.QueryEpochMintProvisionRequest{}, ) s.NoError(err) s.NotNil(resp) @@ -80,7 +80,7 @@ func (s *QueryServerSuite) TestQueryEpochMintProvision() { func (s *QueryServerSuite) TestQueryInflationRate() { nibiruApp, ctx := s.nibiruApp, s.ctx resp, err := nibiruApp.InflationKeeper.InflationRate( - sdk.WrapSDKContext(ctx), &inflationtypes.QueryInflationRateRequest{}, + ctx, &inflationtypes.QueryInflationRateRequest{}, ) s.NoError(err) s.NotNil(resp) @@ -89,7 +89,7 @@ func (s *QueryServerSuite) TestQueryInflationRate() { func (s *QueryServerSuite) TestQueryCirculatingSupply() { nibiruApp, ctx := s.nibiruApp, s.ctx resp, err := nibiruApp.InflationKeeper.CirculatingSupply( - sdk.WrapSDKContext(ctx), &inflationtypes.QueryCirculatingSupplyRequest{}, + ctx, &inflationtypes.QueryCirculatingSupplyRequest{}, ) s.NoError(err) s.NotNil(resp) @@ -103,7 +103,7 @@ func (s *QueryServerSuite) TestQueryParams() { queryServer := keeper.NewQuerier(nibiruApp.InflationKeeper) - resp2, err := queryServer.Params(sdk.WrapSDKContext(ctx), &inflationtypes.QueryParamsRequest{}) + resp2, err := queryServer.Params(ctx, &inflationtypes.QueryParamsRequest{}) s.NoError(err) s.NotNil(resp2) } diff --git a/x/oracle/cli/tx.go b/x/oracle/cli/tx.go index c7e75904f4..7d4a78457f 100644 --- a/x/oracle/cli/tx.go +++ b/x/oracle/cli/tx.go @@ -6,6 +6,7 @@ import ( "time" "cosmossdk.io/math" + "github.com/NibiruChain/nibiru/v2/x/common/asset" "github.com/NibiruChain/nibiru/v2/x/oracle/types" diff --git a/x/oracle/keeper/edit_params_test.go b/x/oracle/keeper/edit_params_test.go index 756c5a4d1d..a4e9765fb9 100644 --- a/x/oracle/keeper/edit_params_test.go +++ b/x/oracle/keeper/edit_params_test.go @@ -3,7 +3,6 @@ package keeper_test import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/NibiruChain/nibiru/v2/x/common/testutil" @@ -15,7 +14,6 @@ import ( func TestMsgServer_EditOracleParams(t *testing.T) { app, ctx := testapp.NewNibiruTestAppAndContext(t.TempDir()) - goCtx := sdk.WrapSDKContext(ctx) msgServer := keeper.NewMsgServerImpl(app.OracleKeeper, app.SudoKeeper) @@ -30,7 +28,7 @@ func TestMsgServer_EditOracleParams(t *testing.T) { }, } - _, err := msgServer.EditOracleParams(goCtx, &msg) + _, err := msgServer.EditOracleParams(ctx, &msg) require.Error(t, err) require.EqualError(t, sudotypes.ErrUnauthorized, err.Error()) @@ -49,6 +47,6 @@ func TestMsgServer_EditOracleParams(t *testing.T) { }, } - _, err = msgServer.EditOracleParams(goCtx, &msg) + _, err = msgServer.EditOracleParams(ctx, &msg) require.NoError(t, err) } diff --git a/x/oracle/keeper/grpc_query_test.go b/x/oracle/keeper/grpc_query_test.go index 07d4bb7e61..8e70e6b1cf 100644 --- a/x/oracle/keeper/grpc_query_test.go +++ b/x/oracle/keeper/grpc_query_test.go @@ -7,7 +7,6 @@ import ( sdkmath "cosmossdk.io/math" "github.com/NibiruChain/collections" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/NibiruChain/nibiru/v2/x/common/set" @@ -20,10 +19,9 @@ import ( func TestQueryParams(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) - res, err := querier.Params(ctx, &types.QueryParamsRequest{}) + res, err := querier.Params(input.Ctx, &types.QueryParamsRequest{}) require.NoError(t, err) params, err := input.OracleKeeper.Params.Get(input.Ctx) @@ -34,7 +32,6 @@ func TestQueryParams(t *testing.T) { func TestQueryExchangeRate(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) rate := sdkmath.LegacyNewDec(1700) @@ -49,11 +46,11 @@ func TestQueryExchangeRate(t *testing.T) { ) // empty request - _, err := querier.ExchangeRate(ctx, nil) + _, err := querier.ExchangeRate(input.Ctx, nil) require.Error(t, err) // Query to grpc - res, err := querier.ExchangeRate(ctx, &types.QueryExchangeRateRequest{ + res, err := querier.ExchangeRate(input.Ctx, &types.QueryExchangeRateRequest{ Pair: asset.Registry.Pair(denoms.ETH, denoms.NUSD), }) require.NoError(t, err) @@ -62,18 +59,17 @@ func TestQueryExchangeRate(t *testing.T) { func TestQueryMissCounter(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) missCounter := uint64(1) input.OracleKeeper.MissCounters.Insert(input.Ctx, ValAddrs[0], missCounter) // empty request - _, err := querier.MissCounter(ctx, nil) + _, err := querier.MissCounter(input.Ctx, nil) require.Error(t, err) // Query to grpc - res, err := querier.MissCounter(ctx, &types.QueryMissCounterRequest{ + res, err := querier.MissCounter(input.Ctx, &types.QueryMissCounterRequest{ ValidatorAddr: ValAddrs[0].String(), }) require.NoError(t, err) @@ -82,7 +78,6 @@ func TestQueryMissCounter(t *testing.T) { func TestQueryExchangeRates(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) rate := sdkmath.LegacyNewDec(1700) @@ -105,7 +100,7 @@ func TestQueryExchangeRates(t *testing.T) { }, ) - res, err := querier.ExchangeRates(ctx, &types.QueryExchangeRatesRequest{}) + res, err := querier.ExchangeRates(input.Ctx, &types.QueryExchangeRatesRequest{}) require.NoError(t, err) require.Equal(t, types.ExchangeRateTuples{ @@ -130,15 +125,14 @@ func TestQueryExchangeRateTwap(t *testing.T) { }, ) - ctx := sdk.WrapSDKContext(input.Ctx. + input.Ctx = input.Ctx. WithBlockTime(input.Ctx.BlockTime().Add(time.Second)). - WithBlockHeight(input.Ctx.BlockHeight() + 1), - ) + WithBlockHeight(input.Ctx.BlockHeight() + 1) - _, err := querier.ExchangeRateTwap(ctx, &types.QueryExchangeRateRequest{Pair: asset.Registry.Pair(denoms.ETH, denoms.NUSD)}) + _, err := querier.ExchangeRateTwap(input.Ctx, &types.QueryExchangeRateRequest{Pair: asset.Registry.Pair(denoms.ETH, denoms.NUSD)}) require.Error(t, err) - res, err := querier.ExchangeRateTwap(ctx, &types.QueryExchangeRateRequest{Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD)}) + res, err := querier.ExchangeRateTwap(input.Ctx, &types.QueryExchangeRateRequest{Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD)}) require.NoError(t, err) require.Equal(t, sdkmath.LegacyMustNewDecFromStr("1700"), res.ExchangeRate) } @@ -238,11 +232,10 @@ func TestQueryDatedExchangeRate(t *testing.T) { ) // Wrap context for querying - ctx := sdk.WrapSDKContext(input.Ctx) t.Log("Query latest snapshot for BTC") resBTC, err := querier.ExchangeRate( - ctx, + input.Ctx, &types.QueryExchangeRateRequest{Pair: pairBTC}, ) require.NoError(t, err) @@ -253,7 +246,7 @@ func TestQueryDatedExchangeRate(t *testing.T) { t.Log("Query latest snapshot for ETH") resETH, err := querier.ExchangeRate( - ctx, + input.Ctx, &types.QueryExchangeRateRequest{Pair: pairETH}, ) require.NoError(t, err) @@ -264,7 +257,7 @@ func TestQueryDatedExchangeRate(t *testing.T) { t.Run("Query a pair with no snapshots (should return an error)", func(t *testing.T) { pairATOM := asset.Registry.Pair(denoms.ATOM, denoms.NUSD) - _, err = querier.ExchangeRate(ctx, &types.QueryExchangeRateRequest{Pair: pairATOM}) + _, err = querier.ExchangeRate(input.Ctx, &types.QueryExchangeRateRequest{Pair: pairATOM}) require.Error(t, err) }) } @@ -343,7 +336,7 @@ func TestCalcTwap(t *testing.T) { ctx = ctx.WithBlockTime(tc.currentBlockTime).WithBlockHeight(tc.currentBlockHeight) - price, err := querier.ExchangeRateTwap(sdk.WrapSDKContext(ctx), &types.QueryExchangeRateRequest{Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD)}) + price, err := querier.ExchangeRateTwap(ctx, &types.QueryExchangeRateRequest{Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD)}) require.NoError(t, err) require.EqualValuesf(t, tc.expectedPrice, price.ExchangeRate, @@ -354,7 +347,6 @@ func TestCalcTwap(t *testing.T) { func TestQueryActives(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) queryClient := NewQuerier(input.OracleKeeper) rate := sdkmath.LegacyNewDec(1700) @@ -373,7 +365,7 @@ func TestQueryActives(t *testing.T) { ) } - res, err := queryClient.Actives(ctx, &types.QueryActivesRequest{}) + res, err := queryClient.Actives(input.Ctx, &types.QueryActivesRequest{}) require.NoError(t, err) for _, pair := range res.Actives { require.True(t, targetPairs.Has(pair)) @@ -382,16 +374,15 @@ func TestQueryActives(t *testing.T) { func TestQueryFeederDelegation(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) input.OracleKeeper.FeederDelegations.Insert(input.Ctx, ValAddrs[0], Addrs[1]) // empty request - _, err := querier.FeederDelegation(ctx, nil) + _, err := querier.FeederDelegation(input.Ctx, nil) require.Error(t, err) - res, err := querier.FeederDelegation(ctx, &types.QueryFeederDelegationRequest{ + res, err := querier.FeederDelegation(input.Ctx, &types.QueryFeederDelegationRequest{ ValidatorAddr: ValAddrs[0].String(), }) require.NoError(t, err) @@ -401,7 +392,6 @@ func TestQueryFeederDelegation(t *testing.T) { func TestQueryAggregatePrevote(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) prevote1 := types.NewAggregateExchangeRatePrevote(types.AggregateVoteHash{}, ValAddrs[0], 0) @@ -410,18 +400,18 @@ func TestQueryAggregatePrevote(t *testing.T) { input.OracleKeeper.Prevotes.Insert(input.Ctx, ValAddrs[1], prevote2) // validator 0 address params - res, err := querier.AggregatePrevote(ctx, &types.QueryAggregatePrevoteRequest{ + res, err := querier.AggregatePrevote(input.Ctx, &types.QueryAggregatePrevoteRequest{ ValidatorAddr: ValAddrs[0].String(), }) require.NoError(t, err) require.Equal(t, prevote1, res.AggregatePrevote) // empty request - _, err = querier.AggregatePrevote(ctx, nil) + _, err = querier.AggregatePrevote(input.Ctx, nil) require.Error(t, err) // validator 1 address params - res, err = querier.AggregatePrevote(ctx, &types.QueryAggregatePrevoteRequest{ + res, err = querier.AggregatePrevote(input.Ctx, &types.QueryAggregatePrevoteRequest{ ValidatorAddr: ValAddrs[1].String(), }) require.NoError(t, err) @@ -430,7 +420,6 @@ func TestQueryAggregatePrevote(t *testing.T) { func TestQueryAggregatePrevotes(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) prevote1 := types.NewAggregateExchangeRatePrevote(types.AggregateVoteHash{}, ValAddrs[0], 0) @@ -445,14 +434,13 @@ func TestQueryAggregatePrevotes(t *testing.T) { return expectedPrevotes[i].Voter <= expectedPrevotes[j].Voter }) - res, err := querier.AggregatePrevotes(ctx, &types.QueryAggregatePrevotesRequest{}) + res, err := querier.AggregatePrevotes(input.Ctx, &types.QueryAggregatePrevotesRequest{}) require.NoError(t, err) require.Equal(t, expectedPrevotes, res.AggregatePrevotes) } func TestQueryAggregateVote(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) vote1 := types.NewAggregateExchangeRateVote(types.ExchangeRateTuples{{Pair: "", ExchangeRate: sdkmath.LegacyOneDec()}}, ValAddrs[0]) @@ -461,18 +449,18 @@ func TestQueryAggregateVote(t *testing.T) { input.OracleKeeper.Votes.Insert(input.Ctx, ValAddrs[1], vote2) // empty request - _, err := querier.AggregateVote(ctx, nil) + _, err := querier.AggregateVote(input.Ctx, nil) require.Error(t, err) // validator 0 address params - res, err := querier.AggregateVote(ctx, &types.QueryAggregateVoteRequest{ + res, err := querier.AggregateVote(input.Ctx, &types.QueryAggregateVoteRequest{ ValidatorAddr: ValAddrs[0].String(), }) require.NoError(t, err) require.Equal(t, vote1, res.AggregateVote) // validator 1 address params - res, err = querier.AggregateVote(ctx, &types.QueryAggregateVoteRequest{ + res, err = querier.AggregateVote(input.Ctx, &types.QueryAggregateVoteRequest{ ValidatorAddr: ValAddrs[1].String(), }) require.NoError(t, err) @@ -481,7 +469,6 @@ func TestQueryAggregateVote(t *testing.T) { func TestQueryAggregateVotes(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) vote1 := types.NewAggregateExchangeRateVote(types.ExchangeRateTuples{{Pair: "", ExchangeRate: sdkmath.LegacyOneDec()}}, ValAddrs[0]) @@ -496,14 +483,13 @@ func TestQueryAggregateVotes(t *testing.T) { return expectedVotes[i].Voter <= expectedVotes[j].Voter }) - res, err := querier.AggregateVotes(ctx, &types.QueryAggregateVotesRequest{}) + res, err := querier.AggregateVotes(input.Ctx, &types.QueryAggregateVotesRequest{}) require.NoError(t, err) require.Equal(t, expectedVotes, res.AggregateVotes) } func TestQueryVoteTargets(t *testing.T) { input := CreateTestFixture(t) - ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) // clear pairs @@ -516,7 +502,7 @@ func TestQueryVoteTargets(t *testing.T) { input.OracleKeeper.WhitelistedPairs.Insert(input.Ctx, target) } - res, err := querier.VoteTargets(ctx, &types.QueryVoteTargetsRequest{}) + res, err := querier.VoteTargets(input.Ctx, &types.QueryVoteTargetsRequest{}) require.NoError(t, err) require.Equal(t, voteTargets, res.VoteTargets) } diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index 19eff0dd96..c5a7c4b450 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -24,7 +24,8 @@ func TestValidateFeeder(t *testing.T) { require.NoError(t, err) _, err = sh.CreateValidator(ctx, NewTestMsgCreateValidator(addr1, val1, amt)) require.NoError(t, err) - input.StakingKeeper.EndBlocker(ctx) + _, err = input.StakingKeeper.EndBlocker(ctx) + require.NoError(t, err) params, err := input.StakingKeeper.GetParams(ctx) require.NoError(t, err) @@ -53,6 +54,7 @@ func TestValidateFeeder(t *testing.T) { // only active validators can do oracle votes validator.Status = stakingtypes.Unbonded - input.StakingKeeper.SetValidator(input.Ctx, validator) + err = input.StakingKeeper.SetValidator(input.Ctx, validator) + require.NoError(t, err) require.Error(t, input.OracleKeeper.ValidateFeeder(input.Ctx, sdk.AccAddress(addr1), addr)) } diff --git a/x/oracle/keeper/msg_server_test.go b/x/oracle/keeper/msg_server_test.go index 73ce1886ff..5def9661c6 100644 --- a/x/oracle/keeper/msg_server_test.go +++ b/x/oracle/keeper/msg_server_test.go @@ -30,52 +30,52 @@ func TestFeederDelegation(t *testing.T) { // Case 1: empty message delegateFeedConsentMsg := types.MsgDelegateFeedConsent{} - _, err = msgServer.DelegateFeedConsent(sdk.WrapSDKContext(input.Ctx), &delegateFeedConsentMsg) + _, err = msgServer.DelegateFeedConsent(input.Ctx, &delegateFeedConsentMsg) require.Error(t, err) // Case 2: Normal Prevote - without delegation prevoteMsg := types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), prevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, prevoteMsg) require.NoError(t, err) // Case 2.1: Normal Prevote - with delegation fails prevoteMsg = types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[1], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), prevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, prevoteMsg) require.Error(t, err) // Case 2.2: Normal Vote - without delegation voteMsg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx.WithBlockHeight(2)), voteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx.WithBlockHeight(2), voteMsg) require.NoError(t, err) // Case 2.3: Normal Vote - with delegation fails voteMsg = types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, Addrs[1], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx.WithBlockHeight(2)), voteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx.WithBlockHeight(2), voteMsg) require.Error(t, err) // Case 3: Normal MsgDelegateFeedConsent succeeds msg := types.NewMsgDelegateFeedConsent(ValAddrs[0], Addrs[1]) - _, err = msgServer.DelegateFeedConsent(sdk.WrapSDKContext(input.Ctx), msg) + _, err = msgServer.DelegateFeedConsent(input.Ctx, msg) require.NoError(t, err) // Case 4.1: Normal Prevote - without delegation fails prevoteMsg = types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[2], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), prevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, prevoteMsg) require.Error(t, err) // Case 4.2: Normal Prevote - with delegation succeeds prevoteMsg = types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[1], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), prevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, prevoteMsg) require.NoError(t, err) // Case 4.3: Normal Vote - without delegation fails voteMsg = types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, Addrs[2], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx.WithBlockHeight(2)), voteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx.WithBlockHeight(2), voteMsg) require.Error(t, err) // Case 4.4: Normal Vote - with delegation succeeds voteMsg = types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, Addrs[1], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx.WithBlockHeight(2)), voteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx.WithBlockHeight(2), voteMsg) require.NoError(t, err) } @@ -141,54 +141,54 @@ func TestAggregatePrevoteVote(t *testing.T) { hash := types.GetAggregateVoteHash(salt, exchangeRatesStr, ValAddrs[0]) aggregateExchangeRatePrevoteMsg := types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRatePrevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, aggregateExchangeRatePrevoteMsg) require.NoError(t, err) // Unauthorized feeder aggregateExchangeRatePrevoteMsg = types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[1], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRatePrevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, aggregateExchangeRatePrevoteMsg) require.Error(t, err) // Invalid addr aggregateExchangeRatePrevoteMsg = types.NewMsgAggregateExchangeRatePrevote(hash, sdk.AccAddress{}, ValAddrs[0]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRatePrevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, aggregateExchangeRatePrevoteMsg) require.Error(t, err) // Invalid validator addr aggregateExchangeRatePrevoteMsg = types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[0], sdk.ValAddress{}) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRatePrevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx, aggregateExchangeRatePrevoteMsg) require.Error(t, err) // Invalid reveal period aggregateExchangeRateVoteMsg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRatesStr, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRateVoteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx, aggregateExchangeRateVoteMsg) require.Error(t, err) // Invalid reveal period input.Ctx = input.Ctx.WithBlockHeight(3) aggregateExchangeRateVoteMsg = types.NewMsgAggregateExchangeRateVote(salt, exchangeRatesStr, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRateVoteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx, aggregateExchangeRateVoteMsg) require.Error(t, err) // Other exchange rate with valid real period input.Ctx = input.Ctx.WithBlockHeight(2) aggregateExchangeRateVoteMsg = types.NewMsgAggregateExchangeRateVote(salt, otherExchangeRateStr, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRateVoteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx, aggregateExchangeRateVoteMsg) require.Error(t, err) // Unauthorized feeder aggregateExchangeRateVoteMsg = types.NewMsgAggregateExchangeRateVote(salt, exchangeRatesStr, Addrs[1], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRateVoteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx, aggregateExchangeRateVoteMsg) require.Error(t, err) // Unintended denom vote aggregateExchangeRateVoteMsg = types.NewMsgAggregateExchangeRateVote(salt, unintendedExchageRateStr, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRateVoteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx, aggregateExchangeRateVoteMsg) require.Error(t, err) // Valid exchange rate reveal submission input.Ctx = input.Ctx.WithBlockHeight(2) aggregateExchangeRateVoteMsg = types.NewMsgAggregateExchangeRateVote(salt, exchangeRatesStr, Addrs[0], ValAddrs[0]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx), aggregateExchangeRateVoteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx, aggregateExchangeRateVoteMsg) require.NoError(t, err) } diff --git a/x/oracle/keeper/slash.go b/x/oracle/keeper/slash.go index d8b35c6746..2e64f89732 100644 --- a/x/oracle/keeper/slash.go +++ b/x/oracle/keeper/slash.go @@ -44,9 +44,13 @@ func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) { continue } - k.slashingKeeper.Slash( + err = k.slashingKeeper.Slash( ctx, consAddr, slashFraction, validator.GetConsensusPower(powerReduction), distributionHeight, ) + if err != nil { + // TODO: Handle error + panic(err) + } k.Logger(ctx).Info("oracle slash", "validator", consAddr, "fraction", slashFraction.String()) k.slashingKeeper.Jail(ctx, consAddr) } diff --git a/x/oracle/keeper/slash_test.go b/x/oracle/keeper/slash_test.go index e4670a8a72..e1486916ad 100644 --- a/x/oracle/keeper/slash_test.go +++ b/x/oracle/keeper/slash_test.go @@ -74,7 +74,8 @@ func TestSlashAndResetMissCounters(t *testing.T) { validator.Status = stakingtypes.Unbonded validator.Jailed = false validator.Tokens = amt - input.StakingKeeper.SetValidator(input.Ctx, validator) + err = input.StakingKeeper.SetValidator(input.Ctx, validator) + require.NoError(t, err) input.OracleKeeper.MissCounters.Insert(input.Ctx, ValAddrs[0], uint64(votePeriodsPerWindow-minValidVotes+1)) input.OracleKeeper.SlashAndResetMissCounters(input.Ctx) @@ -87,7 +88,8 @@ func TestSlashAndResetMissCounters(t *testing.T) { validator.Status = stakingtypes.Bonded validator.Jailed = true validator.Tokens = amt - input.StakingKeeper.SetValidator(input.Ctx, validator) + err = input.StakingKeeper.SetValidator(input.Ctx, validator) + require.NoError(t, err) input.OracleKeeper.MissCounters.Insert(input.Ctx, ValAddrs[0], uint64(votePeriodsPerWindow-minValidVotes+1)) input.OracleKeeper.SlashAndResetMissCounters(input.Ctx) diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index 155fd46b86..faff84f7da 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -353,10 +353,10 @@ func MakeAggregatePrevoteAndVote( hash := types.GetAggregateVoteHash(salt, ratesStr, ValAddrs[valIdx]) prevoteMsg := types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[valIdx], ValAddrs[valIdx]) - _, err = msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(input.Ctx.WithBlockHeight(height)), prevoteMsg) + _, err = msgServer.AggregateExchangeRatePrevote(input.Ctx.WithBlockHeight(height), prevoteMsg) require.NoError(t, err) voteMsg := types.NewMsgAggregateExchangeRateVote(salt, ratesStr, Addrs[valIdx], ValAddrs[valIdx]) - _, err = msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(input.Ctx.WithBlockHeight(height+1)), voteMsg) + _, err = msgServer.AggregateExchangeRateVote(input.Ctx.WithBlockHeight(height+1), voteMsg) require.NoError(t, err) } diff --git a/x/oracle/keeper/update_exchange_rates_test.go b/x/oracle/keeper/update_exchange_rates_test.go index 42f37ca1a6..b26cc5c764 100644 --- a/x/oracle/keeper/update_exchange_rates_test.go +++ b/x/oracle/keeper/update_exchange_rates_test.go @@ -44,8 +44,8 @@ func TestOracleThreshold(t *testing.T) { prevoteMsg := types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[i], ValAddrs[i]) voteMsg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, Addrs[i], ValAddrs[i]) - _, err1 := msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(0)), prevoteMsg) - _, err2 := msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(1)), voteMsg) + _, err1 := msgServer.AggregateExchangeRatePrevote(fixture.Ctx.WithBlockHeight(0), prevoteMsg) + _, err2 := msgServer.AggregateExchangeRateVote(fixture.Ctx.WithBlockHeight(1), voteMsg) require.NoError(t, err1) require.NoError(t, err2) } @@ -61,8 +61,8 @@ func TestOracleThreshold(t *testing.T) { prevoteMsg := types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[i], ValAddrs[i]) voteMsg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, Addrs[i], ValAddrs[i]) - _, err1 := msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(0)), prevoteMsg) - _, err2 := msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(1)), voteMsg) + _, err1 := msgServer.AggregateExchangeRatePrevote(fixture.Ctx.WithBlockHeight(0), prevoteMsg) + _, err2 := msgServer.AggregateExchangeRateVote(fixture.Ctx.WithBlockHeight(1), voteMsg) require.NoError(t, err1) require.NoError(t, err2) } @@ -82,8 +82,8 @@ func TestOracleThreshold(t *testing.T) { prevoteMsg := types.NewMsgAggregateExchangeRatePrevote(hash, Addrs[i], ValAddrs[i]) voteMsg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, Addrs[i], ValAddrs[i]) - _, err1 := msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(0)), prevoteMsg) - _, err2 := msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(1)), voteMsg) + _, err1 := msgServer.AggregateExchangeRatePrevote(fixture.Ctx.WithBlockHeight(0), prevoteMsg) + _, err2 := msgServer.AggregateExchangeRateVote(fixture.Ctx.WithBlockHeight(1), voteMsg) require.NoError(t, err1) require.NoError(t, err2) } @@ -149,8 +149,8 @@ func TestOracleTally(t *testing.T) { prevoteMsg := types.NewMsgAggregateExchangeRatePrevote(hash, sdk.AccAddress(valAddrs[i]), valAddrs[i]) voteMsg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRateStr, sdk.AccAddress(valAddrs[i]), valAddrs[i]) - _, err1 := h.AggregateExchangeRatePrevote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(0)), prevoteMsg) - _, err2 := h.AggregateExchangeRateVote(sdk.WrapSDKContext(fixture.Ctx.WithBlockHeight(1)), voteMsg) + _, err1 := h.AggregateExchangeRatePrevote(fixture.Ctx.WithBlockHeight(0), prevoteMsg) + _, err2 := h.AggregateExchangeRateVote(fixture.Ctx.WithBlockHeight(1), voteMsg) require.NoError(t, err1) require.NoError(t, err2) diff --git a/x/oracle/types/codec.go b/x/oracle/types/codec.go index efe53d14e1..fdbabbbd46 100644 --- a/x/oracle/types/codec.go +++ b/x/oracle/types/codec.go @@ -29,14 +29,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { var ( amino = codec.NewLegacyAmino() - - // ModuleCdc references the global x/oracle module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding as Amino is - // still used for that purpose. - // - // The actual codec used for serialization should be provided to x/staking and - // defined at the application level. - ModuleCdc = codec.NewAminoCodec(amino) ) func init() { diff --git a/x/oracle/types/expected_keeper.go b/x/oracle/types/expected_keeper.go index c010ad050e..f492a4eb4b 100644 --- a/x/oracle/types/expected_keeper.go +++ b/x/oracle/types/expected_keeper.go @@ -4,7 +4,6 @@ import ( context "context" corestore "cosmossdk.io/core/store" - "cosmossdk.io/math" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -22,7 +21,7 @@ type StakingKeeper interface { } type SlashingKeeper interface { - Slash(ctx context.Context, consAddr sdk.ConsAddress, fraction math.LegacyDec, power int64, height int64) error + Slash(ctx context.Context, consAddr sdk.ConsAddress, fraction sdkmath.LegacyDec, power int64, height int64) error Jail(context.Context, sdk.ConsAddress) error } diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go index 4f2b52f99e..1bb65e3311 100644 --- a/x/oracle/types/msgs.go +++ b/x/oracle/types/msgs.go @@ -43,11 +43,6 @@ func (msg MsgAggregateExchangeRatePrevote) Route() string { return RouterKey } // Type implements sdk.Msg func (msg MsgAggregateExchangeRatePrevote) Type() string { return TypeMsgAggregateExchangeRatePrevote } -// GetSignBytes implements sdk.Msg -func (msg MsgAggregateExchangeRatePrevote) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - // GetSigners implements sdk.Msg func (msg MsgAggregateExchangeRatePrevote) GetSigners() []sdk.AccAddress { feeder, err := sdk.AccAddressFromBech32(msg.Feeder) @@ -100,11 +95,6 @@ func (msg MsgAggregateExchangeRateVote) Route() string { return RouterKey } // Type implements sdk.Msg func (msg MsgAggregateExchangeRateVote) Type() string { return TypeMsgAggregateExchangeRateVote } -// GetSignBytes implements sdk.Msg -func (msg MsgAggregateExchangeRateVote) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - // GetSigners implements sdk.Msg func (msg MsgAggregateExchangeRateVote) GetSigners() []sdk.AccAddress { feeder, err := sdk.AccAddressFromBech32(msg.Feeder) @@ -168,11 +158,6 @@ func (msg MsgDelegateFeedConsent) Route() string { return RouterKey } // Type implements sdk.Msg func (msg MsgDelegateFeedConsent) Type() string { return TypeMsgDelegateFeedConsent } -// GetSignBytes implements sdk.Msg -func (msg MsgDelegateFeedConsent) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - // GetSigners implements sdk.Msg func (msg MsgDelegateFeedConsent) GetSigners() []sdk.AccAddress { operator, err := sdk.ValAddressFromBech32(msg.Operator) @@ -210,10 +195,6 @@ func (m MsgEditOracleParams) ValidateBasic() error { return nil } -func (m MsgEditOracleParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - func (m MsgEditOracleParams) GetSigners() []sdk.AccAddress { signer, err := sdk.AccAddressFromBech32(m.Sender) if err != nil { diff --git a/x/sudo/keeper/msg_server_test.go b/x/sudo/keeper/msg_server_test.go index d95fcb978b..21ea15f279 100644 --- a/x/sudo/keeper/msg_server_test.go +++ b/x/sudo/keeper/msg_server_test.go @@ -180,14 +180,14 @@ func TestMsgServer_ChangeRoot(t *testing.T) { // try to change root with non-root account msgServer := keeper.NewMsgServer(app.SudoKeeper) _, err = msgServer.ChangeRoot( - sdk.WrapSDKContext(ctx), + ctx, &types.MsgChangeRoot{Sender: fakeRoot, NewRoot: newRoot}, ) require.EqualError(t, err, "unauthorized: missing sudo permissions") // try to change root with root account _, err = msgServer.ChangeRoot( - sdk.WrapSDKContext(ctx), + ctx, &types.MsgChangeRoot{Sender: actualRoot, NewRoot: newRoot}, ) require.NoError(t, err) @@ -339,9 +339,9 @@ func TestKeeper_AddContracts(t *testing.T) { t.Log("Execute message") // Check via message handler directly msgServer := keeper.NewMsgServer(k) - res, err := msgServer.EditSudoers(sdk.WrapSDKContext(ctx), tc.msg) + res, err := msgServer.EditSudoers(ctx, tc.msg) // Check via Keeper - res2, err2 := k.AddContracts(sdk.WrapSDKContext(ctx), tc.msg) + res2, err2 := k.AddContracts(ctx, tc.msg) if tc.shouldFail { require.Errorf(t, err, "resp: %s", res) require.Errorf(t, err2, "resp: %s", res2) @@ -450,7 +450,7 @@ func TestKeeper_RemoveContracts(t *testing.T) { msgServer := keeper.NewMsgServer(k) res, err := msgServer.EditSudoers(ctx, tc.msg) // Check via Keeper - res2, err2 := k.RemoveContracts(sdk.WrapSDKContext(ctx), tc.msg) + res2, err2 := k.RemoveContracts(ctx, tc.msg) if tc.shouldFail { require.Errorf(t, err, "resp: %s", res) require.Errorf(t, err2, "resp: %s", res2) diff --git a/x/sudo/keeper/querier_test.go b/x/sudo/keeper/querier_test.go index 385c1e4381..2264198489 100644 --- a/x/sudo/keeper/querier_test.go +++ b/x/sudo/keeper/querier_test.go @@ -3,7 +3,6 @@ package keeper_test import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" @@ -47,7 +46,7 @@ func TestQuerySudoers(t *testing.T) { req := new(types.QuerySudoersRequest) querier := keeper.NewQuerier(nibiru.SudoKeeper) resp, err := querier.QuerySudoers( - sdk.WrapSDKContext(ctx), req, + ctx, req, ) require.NoError(t, err) @@ -61,7 +60,7 @@ func TestQuerySudoers(t *testing.T) { var req *types.QuerySudoersRequest = nil querier := keeper.NewQuerier(nibiru.SudoKeeper) _, err := querier.QuerySudoers( - sdk.WrapSDKContext(ctx), req, + ctx, req, ) require.Error(t, err) }) diff --git a/x/tokenfactory/keeper/grpc_query_test.go b/x/tokenfactory/keeper/grpc_query_test.go index 0688f59d0d..6a4deaf0c5 100644 --- a/x/tokenfactory/keeper/grpc_query_test.go +++ b/x/tokenfactory/keeper/grpc_query_test.go @@ -8,7 +8,7 @@ import ( ) func (s *TestSuite) TestQueryModuleParams() { - res, err := s.querier.Params(s.GoCtx(), &types.QueryParamsRequest{}) + res, err := s.querier.Params(s.ctx, &types.QueryParamsRequest{}) s.NoError(err) s.Equal(res.Params, types.DefaultModuleParams()) } @@ -36,7 +36,7 @@ func (s *TestSuite) TestQueryDenoms() { queryDenoms := func(creator string) ( resp *types.QueryDenomsResponse, err error, ) { - return s.querier.Denoms(s.GoCtx(), + return s.querier.Denoms(s.ctx, &types.QueryDenomsRequest{ Creator: creator, }) @@ -59,7 +59,7 @@ func (s *TestSuite) TestQueryDenoms() { _, err = queryDenoms("") s.ErrorContains(err, "empty creator address") - _, err = s.querier.Denoms(s.GoCtx(), nil) + _, err = s.querier.Denoms(s.ctx, nil) s.ErrorContains(err, "nil msg") } @@ -73,13 +73,13 @@ func (s *TestSuite) TestQueryDenomInfo() { s.createDenom(creator, denom.Subdenom) s.Run("case: nil msg", func() { - _, err := s.querier.DenomInfo(s.GoCtx(), + _, err := s.querier.DenomInfo(s.ctx, nil) s.ErrorContains(err, "nil msg") }) s.Run("case: fail denom validation", func() { - _, err := s.querier.DenomInfo(s.GoCtx(), + _, err := s.querier.DenomInfo(s.ctx, &types.QueryDenomInfoRequest{ Denom: "notadenom", }) @@ -89,7 +89,7 @@ func (s *TestSuite) TestQueryDenomInfo() { }) s.Run("case: happy", func() { - resp, err := s.querier.DenomInfo(s.GoCtx(), + resp, err := s.querier.DenomInfo(s.ctx, &types.QueryDenomInfoRequest{ Denom: denom.Denom().String(), }) diff --git a/x/tokenfactory/keeper/keeper_test.go b/x/tokenfactory/keeper/keeper_test.go index de76dff92e..5447e09db8 100644 --- a/x/tokenfactory/keeper/keeper_test.go +++ b/x/tokenfactory/keeper/keeper_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "context" "fmt" "testing" @@ -48,26 +47,23 @@ func (s *TestSuite) SetupTest() { } func (s *TestSuite) HandleMsg(txMsg sdk.Msg) (err error) { - goCtx := sdk.WrapSDKContext(s.ctx) switch txMsg := txMsg.(type) { case *tftypes.MsgCreateDenom: - _, err = s.app.TokenFactoryKeeper.CreateDenom(goCtx, txMsg) + _, err = s.app.TokenFactoryKeeper.CreateDenom(s.ctx, txMsg) case *tftypes.MsgMint: - _, err = s.app.TokenFactoryKeeper.Mint(goCtx, txMsg) + _, err = s.app.TokenFactoryKeeper.Mint(s.ctx, txMsg) case *tftypes.MsgBurn: - _, err = s.app.TokenFactoryKeeper.Burn(goCtx, txMsg) + _, err = s.app.TokenFactoryKeeper.Burn(s.ctx, txMsg) case *tftypes.MsgChangeAdmin: - _, err = s.app.TokenFactoryKeeper.ChangeAdmin(goCtx, txMsg) + _, err = s.app.TokenFactoryKeeper.ChangeAdmin(s.ctx, txMsg) case *tftypes.MsgSetDenomMetadata: - _, err = s.app.TokenFactoryKeeper.SetDenomMetadata(goCtx, txMsg) + _, err = s.app.TokenFactoryKeeper.SetDenomMetadata(s.ctx, txMsg) case *tftypes.MsgSudoSetDenomMetadata: - _, err = s.app.TokenFactoryKeeper.SudoSetDenomMetadata(goCtx, txMsg) + _, err = s.app.TokenFactoryKeeper.SudoSetDenomMetadata(s.ctx, txMsg) case *tftypes.MsgBurnNative: - _, err = s.app.TokenFactoryKeeper.BurnNative(goCtx, txMsg) + _, err = s.app.TokenFactoryKeeper.BurnNative(s.ctx, txMsg) default: err = fmt.Errorf("unknown message type: %t", txMsg) } return err } - -func (s *TestSuite) GoCtx() context.Context { return sdk.WrapSDKContext(s.ctx) } diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index 50ec209017..1833794160 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -50,7 +50,7 @@ func (s *TestSuite) TestCreateDenom() { Iterate(ctx, collections.Range[string]{}).Values() s.Len(allDenoms, 0) _, err := bapp.TokenFactoryKeeper.CreateDenom( - sdk.WrapSDKContext(s.ctx), &types.MsgCreateDenom{ + s.ctx, &types.MsgCreateDenom{ Sender: addrs[0].String(), Subdenom: "nusd", }, @@ -87,7 +87,7 @@ func (s *TestSuite) TestCreateDenom() { } resp, err := s.app.TokenFactoryKeeper.CreateDenom( - sdk.WrapSDKContext(s.ctx), tc.txMsg, + s.ctx, tc.txMsg, ) if tc.wantErr != "" { @@ -144,7 +144,7 @@ func (s *TestSuite) TestChangeAdmin() { wantErr: "only the current admin can set a new admin", preHook: func(ctx sdk.Context, bapp *app.NibiruApp) { _, err := bapp.TokenFactoryKeeper.CreateDenom( - sdk.WrapSDKContext(ctx), &types.MsgCreateDenom{ + ctx, &types.MsgCreateDenom{ Sender: sbf, Subdenom: "ftt", }, @@ -163,7 +163,7 @@ func (s *TestSuite) TestChangeAdmin() { wantErr: "", preHook: func(ctx sdk.Context, bapp *app.NibiruApp) { _, err := bapp.TokenFactoryKeeper.CreateDenom( - sdk.WrapSDKContext(ctx), &types.MsgCreateDenom{ + ctx, &types.MsgCreateDenom{ Sender: sbf, Subdenom: "ftt", }, @@ -191,7 +191,7 @@ func (s *TestSuite) TestChangeAdmin() { } _, err := s.app.TokenFactoryKeeper.ChangeAdmin( - sdk.WrapSDKContext(s.ctx), tc.txMsg, + s.ctx, tc.txMsg, ) if tc.wantErr != "" { @@ -260,7 +260,7 @@ func (s *TestSuite) TestUpdateModuleParams() { s.Run(tc.name, func() { s.SetupTest() _, err := s.app.TokenFactoryKeeper.UpdateModuleParams( - sdk.WrapSDKContext(s.ctx), tc.txMsg, + s.ctx, tc.txMsg, ) if tc.wantErr != "" { diff --git a/x/tokenfactory/module.go b/x/tokenfactory/module.go index d7eb8580b3..7d2168e66b 100644 --- a/x/tokenfactory/module.go +++ b/x/tokenfactory/module.go @@ -17,7 +17,6 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" store "cosmossdk.io/store/types" - abci "github.com/cometbft/cometbft/abci/types" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdkcodec "github.com/cosmos/cosmos-sdk/codec" @@ -48,6 +47,7 @@ var ( _ module.HasGenesis = AppModule{} _ module.HasServices = AppModule{} _ module.HasInvariants = AppModule{} + _ appmodule.HasEndBlocker = AppModule{} ) // ConsensusVersion defines the current module consensus version. @@ -174,8 +174,8 @@ func (am AppModule) BeginBlock(_ context.Context) error { // EndBlock executes all ABCI EndBlock logic respective to the fee-share module. It // returns no validator updates. -func (am AppModule) EndBlock(_ context.Context) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(_ context.Context) error { + return nil } // InitGenesis performs the fees module's genesis initialization. It returns diff --git a/x/tokenfactory/module_test.go b/x/tokenfactory/module_test.go index 15e83b21e0..34fa7905c6 100644 --- a/x/tokenfactory/module_test.go +++ b/x/tokenfactory/module_test.go @@ -26,8 +26,10 @@ func (s *ModuleTestSuite) TestAppModule() { s.NotPanics(func() { s.T().Log("begin and end block") - appModule.BeginBlock(ctx) - appModule.EndBlock(ctx) + err := appModule.BeginBlock(ctx) + s.Require().NoError(err) + err = appModule.EndBlock(ctx) + s.Require().NoError(err) s.T().Log("AppModule.ExportGenesis") cdc := bapp.AppCodec() @@ -35,7 +37,7 @@ func (s *ModuleTestSuite) TestAppModule() { genesis := types.DefaultGenesis() genState := new(types.GenesisState) - err := cdc.UnmarshalJSON(jsonBz, genState) + err = cdc.UnmarshalJSON(jsonBz, genState) s.NoError(err) s.EqualValues(*genesis, *genState, "exported (got): %s", jsonBz) From 0eac8a6b82dcae0701da79bfb0a59cb97cb3205e Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 13 May 2025 17:07:07 +0700 Subject: [PATCH 46/72] lint --- app/export.go | 5 ++++- cmd/nibid/cmd/decode_base64.go | 4 ++-- gosdk/gosdk.go | 2 +- gosdk/grpc.go | 4 ++-- x/devgas/v1/keeper/grpc_query_test.go | 2 -- x/devgas/v1/keeper/msg_server_test.go | 3 --- x/devgas/v1/types/codec.go | 3 --- x/devgas/v1/types/msg.go | 15 --------------- x/devgas/v1/types/msg_test.go | 6 ------ x/evm/codec.go | 2 -- x/evm/keeper/msg_ethereum_tx_test.go | 1 - x/evm/msg.go | 15 --------------- x/inflation/types/codec.go | 8 -------- x/inflation/types/msgs.go | 22 +++------------------- x/oracle/cli/tx.go | 12 ++++++------ x/oracle/keeper/reward.go | 6 +++++- x/oracle/keeper/slash.go | 6 +++++- x/tokenfactory/keeper/wasm_test.go | 4 ++-- 18 files changed, 30 insertions(+), 90 deletions(-) diff --git a/app/export.go b/app/export.go index bfb0e48d4c..1a3919f830 100644 --- a/app/export.go +++ b/app/export.go @@ -173,7 +173,7 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs /* Handle staking state. */ // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { + err = app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { for i := range red.Entries { red.Entries[i].CreationHeight = 0 } @@ -183,6 +183,9 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs } return false }) + if err != nil { + panic(err) + } // iterate through unbonding delegations, reset creation height err = app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { diff --git a/cmd/nibid/cmd/decode_base64.go b/cmd/nibid/cmd/decode_base64.go index f7a053f9fb..f8fdb18dab 100644 --- a/cmd/nibid/cmd/decode_base64.go +++ b/cmd/nibid/cmd/decode_base64.go @@ -6,11 +6,11 @@ import ( "fmt" "strings" + "github.com/cosmos/gogoproto/proto" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - sdkcodec "github.com/cosmos/cosmos-sdk/codec" wasmvm "github.com/CosmWasm/wasmvm/v2/types" ) @@ -119,7 +119,7 @@ func DecodeBase64StargateMsgs( } decodedBz, _ := base64.StdEncoding.Strict().DecodeString(string(sgMsg.Value)) - concrete := protoMsg.(sdkcodec.ProtoMarshaler) + concrete := protoMsg.(proto.Message) err = codec.Unmarshal(decodedBz, concrete) if err != nil { diff --git a/gosdk/gosdk.go b/gosdk/gosdk.go index 014a2842c1..018889e5da 100644 --- a/gosdk/gosdk.go +++ b/gosdk/gosdk.go @@ -99,7 +99,7 @@ func GetAccountNumbers( } // register auth interface - var acc authtypes.AccountI + var acc sdk.AccountI if err := encCfg.InterfaceRegistry.UnpackAny(resp.Account, &acc); err != nil { return nums, err } diff --git a/gosdk/grpc.go b/gosdk/grpc.go index 84a6c9871e..3aecee086b 100644 --- a/gosdk/grpc.go +++ b/gosdk/grpc.go @@ -25,7 +25,7 @@ func GetGRPCConnection( } options := []grpc.DialOption{ - grpc.WithBlock(), + grpc.WithBlock(), //nolint:staticcheck grpc.WithTransportCredentials(creds), } timeout := time.Duration(timeoutSeconds) * time.Second @@ -34,7 +34,7 @@ func GetGRPCConnection( ) defer cancel() - conn, err := grpc.DialContext(ctx, grpcUrl, options...) + conn, err := grpc.DialContext(ctx, grpcUrl, options...) //nolint:staticcheck if err != nil { return nil, fmt.Errorf( "%w: Cannot connect to gRPC endpoint %s\n", err, grpcUrl) diff --git a/x/devgas/v1/keeper/grpc_query_test.go b/x/devgas/v1/keeper/grpc_query_test.go index e03ada9662..535577c8c5 100644 --- a/x/devgas/v1/keeper/grpc_query_test.go +++ b/x/devgas/v1/keeper/grpc_query_test.go @@ -119,7 +119,6 @@ func (s *KeeperTestSuite) TestFeeSharesByWithdrawer() { // RegsisFeeShare for _, contractAddress := range contractAddressList { - msg := &devgastypes.MsgRegisterFeeShare{ ContractAddress: contractAddress, DeployerAddress: sender.String(), @@ -131,7 +130,6 @@ func (s *KeeperTestSuite) TestFeeSharesByWithdrawer() { } s.Run("Total", func() { - resp, err := s.queryClient.FeeSharesByWithdrawer(s.ctx, &devgastypes.QueryFeeSharesByWithdrawerRequest{ WithdrawerAddress: withdrawer.String(), diff --git a/x/devgas/v1/keeper/msg_server_test.go b/x/devgas/v1/keeper/msg_server_test.go index 6b5eef8b2b..921bb37f65 100644 --- a/x/devgas/v1/keeper/msg_server_test.go +++ b/x/devgas/v1/keeper/msg_server_test.go @@ -232,7 +232,6 @@ func (s *KeeperTestSuite) TestRegisterFeeShare() { } { tc := tc s.Run(tc.desc, func() { - if !tc.shouldErr { resp, err := s.devgasMsgServer.RegisterFeeShare(s.ctx, tc.msg) s.Require().NoError(err) @@ -330,7 +329,6 @@ func (s *KeeperTestSuite) TestUpdateFeeShare() { } { tc := tc s.Run(tc.desc, func() { - if !tc.shouldErr { _, err := s.devgasMsgServer.UpdateFeeShare(s.ctx, tc.msg) s.Require().NoError(err) @@ -396,7 +394,6 @@ func (s *KeeperTestSuite) TestCancelFeeShare() { } { tc := tc s.Run(tc.desc, func() { - if !tc.shouldErr { resp, err := s.devgasMsgServer.CancelFeeShare(s.ctx, tc.msg) s.Require().NoError(err) diff --git a/x/devgas/v1/types/codec.go b/x/devgas/v1/types/codec.go index 4235e09da1..758efef886 100644 --- a/x/devgas/v1/types/codec.go +++ b/x/devgas/v1/types/codec.go @@ -16,9 +16,6 @@ var ( // The actual codec used for serialization should be provided to // modules/erc20 and defined at the application level. ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) - - // AminoCdc is a amino codec created to support amino JSON compatible msgs. - AminoCdc = codec.NewAminoCodec(amino) ) const ( diff --git a/x/devgas/v1/types/msg.go b/x/devgas/v1/types/msg.go index ae70d728c4..fe14ce954a 100644 --- a/x/devgas/v1/types/msg.go +++ b/x/devgas/v1/types/msg.go @@ -61,11 +61,6 @@ func (msg MsgRegisterFeeShare) ValidateBasic() error { return nil } -// GetSignBytes encodes the message for signing -func (msg *MsgRegisterFeeShare) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg)) -} - // GetSigners defines whose signature is required func (msg MsgRegisterFeeShare) GetSigners() []sdk.AccAddress { from, _ := sdk.AccAddressFromBech32(msg.DeployerAddress) @@ -102,11 +97,6 @@ func (msg MsgCancelFeeShare) ValidateBasic() error { return nil } -// GetSignBytes encodes the message for signing -func (msg *MsgCancelFeeShare) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg)) -} - // GetSigners defines whose signature is required func (msg MsgCancelFeeShare) GetSigners() []sdk.AccAddress { funder, _ := sdk.AccAddressFromBech32(msg.DeployerAddress) @@ -149,11 +139,6 @@ func (msg MsgUpdateFeeShare) ValidateBasic() error { return nil } -// GetSignBytes encodes the message for signing -func (msg *MsgUpdateFeeShare) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg)) -} - // GetSigners defines whose signature is required func (msg MsgUpdateFeeShare) GetSigners() []sdk.AccAddress { from, _ := sdk.AccAddressFromBech32(msg.DeployerAddress) diff --git a/x/devgas/v1/types/msg_test.go b/x/devgas/v1/types/msg_test.go index 38ef569cff..b13bb83a8a 100644 --- a/x/devgas/v1/types/msg_test.go +++ b/x/devgas/v1/types/msg_test.go @@ -30,7 +30,6 @@ func (suite *MsgsTestSuite) SetupTest() { } func (suite *MsgsTestSuite) TestMsgRegisterFeeShareGetters() { - msgInvalid := MsgRegisterFeeShare{} msg := NewMsgRegisterFeeShare( suite.contract, suite.deployer, @@ -38,7 +37,6 @@ func (suite *MsgsTestSuite) TestMsgRegisterFeeShareGetters() { ) suite.Require().Equal(RouterKey, msg.Route()) suite.Require().Equal(TypeMsgRegisterFeeShare, msg.Type()) - suite.Require().NotNil(msgInvalid.GetSignBytes()) suite.Require().NotNil(msg.GetSigners()) } @@ -112,14 +110,12 @@ func (suite *MsgsTestSuite) TestMsgRegisterFeeShareNew() { } func (suite *MsgsTestSuite) TestMsgCancelFeeShareGetters() { - msgInvalid := MsgCancelFeeShare{} msg := NewMsgCancelFeeShare( suite.contract, sdk.AccAddress(suite.deployer.Bytes()), ) suite.Require().Equal(RouterKey, msg.Route()) suite.Require().Equal(TypeMsgCancelFeeShare, msg.Type()) - suite.Require().NotNil(msgInvalid.GetSignBytes()) suite.Require().NotNil(msg.GetSigners()) } @@ -167,7 +163,6 @@ func (suite *MsgsTestSuite) TestMsgCancelFeeShareNew() { } func (suite *MsgsTestSuite) TestMsgUpdateFeeShareGetters() { - msgInvalid := MsgUpdateFeeShare{} msg := NewMsgUpdateFeeShare( suite.contract, sdk.AccAddress(suite.deployer.Bytes()), @@ -175,7 +170,6 @@ func (suite *MsgsTestSuite) TestMsgUpdateFeeShareGetters() { ) suite.Require().Equal(RouterKey, msg.Route()) suite.Require().Equal(TypeMsgUpdateFeeShare, msg.Type()) - suite.Require().NotNil(msgInvalid.GetSignBytes()) suite.Require().NotNil(msg.GetSigners()) } diff --git a/x/evm/codec.go b/x/evm/codec.go index 521ebf17e0..1f85c39ec9 100644 --- a/x/evm/codec.go +++ b/x/evm/codec.go @@ -14,8 +14,6 @@ import ( var ( amino = codec.NewLegacyAmino() - // AminoCdc is a amino codec created to support amino JSON compatible msgs. - AminoCdc = codec.NewAminoCodec(amino) ) // NOTE: This is required for the GetSignBytes function diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index 882c4fb8fe..1ad71dbeb1 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -265,5 +265,4 @@ func (s *Suite) TestEthereumTx_ABCI() { s.EqualValuesf(21000, gasInfo.GasUsed, "%d", gasInfo.GasUsed) s.EqualValuesf(21000, gasInfo.GasWanted, "%d", gasInfo.GasWanted) - } diff --git a/x/evm/msg.go b/x/evm/msg.go index 40efb5884c..d6c55e8bf8 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -430,11 +430,6 @@ func (m *MsgUpdateParams) ValidateBasic() error { return m.Params.Validate() } -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) -} - // UnwrapEthereumMsg extracts MsgEthereumTx from wrapping sdk.Tx func UnwrapEthereumMsg(tx *sdk.Tx, ethHash common.Hash) (*MsgEthereumTx, error) { if tx == nil { @@ -526,11 +521,6 @@ func (m *MsgCreateFunToken) ValidateBasic() error { return nil } -// GetSignBytes implements the LegacyMsg interface. -func (m MsgCreateFunToken) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgConvertCoinToEvm message. func (m MsgConvertCoinToEvm) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Sender) @@ -547,8 +537,3 @@ func (m *MsgConvertCoinToEvm) ValidateBasic() error { } return nil } - -// GetSignBytes implements the LegacyMsg interface. -func (m MsgConvertCoinToEvm) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) -} diff --git a/x/inflation/types/codec.go b/x/inflation/types/codec.go index b939b24a90..14a97ea4a0 100644 --- a/x/inflation/types/codec.go +++ b/x/inflation/types/codec.go @@ -27,14 +27,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { var ( amino = codec.NewLegacyAmino() - - // ModuleCdc references the global x/inflation module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding as Amino is - // still used for that purpose. - // - // The actual codec used for serialization should be provided to x/staking and - // defined at the application level. - ModuleCdc = codec.NewAminoCodec(amino) ) func init() { diff --git a/x/inflation/types/msgs.go b/x/inflation/types/msgs.go index f57ac96f8e..df8c4c1455 100644 --- a/x/inflation/types/msgs.go +++ b/x/inflation/types/msgs.go @@ -5,14 +5,13 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) // ensure Msg interface compliance at compile time var ( - _ legacytx.LegacyMsg = &MsgEditInflationParams{} - _ legacytx.LegacyMsg = &MsgToggleInflation{} - _ legacytx.LegacyMsg = &MsgBurn{} + _ sdk.Msg = &MsgEditInflationParams{} + _ sdk.Msg = &MsgToggleInflation{} + _ sdk.Msg = &MsgBurn{} ) // oracle message types @@ -28,11 +27,6 @@ func (msg MsgEditInflationParams) Route() string { return RouterKey } // Type implements legacytx.LegacyMsg func (msg MsgEditInflationParams) Type() string { return TypeMsgEditInflationParams } -// GetSignBytes implements legacytx.LegacyMsg -func (msg MsgEditInflationParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - // GetSigners implements sdk.Msg func (msg MsgEditInflationParams) GetSigners() []sdk.AccAddress { feeder, err := sdk.AccAddressFromBech32(msg.Sender) @@ -85,11 +79,6 @@ func (msg MsgToggleInflation) Route() string { return RouterKey } // Type implements legacytx.LegacyMsg func (msg MsgToggleInflation) Type() string { return TypeMsgToggleInflation } -// GetSignBytes implements legacytx.LegacyMsg -func (msg MsgToggleInflation) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - // GetSigners implements sdk.Msg func (msg MsgToggleInflation) GetSigners() []sdk.AccAddress { feeder, err := sdk.AccAddressFromBech32(msg.Sender) @@ -115,11 +104,6 @@ func (msg MsgBurn) Route() string { return RouterKey } // Type implements legacytx.LegacyMsg func (msg MsgBurn) Type() string { return TypeMsgBurn } -// GetSignBytes implements legacytx.LegacyMsg -func (msg MsgBurn) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - // GetSigners implements legacytx.LegacyMsg func (msg MsgBurn) GetSigners() []sdk.AccAddress { feeder, err := sdk.AccAddressFromBech32(msg.Sender) diff --git a/x/oracle/cli/tx.go b/x/oracle/cli/tx.go index 7d4a78457f..76344c2b0b 100644 --- a/x/oracle/cli/tx.go +++ b/x/oracle/cli/tx.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "cosmossdk.io/math" + sdkmath "cosmossdk.io/math" "github.com/NibiruChain/nibiru/v2/x/common/asset" "github.com/NibiruChain/nibiru/v2/x/oracle/types" @@ -249,7 +249,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if voteThreshold, _ := cmd.Flags().GetString("vote-threshold"); voteThreshold != "" { - voteThresholdDec, err := math.LegacyNewDecFromStr(voteThreshold) + voteThresholdDec, err := sdkmath.LegacyNewDecFromStr(voteThreshold) if err != nil { return err } @@ -258,7 +258,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if rewardBand, _ := cmd.Flags().GetString("reward-band"); rewardBand != "" { - rewardBandDec, err := math.LegacyNewDecFromStr(rewardBand) + rewardBandDec, err := sdkmath.LegacyNewDecFromStr(rewardBand) if err != nil { return err } @@ -267,7 +267,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if slashFraction, _ := cmd.Flags().GetString("slash-fraction"); slashFraction != "" { - slashFractionDec, err := math.LegacyNewDecFromStr(slashFraction) + slashFractionDec, err := sdkmath.LegacyNewDecFromStr(slashFraction) if err != nil { return err } @@ -280,7 +280,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if minValidPerWindow, _ := cmd.Flags().GetString("min-valid-per-window"); minValidPerWindow != "" { - minValidPerWindowDec, err := math.LegacyNewDecFromStr(minValidPerWindow) + minValidPerWindowDec, err := sdkmath.LegacyNewDecFromStr(minValidPerWindow) if err != nil { return err } @@ -298,7 +298,7 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban } if validatorFeeRatio, _ := cmd.Flags().GetString("validator-fee-ratio"); validatorFeeRatio != "" { - validatorFeeRatioDec, err := math.LegacyNewDecFromStr(validatorFeeRatio) + validatorFeeRatioDec, err := sdkmath.LegacyNewDecFromStr(validatorFeeRatio) if err != nil { return err } diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go index d8319d5f28..770bbf1d6b 100644 --- a/x/oracle/keeper/reward.go +++ b/x/oracle/keeper/reward.go @@ -53,7 +53,11 @@ func (k Keeper) rewardWinners( } rewardPortion, _ := totalRewards.MulDec(sdkmath.LegacyNewDec(validatorPerformance.RewardWeight).QuoInt64(totalRewardWeight)).TruncateDecimal() - k.distrKeeper.AllocateTokensToValidator(ctx, validator, sdk.NewDecCoinsFromCoins(rewardPortion...)) + err = k.distrKeeper.AllocateTokensToValidator(ctx, validator, sdk.NewDecCoinsFromCoins(rewardPortion...)) + // TODO: Handle error + if err != nil { + panic(err) + } distributedRewards = distributedRewards.Add(rewardPortion...) } diff --git a/x/oracle/keeper/slash.go b/x/oracle/keeper/slash.go index 2e64f89732..70485624c8 100644 --- a/x/oracle/keeper/slash.go +++ b/x/oracle/keeper/slash.go @@ -52,7 +52,11 @@ func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) { panic(err) } k.Logger(ctx).Info("oracle slash", "validator", consAddr, "fraction", slashFraction.String()) - k.slashingKeeper.Jail(ctx, consAddr) + err = k.slashingKeeper.Jail(ctx, consAddr) + if err != nil { + // TODO: Handle error + panic(err) + } } } diff --git a/x/tokenfactory/keeper/wasm_test.go b/x/tokenfactory/keeper/wasm_test.go index b72bd2b0ac..66c7ee282b 100644 --- a/x/tokenfactory/keeper/wasm_test.go +++ b/x/tokenfactory/keeper/wasm_test.go @@ -13,9 +13,9 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/cosmos/gogoproto/proto" wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types" - codec "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" @@ -267,7 +267,7 @@ func (s *TestSuite) TestStargateSerde() { for _, tc := range testCases { s.Run(tc.typeUrl, func() { - pbMsg, _ := (tc.sdkMsg).(codec.ProtoMarshaler) + pbMsg, _ := (tc.sdkMsg).(proto.Message) sgMsgValue := s.encConfig.Codec.MustMarshal(pbMsg) sgMsg := wasmvmtypes.AnyMsg{ TypeURL: tc.typeUrl, From bd20e3c51d4113fdf9fa7bb9b48e9e80021b1675 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 13 May 2025 20:23:18 +0700 Subject: [PATCH 47/72] seal devgas amino and lint --- cmd/nibid/cmd/decode_base64.go | 6 ++---- x/devgas/v1/types/codec.go | 4 ++++ x/devgas/v1/types/msg.go | 5 ----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cmd/nibid/cmd/decode_base64.go b/cmd/nibid/cmd/decode_base64.go index f8fdb18dab..fc8ef1078e 100644 --- a/cmd/nibid/cmd/decode_base64.go +++ b/cmd/nibid/cmd/decode_base64.go @@ -6,7 +6,6 @@ import ( "fmt" "strings" - "github.com/cosmos/gogoproto/proto" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -119,14 +118,13 @@ func DecodeBase64StargateMsgs( } decodedBz, _ := base64.StdEncoding.Strict().DecodeString(string(sgMsg.Value)) - concrete := protoMsg.(proto.Message) - err = codec.Unmarshal(decodedBz, concrete) + err = codec.Unmarshal(decodedBz, protoMsg) if err != nil { return newSgMsgs, err } - outBytes, err := codec.MarshalJSON(concrete) + outBytes, err := codec.MarshalJSON(protoMsg) if err != nil { return newSgMsgs, err } diff --git a/x/devgas/v1/types/codec.go b/x/devgas/v1/types/codec.go index 758efef886..1a0b432e22 100644 --- a/x/devgas/v1/types/codec.go +++ b/x/devgas/v1/types/codec.go @@ -7,6 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" ) +func init() { + amino.Seal() +} + var ( amino = codec.NewLegacyAmino() diff --git a/x/devgas/v1/types/msg.go b/x/devgas/v1/types/msg.go index fe14ce954a..a40d49cb94 100644 --- a/x/devgas/v1/types/msg.go +++ b/x/devgas/v1/types/msg.go @@ -147,11 +147,6 @@ func (msg MsgUpdateFeeShare) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgUpdateParams{} -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - // GetSigners returns the expected signers for a MsgUpdateParams message. func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) From 052965f92b59e2cee5be9ae6e556dc12c8eca805 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 19 May 2025 10:59:43 +0700 Subject: [PATCH 48/72] fix BlockBloom event in backend --- eth/rpc/rpcapi/blocks.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eth/rpc/rpcapi/blocks.go b/eth/rpc/rpcapi/blocks.go index f61220c524..96db6f2302 100644 --- a/eth/rpc/rpcapi/blocks.go +++ b/eth/rpc/rpcapi/blocks.go @@ -8,6 +8,7 @@ import ( "math/big" "strconv" + abcicmt "github.com/cometbft/cometbft/abci/types" cmtrpcclient "github.com/cometbft/cometbft/rpc/client" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -344,7 +345,18 @@ func (b *Backend) BlockBloom(blockRes *tmrpctypes.ResultBlockResults) (bloom get if event.Type != msgType { continue } - blockBloomEvent, err := evm.EventBlockBloomFromABCIEvent(event) + + // Trim the event to only include the bloom attribute and ignore the rest, which is: + // { + // "key": "mode", + // "value": "EndBlock", + // "index": true + // } + trimmedEvent := abcicmt.Event{ + Type: event.Type, + Attributes: []abcicmt.EventAttribute{event.Attributes[0]}, + } + blockBloomEvent, err := evm.EventBlockBloomFromABCIEvent(trimmedEvent) if err != nil { continue } From 46087d1662923e4ba7701f62baf38632114889b9 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 19 May 2025 14:41:09 +0700 Subject: [PATCH 49/72] sanitize event --- eth/rpc/rpcapi/blocks.go | 45 ++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/eth/rpc/rpcapi/blocks.go b/eth/rpc/rpcapi/blocks.go index 96db6f2302..d97257e531 100644 --- a/eth/rpc/rpcapi/blocks.go +++ b/eth/rpc/rpcapi/blocks.go @@ -2,11 +2,13 @@ package rpcapi import ( + "encoding/json" "errors" "fmt" "math" "math/big" "strconv" + "strings" abcicmt "github.com/cometbft/cometbft/abci/types" cmtrpcclient "github.com/cometbft/cometbft/rpc/client" @@ -346,17 +348,9 @@ func (b *Backend) BlockBloom(blockRes *tmrpctypes.ResultBlockResults) (bloom get continue } - // Trim the event to only include the bloom attribute and ignore the rest, which is: - // { - // "key": "mode", - // "value": "EndBlock", - // "index": true - // } - trimmedEvent := abcicmt.Event{ - Type: event.Type, - Attributes: []abcicmt.EventAttribute{event.Attributes[0]}, - } - blockBloomEvent, err := evm.EventBlockBloomFromABCIEvent(trimmedEvent) + sanitizedEvent := SanitizeEventForParsing(event) + + blockBloomEvent, err := evm.EventBlockBloomFromABCIEvent(sanitizedEvent) if err != nil { continue } @@ -451,6 +445,35 @@ func (b *Backend) RPCBlockFromTendermintBlock( return formattedBlock, nil } +// SanitizeEventForParsing makes sure all values are valid JSON +func SanitizeEventForParsing(event abcicmt.Event) abcicmt.Event { + sanitized := abcicmt.Event{ + Type: event.Type, + Attributes: make([]abcicmt.EventAttribute, 0, len(event.Attributes)), + } + + for _, attr := range event.Attributes { + val := strings.TrimSpace(attr.Value) + + if !isValidJSON(val) { + val = strconv.Quote(val) + } + + sanitized.Attributes = append(sanitized.Attributes, abcicmt.EventAttribute{ + Key: attr.Key, + Value: val, + Index: attr.Index, + }) + } + + return sanitized +} + +func isValidJSON(val string) bool { + var js json.RawMessage + return json.Unmarshal([]byte(val), &js) == nil +} + // EthBlockByNumber returns the Ethereum Block identified by number. func (b *Backend) EthBlockByNumber(blockNum rpc.BlockNumber) (*gethcore.Block, error) { resBlock, err := b.TendermintBlockByNumber(blockNum) From 66f445abf9018b1c07a0814eae8aae75b4a09c50 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 19 May 2025 16:12:07 +0700 Subject: [PATCH 50/72] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6677d3da5..1ef5deb9a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- [#2308](https://github.com/NibiruChain/nibiru/pull/2308) - feat: cosmos v50 upgrade + ## v2.4.0 - [#2274](https://github.com/NibiruChain/nibiru/pull/2274) - feat(evm)!: update to geth v1.13 with EIP-1153, PRECOMPILE_ADDRS, and transient storage support From 523d709a4c984dd6c4e33ca85e8a53e7eec7e464 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 23 May 2025 15:38:15 +0700 Subject: [PATCH 51/72] adding msgResponses in DispatchMsg --- app/wasmext/wasm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/wasmext/wasm.go b/app/wasmext/wasm.go index 38ecd05bdc..7fc198991b 100644 --- a/app/wasmext/wasm.go +++ b/app/wasmext/wasm.go @@ -136,6 +136,7 @@ func (h SDKMessageHandler) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddr } // append data data = append(data, res.Data) + msgResponses = append(msgResponses, res.MsgResponses) // append events sdkEvents := make([]sdk.Event, len(res.Events)) for i := range res.Events { From 9bb1f1451c38605c44d194e0136cdedf3b46ea8e Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 27 May 2025 16:07:20 +0700 Subject: [PATCH 52/72] use NewContextLegacy --- app/ante/testutil_test.go | 9 ++++++++- app/export.go | 4 +++- app/simapp/sim_test.go | 6 ++++-- x/common/testutil/testapp/testapp.go | 2 +- x/genmsg/integration_test.go | 6 +++++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/ante/testutil_test.go b/app/ante/testutil_test.go index ea367fd969..c765de8480 100644 --- a/app/ante/testutil_test.go +++ b/app/ante/testutil_test.go @@ -3,6 +3,9 @@ package ante_test import ( "context" "testing" + "time" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -36,7 +39,11 @@ type AnteTestSuite struct { func (suite *AnteTestSuite) SetupTest() { suite.app, _ = testapp.NewNibiruTestApp(suite.T().TempDir(), app.GenesisState{}) chainId := "test-chain-id" - ctx := suite.app.NewContext(true) + ctx := suite.app.NewContextLegacy(true, tmproto.Header{ + Height: 1, + ChainID: chainId, + Time: time.Now().UTC(), + }) suite.ctx = ctx // Set up TxConfig diff --git a/app/export.go b/app/export.go index 1a3919f830..f53bd96320 100644 --- a/app/export.go +++ b/app/export.go @@ -4,6 +4,8 @@ import ( "encoding/json" "log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + storetypes "cosmossdk.io/store/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,7 +20,7 @@ func (app *NibiruApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContext(true) + ctx := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. diff --git a/app/simapp/sim_test.go b/app/simapp/sim_test.go index 9d105e66cf..f2817ff971 100644 --- a/app/simapp/sim_test.go +++ b/app/simapp/sim_test.go @@ -9,6 +9,8 @@ import ( "strings" "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" evidencetypes "cosmossdk.io/x/evidence/types" @@ -264,8 +266,8 @@ func TestAppImportExport(t *testing.T) { } }() - ctxA := oldApp.NewContext(true) - ctxB := newApp.NewContext(true) + ctxA := oldApp.NewContextLegacy(true, tmproto.Header{Height: oldApp.LastBlockHeight()}) + ctxB := newApp.NewContextLegacy(true, tmproto.Header{Height: oldApp.LastBlockHeight()}) _, err = newApp.ModuleManager.InitGenesis(ctxB, oldApp.AppCodec(), genesisState) require.NoError(t, err) err = newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index 71cd7a809f..6d1d96df21 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -58,7 +58,7 @@ func NewContext(nibiru *app.NibiruApp) sdk.Context { Height: 1, Time: time.Now().UTC(), } - ctx := nibiru.NewContext(false) + ctx := nibiru.NewContextLegacy(false, blockHeader) // Make sure there's a block proposer on the context. blockHeader.ProposerAddress = FirstBlockProposer(nibiru, ctx) diff --git a/x/genmsg/integration_test.go b/x/genmsg/integration_test.go index 8eed4d0900..1fed755880 100644 --- a/x/genmsg/integration_test.go +++ b/x/genmsg/integration_test.go @@ -3,6 +3,8 @@ package genmsg_test import ( "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -47,7 +49,9 @@ func TestGenmsgInGenesis(t *testing.T) { ) app, _ := testapp.NewNibiruTestApp(t.TempDir(), appGenesis) - ctx := app.NewContext(false) + ctx := app.NewContextLegacy(false, tmproto.Header{ + Height: 1, + }) balance, err := app.BankKeeper.Balance(ctx, &banktypes.QueryBalanceRequest{ Address: recvAddr.String(), From 60eaa00e07818702ca88aa23807d36e9575aa3ea Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 27 May 2025 16:36:01 +0700 Subject: [PATCH 53/72] update v2.4.0 upgrade --- app/upgrades/v2_4_0/constants.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/upgrades/v2_4_0/constants.go b/app/upgrades/v2_4_0/constants.go index 9df428d213..3388829bec 100644 --- a/app/upgrades/v2_4_0/constants.go +++ b/app/upgrades/v2_4_0/constants.go @@ -1,12 +1,7 @@ package v2_4_0 import ( - "context" - "cosmossdk.io/store/types" - upgradetypes "cosmossdk.io/x/upgrade/types" - "github.com/cosmos/cosmos-sdk/types/module" - clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/NibiruChain/nibiru/v2/app/upgrades" ) From ec23456581f3a93b8f2f95726186c2a4c5bf576e Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 27 May 2025 21:38:09 +0700 Subject: [PATCH 54/72] correct query cli --- cmd/nibid/cmd/root.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index 185d095b6f..6498c64565 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -177,13 +177,14 @@ func queryCommand() *cobra.Command { } rootQueryCmd.AddCommand( + rpc.WaitTxCmd(), rpc.ValidatorCommand(), + sdkserver.QueryBlocksCmd(), authcmd.QueryTxsByEventsCmd(), authcmd.QueryTxCmd(), + sdkserver.QueryBlockResultsCmd(), ) - // Adds all query commands to the 'rootQueryCmd' - app.ModuleBasics.AddQueryCommands(rootQueryCmd) rootQueryCmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return rootQueryCmd From dc127aac3f326b9d55bca43b128026e61d3523cd Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 30 May 2025 15:51:46 +0700 Subject: [PATCH 55/72] using tempdir for simulation tests --- app/simapp/sim_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/simapp/sim_test.go b/app/simapp/sim_test.go index f2817ff971..cdfbc963e4 100644 --- a/app/simapp/sim_test.go +++ b/app/simapp/sim_test.go @@ -76,7 +76,7 @@ func TestFullAppSimulation(t *testing.T) { }() appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome + appOptions[flags.FlagHome] = t.TempDir() appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue app := app.NewNibiruApp(logger, db, nil, true, appOptions, baseapp.SetChainID(SimAppChainID)) @@ -127,7 +127,6 @@ func TestAppStateDeterminism(t *testing.T) { appHashList := make([]json.RawMessage, numTimesToRunPerSeed) appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue for i := 0; i < numSeeds; i++ { @@ -136,7 +135,7 @@ func TestAppStateDeterminism(t *testing.T) { for j := 0; j < numTimesToRunPerSeed; j++ { db := dbm.NewMemDB() logger := log.NewNopLogger() - + appOptions[flags.FlagHome] = t.TempDir() app := app.NewNibiruApp(logger, db, nil, true, appOptions, baseapp.SetChainID(SimAppChainID)) // Registers interfaces and types that are expected by default in the Cosmos-SDK // even if they are disabled on Nibiru. This is the case for x/vesting Cosmos-SDK @@ -195,7 +194,7 @@ func TestAppImportExport(t *testing.T) { }() appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome + appOptions[flags.FlagHome] = t.TempDir() appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue oldApp := app.NewNibiruApp(logger, db, nil, true, appOptions, baseapp.SetChainID(SimAppChainID)) @@ -329,7 +328,7 @@ func TestAppSimulationAfterImport(t *testing.T) { }() appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = app.DefaultNodeHome + appOptions[flags.FlagHome] = t.TempDir() appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue oldApp := app.NewNibiruApp(logger, db, nil, true, appOptions, baseapp.SetChainID(SimAppChainID)) From b16aeef5d9f06b5da25e8b83eaf071b6468a224e Mon Sep 17 00:00:00 2001 From: expertdicer Date: Fri, 30 May 2025 15:53:09 +0700 Subject: [PATCH 56/72] lint and fix simulation tests --- app/simapp/state_test.go | 14 ++++++++++---- app/upgrades/types.go | 4 +++- x/oracle/simulation/operations.go | 8 ++++---- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/simapp/state_test.go b/app/simapp/state_test.go index fd62fcb11c..6191641df0 100644 --- a/app/simapp/state_test.go +++ b/app/simapp/state_test.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/sims" + "cosmossdk.io/math" sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" @@ -20,6 +21,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/appconst" appsim "github.com/NibiruChain/nibiru/v2/app/sim" ) @@ -149,14 +151,17 @@ func AppStateRandomizedFn( // generate a random amount of initial stake coins and collateral // number of bonded accounts - var initialStake, numInitiallyBonded int64 + var ( + numInitiallyBonded int64 + initialStake math.Int + ) appParams.GetOrGenerate( sims.StakePerAccount, &initialStake, r, - func(r *rand.Rand) { initialStake = r.Int63n(1e12) }, + func(r *rand.Rand) { initialStake = sdk.DefaultPowerReduction.AddRaw(r.Int63n(1e12)) }, ) appParams.GetOrGenerate( sims.InitiallyBondedValidators, &numInitiallyBonded, r, - func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(300)) }, + func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(299) + 1) }, ) if numInitiallyBonded > numAccs { @@ -178,8 +183,9 @@ func AppStateRandomizedFn( Rand: r, GenState: genesisState, Accounts: accs, - InitialStake: sdkmath.NewIntFromUint64(uint64(initialStake)), + InitialStake: initialStake, NumBonded: numInitiallyBonded, + BondDenom: appconst.BondDenom, GenTimestamp: genesisTimestamp, } diff --git a/app/upgrades/types.go b/app/upgrades/types.go index d9874f1091..5766f74ac4 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -6,9 +6,11 @@ import ( store "cosmossdk.io/store/types" "cosmossdk.io/x/upgrade/types" upgradetypes "cosmossdk.io/x/upgrade/types" - "github.com/NibiruChain/nibiru/v2/app/keepers" "github.com/cosmos/cosmos-sdk/types/module" + clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" + + "github.com/NibiruChain/nibiru/v2/app/keepers" ) type Upgrade struct { diff --git a/x/oracle/simulation/operations.go b/x/oracle/simulation/operations.go index 1576909d31..3eddd38031 100644 --- a/x/oracle/simulation/operations.go +++ b/x/oracle/simulation/operations.go @@ -98,7 +98,7 @@ func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.Ba // ensure the validator exists val, err := k.StakingKeeper.Validator(ctx, address) if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, nil } if val == nil || !val.IsBonded() { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "unable to find validator"), nil, nil @@ -165,7 +165,7 @@ func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankK // ensure the validator exists val, err := k.StakingKeeper.Validator(ctx, address) if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, nil } if val == nil || !val.IsBonded() { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRateVote, "unable to find validator"), nil, nil @@ -240,7 +240,7 @@ func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, // ensure the validator exists val, err := k.StakingKeeper.Validator(ctx, valAddress) if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, nil } if val == nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDelegateFeedConsent, "unable to find validator"), nil, nil @@ -249,7 +249,7 @@ func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, // ensure the target address is not a validator val2, err := k.StakingKeeper.Validator(ctx, delegateValAddress) if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, err + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgAggregateExchangeRatePrevote, "error finding validator"), nil, nil } if val2 != nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDelegateFeedConsent, "unable to delegate to validator"), nil, nil From 901ebdf48c0ae4f27763dae40070c8344250bc80 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 2 Jun 2025 15:19:10 +0700 Subject: [PATCH 57/72] TxDataV2 and correct GetSigners for MsgEthereumTx --- api/eth/evm/v1/access_list_tx.go | 63 +++++++++++++++++++++++++++++++ api/eth/evm/v1/dynamic_fee_tx.go | 64 ++++++++++++++++++++++++++++++++ api/eth/evm/v1/legacy_tx.go | 45 ++++++++++++++++++++++ api/eth/evm/v1/msg.go | 55 +++++++++++++++++++++++++++ api/eth/evm/v1/tx_data.go | 45 ++++++++++++++++++++++ utils/eth.go | 46 +++++++++++++++++++++++ x/evm/msg.go | 14 +------ x/evm/tx_data.go | 43 --------------------- x/evm/tx_data_access_list.go | 3 +- x/evm/tx_data_dynamic_fee.go | 3 +- x/evm/tx_data_legacy.go | 5 ++- x/evm/tx_data_test.go | 4 +- 12 files changed, 329 insertions(+), 61 deletions(-) create mode 100644 api/eth/evm/v1/access_list_tx.go create mode 100644 api/eth/evm/v1/dynamic_fee_tx.go create mode 100644 api/eth/evm/v1/legacy_tx.go create mode 100644 api/eth/evm/v1/msg.go create mode 100644 api/eth/evm/v1/tx_data.go create mode 100644 utils/eth.go diff --git a/api/eth/evm/v1/access_list_tx.go b/api/eth/evm/v1/access_list_tx.go new file mode 100644 index 0000000000..6dd9ea9ca2 --- /dev/null +++ b/api/eth/evm/v1/access_list_tx.go @@ -0,0 +1,63 @@ +package evmv1 + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + gethcore "github.com/ethereum/go-ethereum/core/types" + + ethutils "github.com/NibiruChain/nibiru/v2/utils" +) + +// GetChainID returns the chain id field from the AccessListTx +func (tx *AccessListTx) GetChainID() *big.Int { + return stringToBigInt(tx.GetChainId()) +} + +// GetAccessList returns the AccessList field. +func (tx *AccessListTx) GetAccessList() gethcore.AccessList { + if tx.Accesses == nil { + return nil + } + var ethAccessList gethcore.AccessList + + for _, tuple := range tx.Accesses { + storageKeys := make([]common.Hash, len(tuple.StorageKeys)) + + for i := range tuple.StorageKeys { + storageKeys[i] = common.HexToHash(tuple.StorageKeys[i]) + } + + ethAccessList = append(ethAccessList, gethcore.AccessTuple{ + Address: common.HexToAddress(tuple.Address), + StorageKeys: storageKeys, + }) + } + + return ethAccessList +} + +// AsEthereumData returns an AccessListTx transaction tx from the proto-formatted +// TxData defined on the Cosmos EVM. +func (tx *AccessListTx) AsEthereumData() gethcore.TxData { + v, r, s := tx.GetRawSignatureValues() + return &gethcore.AccessListTx{ + ChainID: tx.GetChainID(), + Nonce: tx.GetNonce(), + GasPrice: stringToBigInt(tx.GetGasPrice()), + Gas: tx.GetGas(), + To: stringToAddress(tx.GetTo()), + Value: stringToBigInt(tx.GetValue()), + Data: tx.GetData(), + AccessList: tx.GetAccessList(), + V: v, + R: r, + S: s, + } +} + +// GetRawSignatureValues returns the V, R, S signature values of the transaction. +// The return values should not be modified by the caller. +func (tx *AccessListTx) GetRawSignatureValues() (v, r, s *big.Int) { + return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) +} diff --git a/api/eth/evm/v1/dynamic_fee_tx.go b/api/eth/evm/v1/dynamic_fee_tx.go new file mode 100644 index 0000000000..c38b1820d1 --- /dev/null +++ b/api/eth/evm/v1/dynamic_fee_tx.go @@ -0,0 +1,64 @@ +package evmv1 + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + gethcore "github.com/ethereum/go-ethereum/core/types" + + ethutils "github.com/NibiruChain/nibiru/v2/utils" +) + +// GetChainID returns the chain id field from the DynamicFeeTx +func (tx *DynamicFeeTx) GetChainID() *big.Int { + return stringToBigInt(tx.GetChainId()) +} + +// AsEthereumData returns an DynamicFeeTx transaction tx from the proto-formatted +// TxData defined on the Cosmos EVM. +func (tx *DynamicFeeTx) AsEthereumData() gethcore.TxData { + v, r, s := tx.GetRawSignatureValues() + return &gethcore.DynamicFeeTx{ + ChainID: tx.GetChainID(), + Nonce: tx.GetNonce(), + GasTipCap: stringToBigInt(tx.GetGasTipCap()), + GasFeeCap: stringToBigInt(tx.GetGasFeeCap()), + Gas: tx.GetGas(), + To: stringToAddress(tx.GetTo()), + Value: stringToBigInt(tx.GetValue()), + Data: tx.GetData(), + AccessList: tx.GetAccessList(), + V: v, + R: r, + S: s, + } +} + +// GetAccessList returns the AccessList field. +func (tx *DynamicFeeTx) GetAccessList() gethcore.AccessList { + if tx.Accesses == nil { + return nil + } + var ethAccessList gethcore.AccessList + + for _, tuple := range tx.Accesses { + storageKeys := make([]common.Hash, len(tuple.StorageKeys)) + + for i := range tuple.StorageKeys { + storageKeys[i] = common.HexToHash(tuple.StorageKeys[i]) + } + + ethAccessList = append(ethAccessList, gethcore.AccessTuple{ + Address: common.HexToAddress(tuple.Address), + StorageKeys: storageKeys, + }) + } + + return ethAccessList +} + +// GetRawSignatureValues returns the V, R, S signature values of the transaction. +// The return values should not be modified by the caller. +func (tx *DynamicFeeTx) GetRawSignatureValues() (v, r, s *big.Int) { + return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) +} diff --git a/api/eth/evm/v1/legacy_tx.go b/api/eth/evm/v1/legacy_tx.go new file mode 100644 index 0000000000..765cd140a3 --- /dev/null +++ b/api/eth/evm/v1/legacy_tx.go @@ -0,0 +1,45 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package evmv1 + +import ( + "math/big" + + gethcore "github.com/ethereum/go-ethereum/core/types" + + ethutils "github.com/NibiruChain/nibiru/v2/utils" +) + +// GetChainID returns the chain id field from the derived signature values +func (tx *LegacyTx) GetChainID() *big.Int { + v, _, _ := tx.GetRawSignatureValues() + return ethutils.DeriveChainID(v) +} + +// AsEthereumData returns an LegacyTx transaction tx from the proto-formatted +// TxData defined on the Cosmos EVM. +func (tx *LegacyTx) AsEthereumData() gethcore.TxData { + v, r, s := tx.GetRawSignatureValues() + return &gethcore.LegacyTx{ + Nonce: tx.GetNonce(), + GasPrice: stringToBigInt(tx.GetGasPrice()), + Gas: tx.GetGas(), + To: stringToAddress(tx.GetTo()), + Value: stringToBigInt(tx.GetValue()), + Data: tx.GetData(), + V: v, + R: r, + S: s, + } +} + +// GetRawSignatureValues returns the V, R, S signature values of the transaction. +// The return values should not be modified by the caller. +func (tx *LegacyTx) GetRawSignatureValues() (v, r, s *big.Int) { + return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) +} + +// GetAccessList returns nil +func (tx *LegacyTx) GetAccessList() gethcore.AccessList { + return nil +} diff --git a/api/eth/evm/v1/msg.go b/api/eth/evm/v1/msg.go new file mode 100644 index 0000000000..4a231bb7de --- /dev/null +++ b/api/eth/evm/v1/msg.go @@ -0,0 +1,55 @@ +package evmv1 + +import ( + fmt "fmt" + + "github.com/ethereum/go-ethereum/common" + gethcore "github.com/ethereum/go-ethereum/core/types" + + protov2 "google.golang.org/protobuf/proto" +) + +// supportedTxs holds the Ethereum transaction types +// supported by Nibiru. +// Use a function to return a new pointer and avoid +// possible reuse or racing conditions when using the same pointer +var supportedTxs = map[string]func() TxDataV2{ + "/eth.evm.v1.DynamicFeeTx": func() TxDataV2 { return &DynamicFeeTx{} }, + "/eth.evm.v1.AccessListTx": func() TxDataV2 { return &AccessListTx{} }, + "/eth.evm.v1.LegacyTx": func() TxDataV2 { return &LegacyTx{} }, +} + +// getSender extracts the sender address from the signature values using the latest signer for the given chainID. +func getSender(txData TxDataV2) (common.Address, error) { + signer := gethcore.LatestSignerForChainID(txData.GetChainID()) + from, err := signer.Sender(gethcore.NewTx(txData.AsEthereumData())) + if err != nil { + return common.Address{}, err + } + return from, nil +} + +func EthereumTxGetSigners(msg protov2.Message) ([][]byte, error) { + msgEthereumTx, ok := msg.(*MsgEthereumTx) + if !ok { + return nil, fmt.Errorf("invalid type, expected MsgConvertERC20 and got %T", msg) + } + + txDataFn, found := supportedTxs[msgEthereumTx.Data.TypeUrl] + if !found { + return nil, fmt.Errorf("invalid TypeUrl %s", msgEthereumTx.Data.TypeUrl) + } + txData := txDataFn() + + // msgEthTx.Data is a message (DynamicFeeTx, LegacyTx or AccessListTx) + if err := msgEthereumTx.Data.UnmarshalTo(txData); err != nil { + return nil, err + } + + sender, err := getSender(txData) + if err != nil { + return nil, err + } + + return [][]byte{sender.Bytes()}, nil +} diff --git a/api/eth/evm/v1/tx_data.go b/api/eth/evm/v1/tx_data.go new file mode 100644 index 0000000000..c2b666be58 --- /dev/null +++ b/api/eth/evm/v1/tx_data.go @@ -0,0 +1,45 @@ +package evmv1 + +import ( + "math/big" + + sdkmath "cosmossdk.io/math" + "github.com/ethereum/go-ethereum/common" + gethcore "github.com/ethereum/go-ethereum/core/types" + "google.golang.org/protobuf/reflect/protoreflect" +) + +var ( + _ TxDataV2 = &LegacyTx{} + _ TxDataV2 = &AccessListTx{} + _ TxDataV2 = &DynamicFeeTx{} +) + +// TxDataV2 implements the Ethereum transaction tx structure. It is used +// solely to define the custom logic for getting signers on Ethereum transactions. +type TxDataV2 interface { + GetChainID() *big.Int + AsEthereumData() gethcore.TxData + + ProtoReflect() protoreflect.Message +} + +// helper function to parse string to bigInt +func stringToBigInt(str string) *big.Int { + if str == "" { + return nil + } + res, ok := sdkmath.NewIntFromString(str) + if !ok { + return nil + } + return res.BigInt() +} + +func stringToAddress(toStr string) *common.Address { + if toStr == "" { + return nil + } + addr := common.HexToAddress(toStr) + return &addr +} diff --git a/utils/eth.go b/utils/eth.go new file mode 100644 index 0000000000..68b98d1d91 --- /dev/null +++ b/utils/eth.go @@ -0,0 +1,46 @@ +package eth + +import "math/big" + +// DeriveChainID derives the chain id from the given v parameter. +// +// CONTRACT: v value is either: +// +// - {0,1} + CHAIN_ID * 2 + 35, if EIP155 is used +// - {0,1} + 27, otherwise +// +// Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md +func DeriveChainID(v *big.Int) *big.Int { + if v == nil || v.Sign() < 1 { + return nil + } + + if v.BitLen() <= 64 { + v := v.Uint64() + if v == 27 || v == 28 { + return new(big.Int) + } + + if v < 35 { + return nil + } + + // V MUST be of the form {0,1} + CHAIN_ID * 2 + 35 + return new(big.Int).SetUint64((v - 35) / 2) + } + v = new(big.Int).Sub(v, big.NewInt(35)) + return v.Div(v, big.NewInt(2)) +} + +func RawSignatureValues(vBz, rBz, sBz []byte) (v, r, s *big.Int) { + if len(vBz) > 0 { + v = new(big.Int).SetBytes(vBz) + } + if len(rBz) > 0 { + r = new(big.Int).SetBytes(rBz) + } + if len(sBz) > 0 { + s = new(big.Int).SetBytes(sBz) + } + return v, r, s +} diff --git a/x/evm/msg.go b/x/evm/msg.go index d6c55e8bf8..8190c8f4de 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -51,7 +51,7 @@ const ( var MsgEthereumTxCustomGetSigner = txsigning.CustomGetSigner{ MsgType: protov2.MessageName(&evmapi.MsgEthereumTx{}), - Fn: EthereumTxGetSigners, + Fn: evmapi.EthereumTxGetSigners, } // NewTx returns a reference to a new Ethereum transaction message. @@ -225,18 +225,6 @@ func (msg *MsgEthereumTx) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{signer} } -func EthereumTxGetSigners(msg protov2.Message) ([][]byte, error) { - msgEthereumTx, ok := msg.(*evmapi.MsgEthereumTx) - if !ok { - return nil, fmt.Errorf("invalid type, expected MsgConvertERC20 and got %T", msg) - } - - // The sender on the msg is a hex address - sender := common.HexToAddress(msgEthereumTx.From) - - return [][]byte{sender.Bytes()}, nil -} - // GetSignBytes returns the Amino bytes of an Ethereum transaction message used // for signing. // diff --git a/x/evm/tx_data.go b/x/evm/tx_data.go index 0f00f8e1fd..6eac86980d 100644 --- a/x/evm/tx_data.go +++ b/x/evm/tx_data.go @@ -129,49 +129,6 @@ func NewTxDataFromTx(tx *gethcore.Transaction) (TxData, error) { return txData, nil } -// DeriveChainID derives the chain id from the given v parameter. -// -// CONTRACT: v value is either: -// -// - {0,1} + CHAIN_ID * 2 + 35, if EIP155 is used -// - {0,1} + 27, otherwise -// -// Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md -func DeriveChainID(v *big.Int) *big.Int { - if v == nil || v.Sign() < 1 { - return nil - } - - if v.BitLen() <= 64 { - v := v.Uint64() - if v == 27 || v == 28 { - return new(big.Int) - } - - if v < 35 { - return nil - } - - // V MUST be of the form {0,1} + CHAIN_ID * 2 + 35 - return new(big.Int).SetUint64((v - 35) / 2) - } - v = new(big.Int).Sub(v, big.NewInt(35)) - return v.Div(v, big.NewInt(2)) -} - -func rawSignatureValues(vBz, rBz, sBz []byte) (v, r, s *big.Int) { - if len(vBz) > 0 { - v = new(big.Int).SetBytes(vBz) - } - if len(rBz) > 0 { - r = new(big.Int).SetBytes(rBz) - } - if len(sBz) > 0 { - s = new(big.Int).SetBytes(sBz) - } - return v, r, s -} - // Returns the fee in wei corresponding to the given gas price and gas amount. // Args: // - weiPerGas: Wei per unit gas (gas price). diff --git a/x/evm/tx_data_access_list.go b/x/evm/tx_data_access_list.go index 6798c7fa42..a73f35ba61 100644 --- a/x/evm/tx_data_access_list.go +++ b/x/evm/tx_data_access_list.go @@ -11,6 +11,7 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/NibiruChain/nibiru/v2/eth" + ethutils "github.com/NibiruChain/nibiru/v2/utils" ) // AccessList is an EIP-2930 access list that represents the slice of @@ -233,7 +234,7 @@ func (tx *AccessListTx) AsEthereumData() gethcore.TxData { // GetRawSignatureValues returns the V, R, S signature values of the transaction. // The return values should not be modified by the caller. func (tx *AccessListTx) GetRawSignatureValues() (v, r, s *big.Int) { - return rawSignatureValues(tx.V, tx.R, tx.S) + return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) } // SetSignatureValues sets the signature values to the transaction. diff --git a/x/evm/tx_data_dynamic_fee.go b/x/evm/tx_data_dynamic_fee.go index 9c3f24911f..33f327ff5f 100644 --- a/x/evm/tx_data_dynamic_fee.go +++ b/x/evm/tx_data_dynamic_fee.go @@ -12,6 +12,7 @@ import ( "github.com/NibiruChain/nibiru/v2/eth" "github.com/NibiruChain/nibiru/v2/x/common/nmath" + ethutils "github.com/NibiruChain/nibiru/v2/utils" ) // BigIntMax returns max(x,y). @@ -216,7 +217,7 @@ func (tx *DynamicFeeTx) AsEthereumData() gethcore.TxData { // GetRawSignatureValues returns the V, R, S signature values of the transaction. // The return values should not be modified by the caller. func (tx *DynamicFeeTx) GetRawSignatureValues() (v, r, s *big.Int) { - return rawSignatureValues(tx.V, tx.R, tx.S) + return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) } // SetSignatureValues sets the signature values to the transaction. diff --git a/x/evm/tx_data_legacy.go b/x/evm/tx_data_legacy.go index fadd11367a..39b7b2f24b 100644 --- a/x/evm/tx_data_legacy.go +++ b/x/evm/tx_data_legacy.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" + ethutils "github.com/NibiruChain/nibiru/v2/utils" "github.com/NibiruChain/nibiru/v2/eth" ) @@ -67,7 +68,7 @@ func (tx *LegacyTx) Copy() TxData { // GetChainID returns the chain id field from the derived signature values func (tx *LegacyTx) GetChainID() *big.Int { v, _, _ := tx.GetRawSignatureValues() - return DeriveChainID(v) + return ethutils.DeriveChainID(v) } // GetAccessList returns nil @@ -149,7 +150,7 @@ func (tx *LegacyTx) AsEthereumData() gethcore.TxData { // GetRawSignatureValues returns the V, R, S signature values of the transaction. // The return values should not be modified by the caller. func (tx *LegacyTx) GetRawSignatureValues() (v, r, s *big.Int) { - return rawSignatureValues(tx.V, tx.R, tx.S) + return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) } // SetSignatureValues sets the signature values to the transaction. diff --git a/x/evm/tx_data_test.go b/x/evm/tx_data_test.go index ec2d893e18..0148f5a2b6 100644 --- a/x/evm/tx_data_test.go +++ b/x/evm/tx_data_test.go @@ -6,6 +6,8 @@ import ( sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" + + ethutils "github.com/NibiruChain/nibiru/v2/utils" ) func TestTxData_chainID(t *testing.T) { @@ -83,7 +85,7 @@ func TestTxData_DeriveChainID(t *testing.T) { for _, tc := range testCases { v, _, _ := tc.data.GetRawSignatureValues() - chainID := DeriveChainID(v) + chainID := ethutils.DeriveChainID(v) require.Equal(t, tc.expChainID, chainID, tc.msg) } } From 26acbaa1b5ce176198d4b3678cbcbd561ea0af3f Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 9 Jun 2025 16:25:18 +0700 Subject: [PATCH 58/72] refactor(devgas): remove validate basic and use directly in msg server --- x/devgas/v1/client/cli/tx.go | 12 --- x/devgas/v1/keeper/msg_server.go | 6 ++ x/devgas/v1/types/msg.go | 60 ----------- x/devgas/v1/types/msg_test.go | 167 ------------------------------- 4 files changed, 6 insertions(+), 239 deletions(-) diff --git a/x/devgas/v1/client/cli/tx.go b/x/devgas/v1/client/cli/tx.go index f5fb650653..94bf166d69 100644 --- a/x/devgas/v1/client/cli/tx.go +++ b/x/devgas/v1/client/cli/tx.go @@ -57,10 +57,6 @@ func CmdRegisterFeeShare() *cobra.Command { WithdrawerAddress: withdrawer, } - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) }, } @@ -92,10 +88,6 @@ func CmdCancelFeeShare() *cobra.Command { DeployerAddress: deployer.String(), } - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) }, } @@ -133,10 +125,6 @@ func CmdUpdateFeeShare() *cobra.Command { WithdrawerAddress: withdrawer, } - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) }, } diff --git a/x/devgas/v1/keeper/msg_server.go b/x/devgas/v1/keeper/msg_server.go index 50cd7e9849..a78ce37842 100644 --- a/x/devgas/v1/keeper/msg_server.go +++ b/x/devgas/v1/keeper/msg_server.go @@ -297,6 +297,12 @@ func (k Keeper) CancelFeeShare( func (k Keeper) UpdateParams( goCtx context.Context, req *types.MsgUpdateParams, ) (resp *types.MsgUpdateParamsResponse, err error) { + if _, err := sdk.AccAddressFromBech32(req.Authority); err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf( + "invalid WithdrawerAddress %s", req.Authority, + ) + } + if k.authority != req.Authority { return nil, govtypes.ErrInvalidSigner.Wrapf("invalid authority; expected %s, got %s", k.authority, req.Authority) } diff --git a/x/devgas/v1/types/msg.go b/x/devgas/v1/types/msg.go index a40d49cb94..b816f10929 100644 --- a/x/devgas/v1/types/msg.go +++ b/x/devgas/v1/types/msg.go @@ -1,8 +1,6 @@ package types import ( - sdkioerrors "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -42,25 +40,6 @@ func (msg MsgRegisterFeeShare) Route() string { return RouterKey } // Type returns the action func (msg MsgRegisterFeeShare) Type() string { return TypeMsgRegisterFeeShare } -// ValidateBasic runs stateless checks on the message -func (msg MsgRegisterFeeShare) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.DeployerAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid deployer address %s", msg.DeployerAddress) - } - - if _, err := sdk.AccAddressFromBech32(msg.ContractAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid contract address %s", msg.ContractAddress) - } - - if msg.WithdrawerAddress != "" { - if _, err := sdk.AccAddressFromBech32(msg.WithdrawerAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid withdraw address %s", msg.WithdrawerAddress) - } - } - - return nil -} - // GetSigners defines whose signature is required func (msg MsgRegisterFeeShare) GetSigners() []sdk.AccAddress { from, _ := sdk.AccAddressFromBech32(msg.DeployerAddress) @@ -84,19 +63,6 @@ func (msg MsgCancelFeeShare) Route() string { return RouterKey } // Type returns the message type for a MsgCancelFeeShare. func (msg MsgCancelFeeShare) Type() string { return TypeMsgCancelFeeShare } -// ValidateBasic runs stateless checks on the message -func (msg MsgCancelFeeShare) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.DeployerAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid deployer address %s", msg.DeployerAddress) - } - - if _, err := sdk.AccAddressFromBech32(msg.ContractAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid deployer address %s", msg.DeployerAddress) - } - - return nil -} - // GetSigners defines whose signature is required func (msg MsgCancelFeeShare) GetSigners() []sdk.AccAddress { funder, _ := sdk.AccAddressFromBech32(msg.DeployerAddress) @@ -122,23 +88,6 @@ func (msg MsgUpdateFeeShare) Route() string { return RouterKey } // Type returns the action func (msg MsgUpdateFeeShare) Type() string { return TypeMsgUpdateFeeShare } -// ValidateBasic runs stateless checks on the message -func (msg MsgUpdateFeeShare) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.DeployerAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid deployer address %s", msg.DeployerAddress) - } - - if _, err := sdk.AccAddressFromBech32(msg.ContractAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid contract address %s", msg.ContractAddress) - } - - if _, err := sdk.AccAddressFromBech32(msg.WithdrawerAddress); err != nil { - return sdkioerrors.Wrapf(err, "invalid withdraw address %s", msg.WithdrawerAddress) - } - - return nil -} - // GetSigners defines whose signature is required func (msg MsgUpdateFeeShare) GetSigners() []sdk.AccAddress { from, _ := sdk.AccAddressFromBech32(msg.DeployerAddress) @@ -152,12 +101,3 @@ func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) return []sdk.AccAddress{addr} } - -// ValidateBasic does a sanity check on the provided data. -func (m *MsgUpdateParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkioerrors.Wrap(err, "invalid authority address") - } - - return m.Params.Validate() -} diff --git a/x/devgas/v1/types/msg_test.go b/x/devgas/v1/types/msg_test.go index b13bb83a8a..cebd556c6b 100644 --- a/x/devgas/v1/types/msg_test.go +++ b/x/devgas/v1/types/msg_test.go @@ -40,75 +40,6 @@ func (suite *MsgsTestSuite) TestMsgRegisterFeeShareGetters() { suite.Require().NotNil(msg.GetSigners()) } -func (suite *MsgsTestSuite) TestMsgRegisterFeeShareNew() { - testCases := []struct { - msg string - contract string - deployer string - withdraw string - expectPass bool - }{ - { - "pass", - suite.contract.String(), - suite.deployerStr, - suite.withdrawerStr, - true, - }, - { - "pass - empty withdrawer address", - suite.contract.String(), - suite.deployerStr, - "", - true, - }, - { - "pass - same withdrawer and deployer address", - suite.contract.String(), - suite.deployerStr, - suite.deployerStr, - true, - }, - { - "invalid contract address", - "", - suite.deployerStr, - suite.withdrawerStr, - false, - }, - { - "invalid deployer address", - suite.contract.String(), - "", - suite.withdrawerStr, - false, - }, - { - "invalid withdraw address", - suite.contract.String(), - suite.deployerStr, - "withdraw", - false, - }, - } - - for i, tc := range testCases { - tx := MsgRegisterFeeShare{ - ContractAddress: tc.contract, - DeployerAddress: tc.deployer, - WithdrawerAddress: tc.withdraw, - } - err := tx.ValidateBasic() - - if tc.expectPass { - suite.Require().NoError(err, "valid test %d failed: %s", i, tc.msg) - } else { - suite.Require().Error(err, "invalid test %d passed: %s", i, tc.msg) - suite.Require().Contains(err.Error(), tc.msg) - } - } -} - func (suite *MsgsTestSuite) TestMsgCancelFeeShareGetters() { msg := NewMsgCancelFeeShare( suite.contract, @@ -119,49 +50,6 @@ func (suite *MsgsTestSuite) TestMsgCancelFeeShareGetters() { suite.Require().NotNil(msg.GetSigners()) } -func (suite *MsgsTestSuite) TestMsgCancelFeeShareNew() { - testCases := []struct { - errMsg string - contract string - deployer string - expectPass bool - }{ - { - errMsg: "msg cancel contract fee - pass", - contract: suite.contract.String(), - deployer: suite.deployerStr, - expectPass: true, - }, - { - errMsg: "decoding bech32 failed", - contract: "contract", - deployer: suite.deployerStr, - expectPass: false, - }, - { - errMsg: "decoding bech32 failed", - contract: suite.contract.String(), - deployer: "deployer", - expectPass: false, - }, - } - - for i, tc := range testCases { - tx := MsgCancelFeeShare{ - ContractAddress: tc.contract, - DeployerAddress: tc.deployer, - } - err := tx.ValidateBasic() - - if tc.expectPass { - suite.Require().NoError(err, "valid test %d failed: %s, %v", i, tc.errMsg) - } else { - suite.Require().Error(err, "invalid test %d passed: %s, %v", i, tc.errMsg) - suite.Require().Contains(err.Error(), tc.errMsg) - } - } -} - func (suite *MsgsTestSuite) TestMsgUpdateFeeShareGetters() { msg := NewMsgUpdateFeeShare( suite.contract, @@ -173,61 +61,6 @@ func (suite *MsgsTestSuite) TestMsgUpdateFeeShareGetters() { suite.Require().NotNil(msg.GetSigners()) } -func (suite *MsgsTestSuite) TestMsgUpdateFeeShareNew() { - testCases := []struct { - msg string - contract string - deployer string - withdraw string - expectPass bool - }{ - { - "msg update fee - pass", - suite.contract.String(), - suite.deployerStr, - suite.withdrawerStr, - true, - }, - { - "invalid contract address", - "", - suite.deployerStr, - suite.withdrawerStr, - false, - }, - { - "invalid withdraw address", - suite.contract.String(), - suite.deployerStr, - "withdraw", - false, - }, - { - "change fee withdrawer to deployer - pass", - suite.contract.String(), - suite.deployerStr, - suite.deployerStr, - true, - }, - } - - for i, tc := range testCases { - tx := MsgUpdateFeeShare{ - ContractAddress: tc.contract, - DeployerAddress: tc.deployer, - WithdrawerAddress: tc.withdraw, - } - err := tx.ValidateBasic() - - if tc.expectPass { - suite.Require().NoError(err, "valid test %d failed: %s, %v", i, tc.msg) - } else { - suite.Require().Error(err, "invalid test %d passed: %s, %v", i, tc.msg) - suite.Require().Contains(err.Error(), tc.msg) - } - } -} - func (s *MsgsTestSuite) TestQuery_ValidateBasic() { validAddr := s.contract.String() invalidAddr := "invalid-addr" From 39524af52ffabbc78dd3605497d0d4d19d6ec6cc Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 9 Jun 2025 20:42:45 +0700 Subject: [PATCH 59/72] refactor(evm): use ValidateBasic directly in msg server --- x/evm/keeper/msg_server.go | 12 ++++++++++++ x/evm/keeper/msg_update_params.go | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index e1b1e3f4b5..dbde7945a1 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -22,6 +22,7 @@ import ( "github.com/holiman/uint256" "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/NibiruChain/nibiru/v2/x/evm/statedb" @@ -472,6 +473,9 @@ func (k *Keeper) CreateFunToken( goCtx context.Context, msg *evm.MsgCreateFunToken, ) (resp *evm.MsgCreateFunTokenResponse, err error) { var funtoken *evm.FunToken + if msg == nil { + return nil, common.ErrNilGrpcMsg + } err = msg.ValidateBasic() if err != nil { return nil, err @@ -536,6 +540,14 @@ func (k Keeper) FeeForCreateFunToken(ctx sdk.Context) sdk.Coins { func (k *Keeper) ConvertCoinToEvm( goCtx context.Context, msg *evm.MsgConvertCoinToEvm, ) (resp *evm.MsgConvertCoinToEvmResponse, err error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := msg.ValidateBasic(); err != nil { + return nil, sdkioerrors.Wrap(err, "ConvertCoinToEvm validate basic failed") + } + ctx := sdk.UnwrapSDKContext(goCtx) sender := sdk.MustAccAddressFromBech32(msg.Sender) diff --git a/x/evm/keeper/msg_update_params.go b/x/evm/keeper/msg_update_params.go index f021d5de55..1729a209ae 100644 --- a/x/evm/keeper/msg_update_params.go +++ b/x/evm/keeper/msg_update_params.go @@ -8,12 +8,20 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/NibiruChain/nibiru/v2/x/common" "github.com/NibiruChain/nibiru/v2/x/evm" ) func (k *Keeper) UpdateParams( goCtx context.Context, req *evm.MsgUpdateParams, ) (resp *evm.MsgUpdateParamsResponse, err error) { + if req == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := req.ValidateBasic(); err != nil { + return nil, sdkioerrors.Wrap(err, "UpdateParams validate basic failed") + } if k.authority.String() != req.Authority { return nil, sdkioerrors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority, expected %s, got %s", k.authority.String(), req.Authority) } From e4f70710e5fd95788865543e24cada54755a3190 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 9 Jun 2025 20:43:05 +0700 Subject: [PATCH 60/72] refactor(inflation): use ValidateBasic directly in msg server --- x/inflation/client/cli/tx.go | 8 -------- x/inflation/keeper/msg_server.go | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/x/inflation/client/cli/tx.go b/x/inflation/client/cli/tx.go index 7345696883..c94c1720db 100644 --- a/x/inflation/client/cli/tx.go +++ b/x/inflation/client/cli/tx.go @@ -53,10 +53,6 @@ $ nibid tx inflation toggle-inflation true Enable: args[0] == "true", } - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -148,10 +144,6 @@ $ nibid tx oracle edit-params --staking-proportion 0.6 --community-pool-proporti msg.MaxPeriod = &maxPeriodInt } - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/inflation/keeper/msg_server.go b/x/inflation/keeper/msg_server.go index 6eae08b9f8..457af18b15 100644 --- a/x/inflation/keeper/msg_server.go +++ b/x/inflation/keeper/msg_server.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/NibiruChain/nibiru/v2/x/common" "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) @@ -23,6 +24,13 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { func (ms msgServer) EditInflationParams( goCtx context.Context, msg *types.MsgEditInflationParams, ) (resp *types.MsgEditInflationParamsResponse, err error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) // Stateless field validation was already performed in msg.ValidateBasic() // before the current scope is reached. @@ -38,6 +46,13 @@ func (ms msgServer) EditInflationParams( func (ms msgServer) ToggleInflation( goCtx context.Context, msg *types.MsgToggleInflation, ) (resp *types.MsgToggleInflationResponse, err error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) // Stateless field validation was already performed in msg.ValidateBasic() // before the current scope is reached. From 4bf5ff4641d81666d257d33d8298987fa54c3bcf Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 9 Jun 2025 20:43:20 +0700 Subject: [PATCH 61/72] refactor(oracle): use ValidateBasic directly in msg server --- x/oracle/cli/tx.go | 13 ------------- x/oracle/keeper/msg_server.go | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/x/oracle/cli/tx.go b/x/oracle/cli/tx.go index 76344c2b0b..37331ddd82 100644 --- a/x/oracle/cli/tx.go +++ b/x/oracle/cli/tx.go @@ -72,9 +72,6 @@ where "nibi1..." is the address you want to delegate your voting rights to. } msg := types.NewMsgDelegateFeedConsent(validator, feeder) - if err = msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -136,9 +133,6 @@ $ nibid tx oracle aggregate-prevote 1234 1234 (40000.0,BTC:USD)|(1.243,NIBI:USD) hash := types.GetAggregateVoteHash(salt, exchangeRatesStr, validator) msg := types.NewMsgAggregateExchangeRatePrevote(hash, feeder, validator) - if err = msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -196,9 +190,6 @@ $ nibid tx oracle aggregate-vote 1234 (40000.0,BTC:USD)|(1.243,NIBI:USD) nibival } msg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRatesStr, feeder, validator) - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -325,10 +316,6 @@ $ nibid tx oracle edit-params --vote-period 10 --vote-threshold 0.5 --reward-ban msg.Params.Whitelist = realWhitelist } - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index e6f1766741..2679a25405 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -9,6 +9,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/NibiruChain/nibiru/v2/x/common" "github.com/NibiruChain/nibiru/v2/x/oracle/types" sudokeeper "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" @@ -29,6 +30,14 @@ func (ms msgServer) AggregateExchangeRatePrevote( goCtx context.Context, msg *types.MsgAggregateExchangeRatePrevote, ) (*types.MsgAggregateExchangeRatePrevoteResponse, error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) valAddr, err := sdk.ValAddressFromBech32(msg.Validator) @@ -63,6 +72,14 @@ func (ms msgServer) AggregateExchangeRatePrevote( func (ms msgServer) AggregateExchangeRateVote( goCtx context.Context, msg *types.MsgAggregateExchangeRateVote, ) (msgResp *types.MsgAggregateExchangeRateVoteResponse, err error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) valAddr, err := sdk.ValAddressFromBech32(msg.Validator) @@ -142,6 +159,14 @@ func (ms msgServer) AggregateExchangeRateVote( func (ms msgServer) DelegateFeedConsent( goCtx context.Context, msg *types.MsgDelegateFeedConsent, ) (*types.MsgDelegateFeedConsentResponse, error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) operatorAddr, err := sdk.ValAddressFromBech32(msg.Operator) @@ -177,6 +202,14 @@ func (ms msgServer) DelegateFeedConsent( // EditOracleParams: gRPC tx msg for editing the oracle module params. // [SUDO] Only callable by sudoers. func (ms msgServer) EditOracleParams(goCtx context.Context, msg *types.MsgEditOracleParams) (*types.MsgEditOracleParamsResponse, error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) sender, err := sdk.AccAddressFromBech32(msg.Sender) From a424610a0469c6bdf305efb710ef61e1f4cd86f8 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 9 Jun 2025 20:43:37 +0700 Subject: [PATCH 62/72] refactor(sudo): use ValidateBasic directly in msg server --- x/sudo/cli/cli.go | 8 -------- x/sudo/keeper/msg_server.go | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/x/sudo/cli/cli.go b/x/sudo/cli/cli.go index a60fdac243..f8361f6880 100644 --- a/x/sudo/cli/cli.go +++ b/x/sudo/cli/cli.go @@ -100,10 +100,6 @@ func CmdEditSudoers() *cobra.Command { from := clientCtx.GetFromAddress() msg.Sender = from.String() - if err = msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -146,10 +142,6 @@ func CmdChangeRoot() *cobra.Command { msg.Sender = from.String() msg.NewRoot = root - if err = msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/sudo/keeper/msg_server.go b/x/sudo/keeper/msg_server.go index e44067bfde..270be09028 100644 --- a/x/sudo/keeper/msg_server.go +++ b/x/sudo/keeper/msg_server.go @@ -9,6 +9,7 @@ import ( "github.com/NibiruChain/collections" + "github.com/NibiruChain/nibiru/v2/x/common" "github.com/NibiruChain/nibiru/v2/x/common/set" sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) @@ -28,6 +29,14 @@ var _ sudotypes.MsgServer = MsgServer{} func (m MsgServer) EditSudoers( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (*sudotypes.MsgEditSudoersResponse, error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + switch msg.RootAction() { case sudotypes.AddContracts: return m.keeper.AddContracts(goCtx, msg) @@ -39,6 +48,14 @@ func (m MsgServer) EditSudoers( } func (m MsgServer) ChangeRoot(ctx context.Context, msg *sudotypes.MsgChangeRoot) (*sudotypes.MsgChangeRootResponse, error) { + if msg == nil { + return nil, common.ErrNilGrpcMsg + } + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + sdkContext := sdk.UnwrapSDKContext(ctx) pbSudoers, err := m.keeper.Sudoers.Get(sdkContext) From acd2d926442836ebab226b6702796f6af922e66b Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 9 Jun 2025 20:43:59 +0700 Subject: [PATCH 63/72] refactor(tokenfactory): use ValidateBasic directly in msg server --- x/tokenfactory/cli/tx.go | 4 ---- x/tokenfactory/keeper/msg_server.go | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/x/tokenfactory/cli/tx.go b/x/tokenfactory/cli/tx.go index 21d1291099..5eccf9ce2f 100644 --- a/x/tokenfactory/cli/tx.go +++ b/x/tokenfactory/cli/tx.go @@ -239,10 +239,6 @@ $ nibid tx tokenfactory burn-native 100unibi Coin: burnCoin, } - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index c1adaaccf9..577c64e5a2 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -278,6 +278,13 @@ func (k Keeper) SetDenomMetadata( func (k Keeper) BurnNative( goCtx context.Context, msg *types.MsgBurnNative, ) (resp *types.MsgBurnNativeResponse, err error) { + if msg == nil { + return resp, errNilMsg + } + if err := msg.ValidateBasic(); err != nil { + return resp, err + } + ctx := sdk.UnwrapSDKContext(goCtx) sender, err := sdk.AccAddressFromBech32(msg.Sender) From 8d158e064973de0e77d9ea5aeffa292c0aa17caa Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 10 Jun 2025 16:32:52 +0700 Subject: [PATCH 64/72] chore: remove unused cli test --- x/devgas/v1/client/cli/cli_test.go | 228 ----------------------------- 1 file changed, 228 deletions(-) delete mode 100644 x/devgas/v1/client/cli/cli_test.go diff --git a/x/devgas/v1/client/cli/cli_test.go b/x/devgas/v1/client/cli/cli_test.go deleted file mode 100644 index 7aa23422f6..0000000000 --- a/x/devgas/v1/client/cli/cli_test.go +++ /dev/null @@ -1,228 +0,0 @@ -package cli_test - -import ( - "bytes" - "context" - "fmt" - "io" - "testing" - - abci "github.com/cometbft/cometbft/abci/types" - sdktestutil "github.com/cosmos/cosmos-sdk/testutil" - "github.com/stretchr/testify/suite" - - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" - sdkclient "github.com/cosmos/cosmos-sdk/client" - sdktestutilcli "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" - - "github.com/cosmos/cosmos-sdk/crypto/keyring" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - - "github.com/NibiruChain/nibiru/v2/x/common/testutil" - devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1" - "github.com/NibiruChain/nibiru/v2/x/devgas/v1/client/cli" -) - -// CLITestSuite: Tests all tx commands for the module. -type CLITestSuite struct { - suite.Suite - - keyring keyring.Keyring - encCfg testutilmod.TestEncodingConfig - baseCtx sdkclient.Context - clientCtx sdkclient.Context - - testAcc sdktestutil.TestAccount -} - -func TestCLITestSuite(t *testing.T) { - suite.Run(t, new(CLITestSuite)) -} - -// Runs once before the entire test suite. -func (s *CLITestSuite) SetupSuite() { - s.encCfg = testutilmod.MakeTestEncodingConfig(devgas.AppModuleBasic{}) - s.keyring = keyring.NewInMemory(s.encCfg.Codec) - s.baseCtx = sdkclient.Context{}. - WithKeyring(s.keyring). - WithTxConfig(s.encCfg.TxConfig). - WithCodec(s.encCfg.Codec). - WithClient(sdktestutilcli.MockCometRPC{Client: rpcclientmock.Client{}}). - WithAccountRetriever(sdkclient.MockAccountRetriever{}). - WithOutput(io.Discard). - WithChainID("test-chain") - - var outBuf bytes.Buffer - ctxGen := func() sdkclient.Context { - bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) - c := sdktestutilcli.NewMockCometRPC(abci.ResponseQuery{ - Value: bz, - }) - return s.baseCtx.WithClient(c) - } - s.clientCtx = ctxGen().WithOutput(&outBuf) - - testAccs := sdktestutil.CreateKeyringAccounts(s.T(), s.keyring, 1) - s.testAcc = testAccs[0] -} - -// Flags for broadcasting transactions -func commonTxArgs() []string { - return []string{ - "--yes=true", // skip confirmation - "--broadcast-mode=sync", - "--fees=1unibi", - "--chain-id=test-chain", - } -} - -type TestCase struct { - name string - args []string - extraArgs []string - wantErr string -} - -func (tc TestCase) NewCtx(s *CLITestSuite) sdkclient.Context { - return s.baseCtx -} - -func (tc TestCase) Run(s *CLITestSuite) { - s.Run(tc.name, func() { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - cmd := cli.NewTxCmd() - cmd.SetContext(ctx) - args := append(tc.args, commonTxArgs()...) - cmd.SetArgs(append(args, tc.extraArgs...)) - - s.Require().NoError(sdkclient.SetCmdClientContextHandler(tc.NewCtx(s), cmd)) - - err := cmd.Execute() - if tc.wantErr != "" { - s.Require().Error(err) - s.ErrorContains(err, tc.wantErr) - return - } - s.Require().NoError(err) - }) -} - -func (s *CLITestSuite) TestCmdRegisterFeeShare() { - _, addrs := testutil.PrivKeyAddressPairs(3) - - testCases := []TestCase{ - { - name: "happy path: devgas register", - args: []string{"register", addrs[0].String(), addrs[1].String()}, - extraArgs: []string{fmt.Sprintf("--from=%s", s.testAcc.Address)}, - wantErr: "", - }, - { - name: "sad: fee payer", - args: []string{"register", addrs[0].String(), addrs[1].String()}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - fmt.Sprintf("--fee-payer=%s", "invalid-fee-payer"), - }, - wantErr: "decoding bech32 failed", - }, - { - name: "sad: contract addr", - args: []string{"register", "sadcontract", addrs[1].String()}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - }, - wantErr: "invalid contract address", - }, - { - name: "sad: withdraw addr", - args: []string{"register", addrs[0].String(), "sadwithdraw"}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - }, - wantErr: "invalid withdraw address", - }, - } - - for _, tc := range testCases { - tc.Run(s) - } -} - -func (s *CLITestSuite) TestCmdCancelFeeShare() { - _, addrs := testutil.PrivKeyAddressPairs(1) - testCases := []TestCase{ - { - name: "happy path: devgas cancel", - args: []string{"cancel", addrs[0].String()}, - extraArgs: []string{fmt.Sprintf("--from=%s", s.testAcc.Address)}, - wantErr: "", - }, - { - name: "sad: fee payer", - args: []string{"cancel", addrs[0].String()}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - fmt.Sprintf("--fee-payer=%s", "invalid-fee-payer"), - }, - wantErr: "decoding bech32 failed", - }, - { - name: "sad: contract addr", - args: []string{"cancel", "sadcontract"}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - }, - wantErr: "invalid deployer address", - }, - } - - for _, tc := range testCases { - tc.Run(s) - } -} - -func (s *CLITestSuite) TestCmdUpdateFeeShare() { - _, addrs := testutil.PrivKeyAddressPairs(3) - - testCases := []TestCase{ - { - name: "happy path: devgas update", - args: []string{"update", addrs[0].String(), addrs[1].String()}, - extraArgs: []string{fmt.Sprintf("--from=%s", s.testAcc.Address)}, - wantErr: "", - }, - { - name: "sad: fee payer", - args: []string{"update", addrs[0].String(), addrs[1].String()}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - fmt.Sprintf("--fee-payer=%s", "invalid-fee-payer"), - }, - wantErr: "decoding bech32 failed", - }, - { - name: "sad: contract addr", - args: []string{"update", "sadcontract", addrs[1].String()}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - }, - wantErr: "invalid contract", - }, - { - name: "sad: new withdraw addr", - args: []string{"update", addrs[0].String(), "saddeployer"}, - extraArgs: []string{ - fmt.Sprintf("--from=%s", s.testAcc.Address), - }, - wantErr: "invalid withdraw address", - }, - } - - for _, tc := range testCases { - tc.Run(s) - } -} From 911d3cd087b6de5a606b7b2cf5537939f4b6a421 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 10 Jun 2025 17:06:33 +0700 Subject: [PATCH 65/72] chore: lint --- app/simapp/state_test.go | 3 +-- x/evm/tx_data_dynamic_fee.go | 2 +- x/evm/tx_data_legacy.go | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/simapp/state_test.go b/app/simapp/state_test.go index 6191641df0..efdc3a1ee7 100644 --- a/app/simapp/state_test.go +++ b/app/simapp/state_test.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/sims" - "cosmossdk.io/math" sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" @@ -153,7 +152,7 @@ func AppStateRandomizedFn( // number of bonded accounts var ( numInitiallyBonded int64 - initialStake math.Int + initialStake sdkmath.Int ) appParams.GetOrGenerate( sims.StakePerAccount, &initialStake, r, diff --git a/x/evm/tx_data_dynamic_fee.go b/x/evm/tx_data_dynamic_fee.go index 33f327ff5f..d4cbdbae5b 100644 --- a/x/evm/tx_data_dynamic_fee.go +++ b/x/evm/tx_data_dynamic_fee.go @@ -11,8 +11,8 @@ import ( sdkmath "cosmossdk.io/math" "github.com/NibiruChain/nibiru/v2/eth" - "github.com/NibiruChain/nibiru/v2/x/common/nmath" ethutils "github.com/NibiruChain/nibiru/v2/utils" + "github.com/NibiruChain/nibiru/v2/x/common/nmath" ) // BigIntMax returns max(x,y). diff --git a/x/evm/tx_data_legacy.go b/x/evm/tx_data_legacy.go index 39b7b2f24b..53150542ed 100644 --- a/x/evm/tx_data_legacy.go +++ b/x/evm/tx_data_legacy.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - ethutils "github.com/NibiruChain/nibiru/v2/utils" "github.com/NibiruChain/nibiru/v2/eth" + ethutils "github.com/NibiruChain/nibiru/v2/utils" ) func NewLegacyTx(tx *gethcore.Transaction) (*LegacyTx, error) { From feb8e02c311c2c92bd7aaf71e0f34bbc52f1520c Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 16 Jun 2025 12:32:39 +0700 Subject: [PATCH 66/72] free up space --- .github/workflows/integration-tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e7af89fff8..19c9fa3e5b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -67,6 +67,12 @@ jobs: path: ${{ steps.go-cache-paths.outputs.go-mod-cache }} key: go-mod-cache-${{ hashFiles('**/go.sum') }} + - name: Free up space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + docker system prune -af + - name: "Run all integration tests." if: steps.check_nibiru_go.outputs.nibiru-go == 'true' run: make test-coverage-integration From 3b07a5b452e91b66041e7f182bf5a3d6c3811dac Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 17 Jun 2025 15:09:49 +0700 Subject: [PATCH 67/72] use cache in golangci-lint workflow --- .github/workflows/golangci-lint.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 8443d98a6b..a4393d075f 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -77,15 +77,11 @@ jobs: # working-directory: somedir # Optional: golangci-lint command line arguments. - args: --fix=false + args: --fix=false --timeout=10m # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true - # Optional: if set to true then the all caching functionality will be complete disabled, - # takes precedence over all other caching options. - skip-cache: true - # Optional: if set to true then the action don't cache or restore ~/go/pkg. # skip-pkg-cache: true From 567cf3143196b107f91f146e069a085e5890c958 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 17 Jun 2025 15:20:13 +0700 Subject: [PATCH 68/72] add skip-cache --- .github/workflows/golangci-lint.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index a4393d075f..49667037ac 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -82,6 +82,10 @@ jobs: # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true + # Optional: if set to true then the all caching functionality will be complete disabled, + # takes precedence over all other caching options. + skip-cache: true + # Optional: if set to true then the action don't cache or restore ~/go/pkg. # skip-pkg-cache: true From 72245404f6a74d45c400ec7e75776eb56ca8a353 Mon Sep 17 00:00:00 2001 From: Unique Divine Date: Tue, 16 Sep 2025 10:43:40 -0500 Subject: [PATCH 69/72] build: whitespace deployment --- app/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 7103d16369..da747c16af 100644 --- a/app/app.go +++ b/app/app.go @@ -113,7 +113,7 @@ const ( ) var ( - // DefaultNodeHome default home directories for the application daemon + // DefaultNodeHome: home directories for the application daemon DefaultNodeHome string // ModuleBasics defines the module BasicManager is in charge of setting up basic, From 0126ab25b20fa2380117d8c17cde7a82d276e37f Mon Sep 17 00:00:00 2001 From: expertdicer Date: Mon, 22 Sep 2025 14:24:26 +0700 Subject: [PATCH 70/72] add signer for MsgConvertEvmToCoin and make proto-gen --- api/eth/evm/v1/tx.pulsar.go | 99 +++++++++++++-------- eth/account.pb.go | 7 +- proto/eth/evm/v1/tx.proto | 1 + x/evm/tx.pb.go | 169 +++++++++++++++++++----------------- 4 files changed, 152 insertions(+), 124 deletions(-) diff --git a/api/eth/evm/v1/tx.pulsar.go b/api/eth/evm/v1/tx.pulsar.go index 1d267789d4..34ce199741 100644 --- a/api/eth/evm/v1/tx.pulsar.go +++ b/api/eth/evm/v1/tx.pulsar.go @@ -9547,8 +9547,6 @@ type MsgConvertEvmToCoin struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Sender: "nibi"-prefixed Bech32 address for the signer of the transaction. - // This is also the address whose ERC20 balance will be deducted. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // Hexadecimal address of the ERC20 token to be converted and sent Erc20Addr string `protobuf:"bytes,2,opt,name=erc20_addr,json=erc20Addr,proto3" json:"erc20_addr,omitempty"` @@ -9765,7 +9763,7 @@ var file_eth_evm_v1_tx_proto_rawDesc = []byte{ 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x55, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x72, 0x63, 0x32, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, @@ -9776,7 +9774,10 @@ var file_eth_evm_v1_tx_proto_rawDesc = []byte{ 0x6e, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x6e, 0x6b, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x7a, + 0x65, 0x72, 0x6f, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5a, 0x65, 0x72, 0x6f, 0x44, 0x65, 0x63, + 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x62, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6d, 0x61, 0x70, 0x70, @@ -9799,41 +9800,63 @@ var file_eth_evm_v1_tx_proto_rawDesc = []byte{ 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x52, 0x08, 0x62, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x69, 0x6e, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, - 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x84, 0x03, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6e, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x54, 0x78, 0x12, 0x19, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x1a, 0x21, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, - 0x75, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x5f, 0x74, 0x78, 0x12, 0x50, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, + 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe1, 0x01, 0x0a, + 0x13, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x45, 0x76, 0x6d, 0x54, 0x6f, + 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0a, + 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x6e, 0x69, 0x62, 0x69, 0x72, 0x75, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x74, 0x68, 0x2e, 0x45, + 0x49, 0x50, 0x35, 0x35, 0x41, 0x64, 0x64, 0x72, 0x52, 0x09, 0x65, 0x72, 0x63, 0x32, 0x30, 0x41, + 0x64, 0x64, 0x72, 0x12, 0x35, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, + 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x41, + 0x64, 0x64, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x45, 0x76, + 0x6d, 0x54, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xe2, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6e, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x54, 0x78, 0x12, 0x19, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, + 0x1a, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x6e, 0x69, + 0x62, 0x69, 0x72, 0x75, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x74, 0x78, 0x12, 0x50, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x1a, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, - 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, - 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x75, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, - 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x45, - 0x76, 0x6d, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, - 0x45, 0x76, 0x6d, 0x1a, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x54, - 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, - 0xb0, 0x2a, 0x01, 0x42, 0x86, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x65, - 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x45, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x74, 0x68, - 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x74, 0x68, 0x5c, 0x45, 0x76, - 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x74, 0x68, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, - 0x45, 0x74, 0x68, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x25, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x46, 0x75, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, 0x6e, + 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x69, + 0x6e, 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x1a, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x43, 0x6f, + 0x69, 0x6e, 0x54, 0x6f, 0x45, 0x76, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5c, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x45, 0x76, 0x6d, 0x54, 0x6f, 0x43, + 0x6f, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x45, 0x76, 0x6d, 0x54, 0x6f, + 0x43, 0x6f, 0x69, 0x6e, 0x1a, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x45, 0x76, 0x6d, 0x54, + 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x86, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x21, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, + 0x65, 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x45, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x74, + 0x68, 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x74, 0x68, 0x5c, 0x45, + 0x76, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x74, 0x68, 0x5c, 0x45, 0x76, 0x6d, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0c, 0x45, 0x74, 0x68, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/eth/account.pb.go b/eth/account.pb.go index 49962ed5bd..b081e47d52 100644 --- a/eth/account.pb.go +++ b/eth/account.pb.go @@ -5,14 +5,13 @@ package eth import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/eth/evm/v1/tx.proto b/proto/eth/evm/v1/tx.proto index 67e677e92e..fd55d0fb64 100644 --- a/proto/eth/evm/v1/tx.proto +++ b/proto/eth/evm/v1/tx.proto @@ -304,6 +304,7 @@ message MsgConvertCoinToEvmResponse {} message MsgConvertEvmToCoin { // Sender: "nibi"-prefixed Bech32 address for the signer of the transaction. // This is also the address whose ERC20 balance will be deducted. + option (cosmos.msg.v1.signer) = "sender"; string sender = 1; // Hexadecimal address of the ERC20 token to be converted and sent diff --git a/x/evm/tx.pb.go b/x/evm/tx.pb.go index 32944e2bd8..a71e30811f 100644 --- a/x/evm/tx.pb.go +++ b/x/evm/tx.pb.go @@ -687,8 +687,6 @@ var xxx_messageInfo_MsgConvertCoinToEvmResponse proto.InternalMessageInfo // MsgConvertEvmToCoin: Arguments to send an ERC20 token to bank coin representation type MsgConvertEvmToCoin struct { - // Sender: "nibi"-prefixed Bech32 address for the signer of the transaction. - // This is also the address whose ERC20 balance will be deducted. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // Hexadecimal address of the ERC20 token to be converted and sent Erc20Addr github_com_NibiruChain_nibiru_v2_eth.EIP55Addr `protobuf:"bytes,2,opt,name=erc20_addr,json=erc20Addr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.EIP55Addr" json:"erc20_addr"` @@ -809,86 +807,93 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/tx.proto", fileDescriptor_82a0bfe4f0bab953) } var fileDescriptor_82a0bfe4f0bab953 = []byte{ - // 1261 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xfa, 0xbf, 0xc7, 0x6e, 0x12, 0xb6, 0x29, 0x5d, 0xbb, 0xad, 0x37, 0x6c, 0x45, 0x09, - 0x95, 0xb2, 0xdb, 0x18, 0xb5, 0x52, 0x73, 0x22, 0x4e, 0x5c, 0x54, 0x94, 0x40, 0xb4, 0x38, 0x3d, - 0x20, 0x24, 0x6b, 0xbc, 0x3b, 0x59, 0xaf, 0x92, 0x9d, 0x59, 0xed, 0x8c, 0x57, 0x0e, 0x27, 0x54, - 0x71, 0x40, 0xe2, 0x00, 0x88, 0x2f, 0xc0, 0x81, 0x13, 0xa7, 0x1e, 0x2a, 0xc1, 0x47, 0xa8, 0x38, - 0x55, 0x70, 0x41, 0x3d, 0x18, 0x94, 0x56, 0xaa, 0xd4, 0x63, 0x0f, 0x9c, 0xd1, 0xcc, 0x8e, 0x1d, - 0x3b, 0xc1, 0x29, 0x44, 0x88, 0xdb, 0xbc, 0x79, 0x7f, 0xe6, 0xbd, 0xdf, 0xef, 0xcd, 0x9b, 0x01, - 0xe7, 0x11, 0xeb, 0x5a, 0x28, 0x0e, 0xac, 0x78, 0xc5, 0x62, 0x7d, 0x33, 0x8c, 0x08, 0x23, 0x2a, - 0x40, 0xac, 0x6b, 0xa2, 0x38, 0x30, 0xe3, 0x95, 0xea, 0x45, 0x87, 0xd0, 0x80, 0x50, 0x2b, 0xa0, - 0x1e, 0xb7, 0x09, 0xa8, 0x97, 0x18, 0x55, 0x6b, 0x52, 0xd1, 0x81, 0x14, 0x59, 0xf1, 0x4a, 0x07, - 0x31, 0xb8, 0x62, 0x39, 0xc4, 0xc7, 0x52, 0x5f, 0x49, 0xf4, 0x6d, 0x21, 0x59, 0x89, 0x20, 0x55, - 0x0b, 0x63, 0x87, 0xf2, 0x63, 0xe4, 0xae, 0x47, 0x3c, 0x92, 0x58, 0xf3, 0x95, 0xdc, 0xbd, 0xec, - 0x11, 0xe2, 0xed, 0x23, 0x0b, 0x86, 0xbe, 0x05, 0x31, 0x26, 0x0c, 0x32, 0x9f, 0xe0, 0x61, 0xa4, - 0x8a, 0xd4, 0x0a, 0xa9, 0xd3, 0xdb, 0xb5, 0x20, 0x3e, 0x48, 0x54, 0xc6, 0x57, 0x0a, 0x38, 0xb7, - 0x45, 0xbd, 0x26, 0xeb, 0xa2, 0x08, 0xf5, 0x82, 0x56, 0x5f, 0x5d, 0x02, 0x19, 0x17, 0x32, 0xa8, - 0x29, 0x8b, 0xca, 0x52, 0xa9, 0xbe, 0x60, 0x26, 0xbe, 0xe6, 0xd0, 0xd7, 0x5c, 0xc3, 0x07, 0xb6, - 0xb0, 0x50, 0x2b, 0x20, 0x43, 0xfd, 0x4f, 0x91, 0x96, 0x5a, 0x54, 0x96, 0x94, 0x46, 0xf6, 0xc5, - 0x40, 0x57, 0x96, 0x6d, 0xb1, 0xa5, 0xea, 0x20, 0xd3, 0x85, 0xb4, 0xab, 0xa5, 0x17, 0x95, 0xa5, - 0x62, 0xa3, 0xf4, 0x72, 0xa0, 0xe7, 0xa3, 0xfd, 0x70, 0xd5, 0x58, 0x36, 0x6c, 0xa1, 0x50, 0x55, - 0x90, 0xd9, 0x8d, 0x48, 0xa0, 0x65, 0xb8, 0x81, 0x2d, 0xd6, 0xab, 0x99, 0x2f, 0xbe, 0xd3, 0x67, - 0x8c, 0x6f, 0x52, 0xa0, 0xb0, 0x89, 0x3c, 0xe8, 0x1c, 0xb4, 0xfa, 0xea, 0x02, 0xc8, 0x62, 0x82, - 0x1d, 0x24, 0xb2, 0xc9, 0xd8, 0x89, 0xa0, 0xde, 0x02, 0x45, 0x0f, 0x72, 0xcc, 0x7c, 0x27, 0x39, - 0xbd, 0xd8, 0xa8, 0x3c, 0x19, 0xe8, 0x17, 0x12, 0xf8, 0xa8, 0xbb, 0x67, 0xfa, 0xc4, 0x0a, 0x20, - 0xeb, 0x9a, 0x77, 0x31, 0xb3, 0x0b, 0x1e, 0xa4, 0xdb, 0xdc, 0x54, 0xad, 0x81, 0xb4, 0x07, 0xa9, - 0x48, 0x2a, 0xd3, 0x28, 0x1f, 0x0e, 0xf4, 0xc2, 0x7b, 0x90, 0x6e, 0xfa, 0x81, 0xcf, 0x6c, 0xae, - 0x50, 0x67, 0x41, 0x8a, 0x11, 0x99, 0x52, 0x8a, 0x11, 0xf5, 0x36, 0xc8, 0xc6, 0x70, 0xbf, 0x87, - 0xb4, 0xac, 0x38, 0xe3, 0xea, 0xd4, 0x33, 0x0e, 0x07, 0x7a, 0x6e, 0x2d, 0x20, 0x3d, 0xcc, 0xec, - 0xc4, 0x83, 0xd7, 0x27, 0x50, 0xcc, 0x2d, 0x2a, 0x4b, 0x65, 0x89, 0x57, 0x19, 0x28, 0xb1, 0x96, - 0x17, 0x1b, 0x4a, 0xcc, 0xa5, 0x48, 0x2b, 0x24, 0x52, 0xc4, 0x25, 0xaa, 0x15, 0x13, 0x89, 0xae, - 0xce, 0x72, 0x24, 0x7e, 0x7e, 0xb8, 0x9c, 0x6b, 0xf5, 0x37, 0x20, 0x83, 0xc6, 0x4f, 0x69, 0x50, - 0x5e, 0x73, 0x1c, 0x44, 0xe9, 0xa6, 0x4f, 0x59, 0xab, 0xaf, 0xbe, 0x0f, 0x0a, 0x4e, 0x17, 0xfa, - 0xb8, 0xed, 0xbb, 0x02, 0x9a, 0x62, 0xc3, 0x3a, 0x2d, 0xb9, 0xfc, 0x3a, 0x37, 0xbe, 0xbb, 0xf1, - 0x62, 0xa0, 0xe7, 0x9d, 0x64, 0x69, 0xcb, 0x85, 0x7b, 0x84, 0x71, 0x6a, 0x2a, 0xc6, 0xe9, 0x7f, - 0x8d, 0x71, 0xe6, 0x74, 0x8c, 0xb3, 0x27, 0x31, 0xce, 0x9d, 0x19, 0xe3, 0xfc, 0x18, 0xc6, 0x3b, - 0xa0, 0x00, 0x05, 0x50, 0x88, 0x6a, 0x85, 0xc5, 0xf4, 0x52, 0xa9, 0x7e, 0xd1, 0x3c, 0xba, 0xa7, - 0x66, 0x02, 0x62, 0xab, 0x17, 0xee, 0xa3, 0xc6, 0xe2, 0xa3, 0x81, 0x3e, 0xf3, 0x62, 0xa0, 0x03, - 0x38, 0x42, 0xf6, 0x87, 0xdf, 0x75, 0x70, 0x84, 0xb3, 0x3d, 0x0a, 0x95, 0x50, 0x57, 0x9c, 0xa0, - 0x0e, 0x4c, 0x50, 0x57, 0x9a, 0x46, 0xdd, 0x9f, 0x69, 0x50, 0xde, 0x38, 0xc0, 0x30, 0xf0, 0x9d, - 0x3b, 0x08, 0xfd, 0x2f, 0xd4, 0xdd, 0x06, 0x25, 0x4e, 0x1d, 0xf3, 0xc3, 0xb6, 0x03, 0xc3, 0x57, - 0x93, 0xc7, 0x89, 0x6e, 0xf9, 0xe1, 0x3a, 0x0c, 0x87, 0xae, 0xbb, 0x08, 0x09, 0xd7, 0xcc, 0x3f, - 0x71, 0xbd, 0x83, 0x10, 0x77, 0x95, 0xc4, 0x67, 0x4f, 0x27, 0x3e, 0x77, 0x92, 0xf8, 0xfc, 0x99, - 0x89, 0x2f, 0x4c, 0x21, 0xbe, 0xf8, 0x1f, 0x13, 0x0f, 0x26, 0x88, 0x2f, 0x4d, 0x10, 0x5f, 0x9e, - 0x46, 0xbc, 0x01, 0xaa, 0xcd, 0x3e, 0x43, 0x98, 0xfa, 0x04, 0x7f, 0x18, 0x8a, 0x71, 0x7c, 0x34, - 0x65, 0xe5, 0xac, 0xfb, 0x5e, 0x01, 0x17, 0x26, 0xa6, 0xaf, 0x8d, 0x68, 0x48, 0x30, 0x15, 0x25, - 0x8a, 0x01, 0xaa, 0x24, 0xf3, 0x51, 0xcc, 0xcc, 0xb7, 0x41, 0x66, 0x9f, 0x78, 0x54, 0x4b, 0x89, - 0xf2, 0xe6, 0xc6, 0xcb, 0xdb, 0x24, 0x5e, 0x23, 0xc3, 0xcb, 0xb2, 0x85, 0x89, 0x3a, 0x0f, 0xd2, - 0x11, 0x62, 0x82, 0xfa, 0xb2, 0xcd, 0x97, 0x6a, 0x05, 0x14, 0xe2, 0xa0, 0x8d, 0xa2, 0x88, 0x44, - 0x72, 0xc2, 0xe5, 0xe3, 0xa0, 0xc9, 0x45, 0xae, 0xe2, 0xa4, 0xf7, 0x28, 0x72, 0x13, 0xfa, 0xec, - 0xbc, 0x07, 0xe9, 0x0e, 0x45, 0xae, 0x4c, 0xf3, 0x4b, 0x05, 0xcc, 0x6d, 0x51, 0x6f, 0x27, 0x74, - 0x21, 0x43, 0xdb, 0x30, 0x82, 0x01, 0xe5, 0xf3, 0x01, 0xf6, 0x58, 0x97, 0x44, 0x3e, 0x3b, 0x90, - 0x7d, 0xac, 0xfd, 0xf2, 0x70, 0x79, 0x41, 0x3e, 0x61, 0x6b, 0xae, 0x1b, 0x21, 0x4a, 0x3f, 0x62, - 0x91, 0x8f, 0x3d, 0xfb, 0xc8, 0x54, 0xbd, 0x01, 0x72, 0xa1, 0x88, 0x20, 0x7a, 0xb6, 0x54, 0x57, - 0xc7, 0xcb, 0x48, 0x62, 0xcb, 0x4a, 0xa4, 0xdd, 0xea, 0xec, 0xfd, 0xe7, 0x0f, 0xae, 0x1f, 0x45, - 0x30, 0x2a, 0xe0, 0xe2, 0xb1, 0x64, 0x86, 0xa8, 0x19, 0x3f, 0x2a, 0xe0, 0xb5, 0x2d, 0xea, 0xad, - 0x47, 0x08, 0x32, 0x74, 0xa7, 0x87, 0x5b, 0x64, 0x0f, 0x61, 0x75, 0x07, 0x00, 0xfe, 0xbe, 0xb4, - 0x51, 0xe4, 0xd4, 0x6f, 0xc8, 0x5c, 0x6f, 0x3d, 0x1a, 0xe8, 0xca, 0x93, 0x81, 0x6e, 0x7a, 0x3e, - 0xeb, 0xf6, 0x3a, 0xa6, 0x43, 0x02, 0xeb, 0x03, 0xbf, 0xe3, 0x47, 0x3d, 0x71, 0xdf, 0x2c, 0x2c, - 0xd6, 0x56, 0x5c, 0xb7, 0x78, 0x7a, 0xcd, 0xbb, 0xdb, 0x37, 0x6f, 0xf2, 0x92, 0xec, 0x22, 0x8f, - 0xd4, 0xe4, 0x81, 0xd4, 0x6b, 0x60, 0x4e, 0x84, 0xed, 0x40, 0xbc, 0xd7, 0x76, 0x11, 0x26, 0x41, - 0xf2, 0x16, 0xd9, 0xe7, 0xf8, 0x76, 0x03, 0xe2, 0xbd, 0x0d, 0xbe, 0xa9, 0xbe, 0x0e, 0x72, 0x14, - 0x61, 0x17, 0x45, 0xc9, 0x4d, 0xb4, 0xa5, 0xb4, 0x5a, 0xe2, 0x75, 0x49, 0xc1, 0xe8, 0x80, 0xca, - 0x89, 0xc4, 0x47, 0xcd, 0xd0, 0x04, 0xf3, 0xbb, 0x3d, 0xcc, 0xf8, 0x5e, 0x3b, 0x80, 0x61, 0xe8, - 0x63, 0x6f, 0xf4, 0x3c, 0x8f, 0xa1, 0x37, 0xf4, 0x93, 0xf8, 0xcd, 0x0d, 0x7d, 0xb6, 0x12, 0x17, - 0xe3, 0x99, 0x02, 0xce, 0xf3, 0x43, 0x08, 0x8e, 0x51, 0xc4, 0xd6, 0x89, 0x8f, 0x5b, 0xa4, 0x19, - 0x07, 0xea, 0x3d, 0x50, 0x62, 0xa4, 0x8d, 0x58, 0xb7, 0x0d, 0x5d, 0x37, 0x1a, 0x03, 0x68, 0xe6, - 0x2c, 0x00, 0x31, 0xd2, 0x64, 0x5d, 0xbe, 0x1c, 0x2b, 0x3c, 0x35, 0x5e, 0xb8, 0xba, 0x0d, 0x8a, - 0x02, 0x33, 0xfe, 0x0d, 0x12, 0x98, 0x94, 0xea, 0x15, 0x53, 0xf6, 0x0d, 0xff, 0x27, 0x99, 0xf2, - 0x9f, 0x64, 0xf2, 0x14, 0x1b, 0x1a, 0x4f, 0xe4, 0xe5, 0x40, 0x9f, 0x3f, 0x80, 0xc1, 0xfe, 0xaa, - 0x31, 0xf2, 0x34, 0xec, 0x02, 0x5f, 0x73, 0x9b, 0x49, 0x28, 0xaf, 0x80, 0x4b, 0x7f, 0x53, 0xe5, - 0x10, 0xcc, 0xfa, 0xe7, 0x69, 0x90, 0xde, 0xa2, 0x9e, 0x8a, 0x01, 0x18, 0xfb, 0xf5, 0x54, 0xc6, - 0x81, 0x9c, 0xb8, 0x92, 0xd5, 0x37, 0xa6, 0xaa, 0x46, 0x7d, 0x67, 0xdc, 0xff, 0xf5, 0xd9, 0xb7, - 0xa9, 0xcb, 0x46, 0x75, 0x08, 0xcb, 0xf0, 0xdb, 0x26, 0x4d, 0xdb, 0xac, 0xaf, 0x6e, 0x83, 0xf2, - 0xc4, 0x05, 0xba, 0x74, 0x2c, 0xec, 0xb8, 0xb2, 0x7a, 0xf5, 0x14, 0xe5, 0xa8, 0x2d, 0xee, 0x81, - 0xd9, 0x63, 0x9d, 0x7e, 0xe5, 0x98, 0xdb, 0xa4, 0xba, 0xfa, 0xe6, 0xa9, 0xea, 0x51, 0xdc, 0x4f, - 0xc0, 0xfc, 0x89, 0x1e, 0xd1, 0x8f, 0xbb, 0x1e, 0x33, 0xa8, 0xbe, 0xf5, 0x0a, 0x83, 0x61, 0xf4, - 0x6a, 0xf6, 0xb3, 0xe7, 0x0f, 0xae, 0x2b, 0x8d, 0x77, 0x1f, 0x1d, 0xd6, 0x94, 0xc7, 0x87, 0x35, - 0xe5, 0x8f, 0xc3, 0x9a, 0xf2, 0xf5, 0xd3, 0xda, 0xcc, 0xe3, 0xa7, 0xb5, 0x99, 0xdf, 0x9e, 0xd6, - 0x66, 0x3e, 0xbe, 0xf6, 0xca, 0x8e, 0xeb, 0x73, 0x7c, 0x3b, 0x39, 0xf1, 0x25, 0x7d, 0xe7, 0xaf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x75, 0x9e, 0x38, 0x6b, 0x9d, 0x0b, 0x00, 0x00, + // 1368 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xda, 0x8e, 0x7f, 0x8c, 0xdd, 0x24, 0xdd, 0xa6, 0xdf, 0xd8, 0x6e, 0xeb, 0xcd, 0x77, + 0x2b, 0x4a, 0xa8, 0x94, 0xdd, 0xc6, 0xa8, 0x95, 0x9a, 0x13, 0x71, 0xe2, 0xa2, 0xa2, 0x04, 0xa2, + 0xc5, 0xe9, 0xa1, 0x42, 0xb2, 0xc6, 0xbb, 0x93, 0xf5, 0x2a, 0xde, 0x99, 0xd5, 0xce, 0x78, 0x71, + 0x7a, 0x42, 0x3d, 0x21, 0x71, 0x00, 0xc4, 0x3f, 0xc0, 0x81, 0x13, 0xa7, 0x1e, 0x7a, 0xe0, 0x4f, + 0xa8, 0x38, 0x55, 0x70, 0x41, 0x3d, 0x18, 0x48, 0x2b, 0x55, 0xea, 0xb1, 0x07, 0xce, 0x68, 0x66, + 0xc7, 0xbf, 0x92, 0x3a, 0x85, 0x82, 0xb8, 0xcd, 0x9b, 0xf7, 0x63, 0xde, 0xfb, 0x7c, 0xde, 0xbc, + 0x9d, 0x05, 0xe7, 0x10, 0x6b, 0x9b, 0x28, 0xf2, 0xcd, 0x68, 0xcd, 0x64, 0x3d, 0x23, 0x08, 0x09, + 0x23, 0x2a, 0x40, 0xac, 0x6d, 0xa0, 0xc8, 0x37, 0xa2, 0xb5, 0x72, 0xc5, 0x26, 0xd4, 0x27, 0xd4, + 0x6c, 0x41, 0x8a, 0xcc, 0x68, 0xad, 0x85, 0x18, 0x5c, 0x33, 0x6d, 0xe2, 0xe1, 0xd8, 0xb6, 0xbc, + 0x24, 0xf5, 0x3e, 0x75, 0x79, 0x0c, 0x9f, 0xba, 0x52, 0x51, 0x8a, 0x15, 0x4d, 0x21, 0x99, 0xb1, + 0x20, 0x55, 0x8b, 0x63, 0x87, 0xf2, 0x63, 0xe4, 0xae, 0x4b, 0x5c, 0x12, 0x5b, 0xf3, 0x95, 0xdc, + 0xbd, 0xe8, 0x12, 0xe2, 0x76, 0x90, 0x09, 0x03, 0xcf, 0x84, 0x18, 0x13, 0x06, 0x99, 0x47, 0xf0, + 0x20, 0x52, 0x49, 0x6a, 0x85, 0xd4, 0xea, 0xee, 0x9b, 0x10, 0x1f, 0xc6, 0x2a, 0xfd, 0x4b, 0x05, + 0x9c, 0xd9, 0xa1, 0x6e, 0x9d, 0xb5, 0x51, 0x88, 0xba, 0x7e, 0xa3, 0xa7, 0xae, 0x80, 0x94, 0x03, + 0x19, 0x2c, 0x2a, 0xcb, 0xca, 0x4a, 0xbe, 0xba, 0x68, 0xc4, 0xbe, 0xc6, 0xc0, 0xd7, 0xd8, 0xc0, + 0x87, 0x96, 0xb0, 0x50, 0x4b, 0x20, 0x45, 0xbd, 0x7b, 0xa8, 0x98, 0x58, 0x56, 0x56, 0x94, 0xda, + 0xec, 0x8b, 0xbe, 0xa6, 0xac, 0x5a, 0x62, 0x4b, 0xd5, 0x40, 0xaa, 0x0d, 0x69, 0xbb, 0x98, 0x5c, + 0x56, 0x56, 0x72, 0xb5, 0xfc, 0xcb, 0xbe, 0x96, 0x09, 0x3b, 0xc1, 0xba, 0xbe, 0xaa, 0x5b, 0x42, + 0xa1, 0xaa, 0x20, 0xb5, 0x1f, 0x12, 0xbf, 0x98, 0xe2, 0x06, 0x96, 0x58, 0xaf, 0xa7, 0x3e, 0xff, + 0x56, 0x9b, 0xd1, 0xbf, 0x4e, 0x80, 0xec, 0x36, 0x72, 0xa1, 0x7d, 0xd8, 0xe8, 0xa9, 0x8b, 0x60, + 0x16, 0x13, 0x6c, 0x23, 0x91, 0x4d, 0xca, 0x8a, 0x05, 0xf5, 0x06, 0xc8, 0xb9, 0x90, 0x63, 0xe6, + 0xd9, 0xf1, 0xe9, 0xb9, 0x5a, 0xe9, 0x49, 0x5f, 0x3b, 0x1f, 0xc3, 0x47, 0x9d, 0x03, 0xc3, 0x23, + 0xa6, 0x0f, 0x59, 0xdb, 0xb8, 0x8d, 0x99, 0x95, 0x75, 0x21, 0xdd, 0xe5, 0xa6, 0x6a, 0x05, 0x24, + 0x5d, 0x48, 0x45, 0x52, 0xa9, 0x5a, 0xe1, 0xa8, 0xaf, 0x65, 0xdf, 0x87, 0x74, 0xdb, 0xf3, 0x3d, + 0x66, 0x71, 0x85, 0x3a, 0x07, 0x12, 0x8c, 0xc8, 0x94, 0x12, 0x8c, 0xa8, 0x37, 0xc1, 0x6c, 0x04, + 0x3b, 0x5d, 0x54, 0x9c, 0x15, 0x67, 0x5c, 0x9e, 0x7a, 0xc6, 0x51, 0x5f, 0x4b, 0x6f, 0xf8, 0xa4, + 0x8b, 0x99, 0x15, 0x7b, 0xf0, 0xfa, 0x04, 0x8a, 0xe9, 0x65, 0x65, 0xa5, 0x20, 0xf1, 0x2a, 0x00, + 0x25, 0x2a, 0x66, 0xc4, 0x86, 0x12, 0x71, 0x29, 0x2c, 0x66, 0x63, 0x29, 0xe4, 0x12, 0x2d, 0xe6, + 0x62, 0x89, 0xae, 0xcf, 0x71, 0x24, 0x7e, 0x7c, 0xb8, 0x9a, 0x6e, 0xf4, 0xb6, 0x20, 0x83, 0xfa, + 0x0f, 0x49, 0x50, 0xd8, 0xb0, 0x6d, 0x44, 0xe9, 0xb6, 0x47, 0x59, 0xa3, 0xa7, 0x7e, 0x00, 0xb2, + 0x76, 0x1b, 0x7a, 0xb8, 0xe9, 0x39, 0x02, 0x9a, 0x5c, 0xcd, 0x3c, 0x2d, 0xb9, 0xcc, 0x26, 0x37, + 0xbe, 0xbd, 0xf5, 0xa2, 0xaf, 0x65, 0xec, 0x78, 0x69, 0xc9, 0x85, 0x33, 0xc2, 0x38, 0x31, 0x15, + 0xe3, 0xe4, 0xdf, 0xc6, 0x38, 0x75, 0x3a, 0xc6, 0xb3, 0x27, 0x31, 0x4e, 0xbf, 0x31, 0xc6, 0x99, + 0x31, 0x8c, 0xf7, 0x40, 0x16, 0x0a, 0xa0, 0x10, 0x2d, 0x66, 0x97, 0x93, 0x2b, 0xf9, 0xea, 0x92, + 0x31, 0xba, 0xa7, 0x46, 0x0c, 0x62, 0xa3, 0x1b, 0x74, 0x50, 0x6d, 0xf9, 0x51, 0x5f, 0x9b, 0x79, + 0xd1, 0xd7, 0x00, 0x1c, 0x22, 0xfb, 0xfd, 0xaf, 0x1a, 0x18, 0xe1, 0x6c, 0x0d, 0x43, 0xc5, 0xd4, + 0xe5, 0x26, 0xa8, 0x03, 0x13, 0xd4, 0xe5, 0xa7, 0x51, 0xf7, 0x47, 0x12, 0x14, 0xb6, 0x0e, 0x31, + 0xf4, 0x3d, 0xfb, 0x16, 0x42, 0xff, 0x09, 0x75, 0x37, 0x41, 0x9e, 0x53, 0xc7, 0xbc, 0xa0, 0x69, + 0xc3, 0xe0, 0xf5, 0xe4, 0x71, 0xa2, 0x1b, 0x5e, 0xb0, 0x09, 0x83, 0x81, 0xeb, 0x3e, 0x42, 0xc2, + 0x35, 0xf5, 0x57, 0x5c, 0x6f, 0x21, 0xc4, 0x5d, 0x25, 0xf1, 0xb3, 0xa7, 0x13, 0x9f, 0x3e, 0x49, + 0x7c, 0xe6, 0x8d, 0x89, 0xcf, 0x4e, 0x21, 0x3e, 0xf7, 0x2f, 0x13, 0x0f, 0x26, 0x88, 0xcf, 0x4f, + 0x10, 0x5f, 0x98, 0x46, 0xbc, 0x0e, 0xca, 0xf5, 0x1e, 0x43, 0x98, 0x7a, 0x04, 0x7f, 0x14, 0x88, + 0x71, 0x3c, 0x9a, 0xb2, 0x72, 0xd6, 0x7d, 0xa7, 0x80, 0xf3, 0x13, 0xd3, 0xd7, 0x42, 0x34, 0x20, + 0x98, 0x8a, 0x12, 0xc5, 0x00, 0x55, 0xe2, 0xf9, 0x28, 0x66, 0xe6, 0x3b, 0x20, 0xd5, 0x21, 0x2e, + 0x2d, 0x26, 0x44, 0x79, 0xf3, 0xe3, 0xe5, 0x6d, 0x13, 0xb7, 0x96, 0xe2, 0x65, 0x59, 0xc2, 0x44, + 0x5d, 0x00, 0xc9, 0x10, 0x31, 0x41, 0x7d, 0xc1, 0xe2, 0x4b, 0xb5, 0x04, 0xb2, 0x91, 0xdf, 0x44, + 0x61, 0x48, 0x42, 0x39, 0xe1, 0x32, 0x91, 0x5f, 0xe7, 0x22, 0x57, 0x71, 0xd2, 0xbb, 0x14, 0x39, + 0x31, 0x7d, 0x56, 0xc6, 0x85, 0x74, 0x8f, 0x22, 0x47, 0xa6, 0xf9, 0x85, 0x02, 0xe6, 0x77, 0xa8, + 0xbb, 0x17, 0x38, 0x90, 0xa1, 0x5d, 0x18, 0x42, 0x9f, 0xf2, 0xf9, 0x00, 0xbb, 0xac, 0x4d, 0x42, + 0x8f, 0x1d, 0xca, 0x3e, 0x2e, 0xfe, 0xf4, 0x70, 0x75, 0x51, 0x7e, 0xc2, 0x36, 0x1c, 0x27, 0x44, + 0x94, 0x7e, 0xcc, 0x42, 0x0f, 0xbb, 0xd6, 0xc8, 0x54, 0xbd, 0x06, 0xd2, 0x81, 0x88, 0x20, 0x7a, + 0x36, 0x5f, 0x55, 0xc7, 0xcb, 0x88, 0x63, 0xcb, 0x4a, 0xa4, 0xdd, 0xfa, 0xdc, 0xfd, 0xe7, 0x0f, + 0xae, 0x8e, 0x22, 0xe8, 0x25, 0xb0, 0x74, 0x2c, 0x99, 0x01, 0x6a, 0xfa, 0x73, 0x05, 0x9c, 0xdd, + 0xa1, 0xee, 0x66, 0x88, 0x20, 0x43, 0xb7, 0xba, 0xb8, 0x41, 0x0e, 0x10, 0x56, 0xf7, 0x00, 0xe0, + 0xdf, 0x97, 0x26, 0x0a, 0xed, 0xea, 0x35, 0x99, 0xeb, 0x8d, 0x47, 0x7d, 0x4d, 0x79, 0xd2, 0xd7, + 0x0c, 0xd7, 0x63, 0xed, 0x6e, 0xcb, 0xb0, 0x89, 0x6f, 0x7e, 0xe8, 0xb5, 0xbc, 0xb0, 0x2b, 0xee, + 0x9b, 0x89, 0xc5, 0xda, 0x8c, 0xaa, 0x26, 0x4f, 0xaf, 0x7e, 0x7b, 0xf7, 0xfa, 0x75, 0x5e, 0x92, + 0x95, 0xe3, 0x91, 0xea, 0x3c, 0x90, 0x7a, 0x05, 0xcc, 0x8b, 0xb0, 0x2d, 0x88, 0x0f, 0x9a, 0x0e, + 0xc2, 0xc4, 0x8f, 0xbf, 0x45, 0xd6, 0x19, 0xbe, 0x5d, 0x83, 0xf8, 0x60, 0x8b, 0x6f, 0xaa, 0xff, + 0x03, 0x69, 0x8a, 0xb0, 0x83, 0xc2, 0xf8, 0x26, 0x5a, 0x52, 0x52, 0x0d, 0x70, 0x0e, 0x76, 0x3a, + 0xe4, 0xd3, 0xe6, 0x3d, 0x14, 0x92, 0xa6, 0x83, 0x6c, 0xcf, 0x87, 0x9d, 0x78, 0x72, 0x66, 0xad, + 0xb3, 0x42, 0x75, 0x17, 0x85, 0x64, 0x4b, 0x2a, 0xd6, 0xf3, 0x1c, 0x07, 0xe9, 0xac, 0xb7, 0x40, + 0xe9, 0x44, 0xa1, 0xc3, 0xe6, 0xa9, 0x83, 0x85, 0xfd, 0x2e, 0x66, 0x7c, 0xaf, 0xe9, 0xc3, 0x20, + 0xf0, 0xb0, 0x3b, 0xfc, 0x9c, 0x8f, 0xa1, 0x3d, 0xf0, 0x93, 0x78, 0xcf, 0x0f, 0x7c, 0x76, 0x62, + 0x17, 0xfd, 0x99, 0x02, 0xce, 0xf1, 0x43, 0x08, 0x8e, 0x50, 0xc8, 0x36, 0x89, 0x87, 0x1b, 0xa4, + 0x1e, 0xf9, 0xea, 0x1d, 0x90, 0x67, 0xa4, 0x89, 0x58, 0xbb, 0x09, 0x1d, 0x27, 0x1c, 0x03, 0x74, + 0xe6, 0x4d, 0x00, 0x65, 0xa4, 0xce, 0xda, 0x7c, 0x39, 0x06, 0x54, 0x62, 0x02, 0xa8, 0x5d, 0x90, + 0x13, 0x18, 0xf3, 0xf7, 0x94, 0xc0, 0x30, 0x5f, 0x2d, 0x19, 0xb2, 0xcf, 0xf8, 0x83, 0xcb, 0x90, + 0x0f, 0x2e, 0x83, 0xa7, 0x58, 0x2b, 0xf2, 0x44, 0x5e, 0xf6, 0xb5, 0x85, 0x43, 0xe8, 0x77, 0xd6, + 0xf5, 0xa1, 0xa7, 0x6e, 0x65, 0xf9, 0x9a, 0xdb, 0x4c, 0x42, 0x79, 0x09, 0x5c, 0x78, 0x45, 0x95, + 0xc3, 0x9e, 0xfa, 0x7d, 0x02, 0x85, 0x7a, 0xe4, 0x37, 0x08, 0x37, 0x1a, 0xcb, 0x56, 0x99, 0xc8, + 0x76, 0x0f, 0x00, 0xd1, 0x68, 0x31, 0x38, 0x89, 0x7f, 0x06, 0x8e, 0x88, 0x24, 0xc0, 0xb9, 0x0e, + 0xd2, 0x50, 0x0c, 0x41, 0x39, 0xcf, 0x2f, 0xc9, 0x90, 0x53, 0x06, 0xb3, 0x34, 0x56, 0x97, 0x40, + 0x86, 0x91, 0x38, 0x95, 0xf8, 0xd6, 0xa7, 0x19, 0xe1, 0xf1, 0x4e, 0x81, 0x60, 0x58, 0xe2, 0x00, + 0x82, 0xea, 0x51, 0x12, 0x24, 0x77, 0xa8, 0xab, 0x62, 0x00, 0xc6, 0x1e, 0x8a, 0xa5, 0xf1, 0x5e, + 0x9a, 0x98, 0x62, 0xe5, 0xff, 0x4f, 0x55, 0x0d, 0x61, 0xd5, 0xef, 0xff, 0xfc, 0xec, 0x9b, 0xc4, + 0x45, 0xbd, 0x3c, 0x28, 0x7e, 0xf0, 0xd2, 0x95, 0xa6, 0x4d, 0xd6, 0x53, 0x77, 0x41, 0x61, 0x62, + 0xe6, 0x5c, 0x38, 0x16, 0x76, 0x5c, 0x59, 0xbe, 0x7c, 0x8a, 0x72, 0x78, 0x33, 0xee, 0x80, 0xb9, + 0x63, 0xc3, 0xe1, 0xd2, 0x31, 0xb7, 0x49, 0x75, 0xf9, 0xad, 0x53, 0xd5, 0xc3, 0xb8, 0x9f, 0x80, + 0x85, 0x13, 0xd7, 0x44, 0x3b, 0xee, 0x7a, 0xcc, 0xa0, 0xfc, 0xf6, 0x6b, 0x0c, 0x5e, 0x11, 0x7d, + 0xd4, 0x7e, 0x53, 0xa2, 0x0f, 0x0d, 0xa6, 0x45, 0x3f, 0xc1, 0x6e, 0x79, 0xf6, 0xb3, 0xe7, 0x0f, + 0xae, 0x2a, 0xb5, 0xf7, 0x1e, 0x1d, 0x55, 0x94, 0xc7, 0x47, 0x15, 0xe5, 0xb7, 0xa3, 0x8a, 0xf2, + 0xd5, 0xd3, 0xca, 0xcc, 0xe3, 0xa7, 0x95, 0x99, 0x5f, 0x9e, 0x56, 0x66, 0xee, 0x5e, 0x79, 0x6d, + 0xd7, 0xf6, 0x38, 0x7b, 0xad, 0xb4, 0xf8, 0x47, 0x78, 0xf7, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xee, 0x99, 0xa3, 0xcf, 0x2e, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 816a01c0053c1669bcb8869661d81037c6f6f7c7 Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 23 Sep 2025 14:59:28 +0700 Subject: [PATCH 71/72] Refactor WASM query test and update dependencies and update tests --- app/ante/handler_opts.go | 2 +- app/keepers.go | 5 +- app/upgrades/v2_7_0/testnet_stnibi_test.go | 2 +- app/wasmext/stargate_query.go | 101 +++++++++++---------- app/wasmext/stargate_query_test.go | 2 +- app/wasmext/wasm.go | 3 +- go.mod | 29 ++++-- go.sum | 50 ++++++---- x/common/testutil/testapp/testapp.go | 3 +- x/evm/evmtest/upgrades.go | 3 +- x/evm/precompile/funtoken_test.go | 7 +- 11 files changed, 113 insertions(+), 94 deletions(-) diff --git a/app/ante/handler_opts.go b/app/ante/handler_opts.go index 6ab1d1bc02..9e13e6422e 100644 --- a/app/ante/handler_opts.go +++ b/app/ante/handler_opts.go @@ -24,7 +24,7 @@ type AnteHandlerOptions struct { AccountKeeper authkeeper.AccountKeeper TxCounterStoreKey store.KVStoreService - WasmConfig *wasmtypes.WasmConfig + WasmConfig *wasmtypes.NodeConfig MaxTxGasWanted uint64 } diff --git a/app/keepers.go b/app/keepers.go index a38465c6f9..f807dd81c3 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -88,7 +88,7 @@ type AppKeepers struct { func (app *NibiruApp) initNonDepinjectKeepers( appOpts servertypes.AppOptions, -) (wasmConfig wasmtypes.WasmConfig) { +) (wasmConfig wasmtypes.NodeConfig) { govModuleAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() initSubspace(app.paramsKeeper) @@ -202,7 +202,7 @@ func (app *NibiruApp) initNonDepinjectKeepers( app.icaHostKeeper.WithQueryRouter(app.GRPCQueryRouter()) wasmDir := filepath.Join(homePath, "data") - wasmConfig, err := wasm.ReadWasmConfig(appOpts) + wasmConfig, err := wasm.ReadNodeConfig(appOpts) if err != nil { panic("error while reading wasm config: " + err.Error()) } @@ -249,6 +249,7 @@ func (app *NibiruApp) initNonDepinjectKeepers( app.GRPCQueryRouter(), wasmDir, wasmConfig, + wasmtypes.VMConfig{}, wasmkeeper.BuiltInCapabilities(), govModuleAddr, append(GetWasmOpts(*app, appOpts, wmha), wasmkeeper.WithWasmEngine(wasmVM))..., diff --git a/app/upgrades/v2_7_0/testnet_stnibi_test.go b/app/upgrades/v2_7_0/testnet_stnibi_test.go index 348c05bd50..8c703a8462 100644 --- a/app/upgrades/v2_7_0/testnet_stnibi_test.go +++ b/app/upgrades/v2_7_0/testnet_stnibi_test.go @@ -154,7 +154,7 @@ func (s *Suite) TestTestnet() { s.Require().NotNil(erc20AuthAcc) s.T().Log("Commandeer that account number and bytecode") - accNum := erc20AuthAcc.GetAccountNumber() + accNum := deps.App.AccountKeeper.NextAccountNumber(deps.Ctx) sequence := erc20AuthAcc.GetSequence() pubkey := erc20AuthAcc.GetPubKey() s.Require().Nil(pubkey, "Contracts don't have public keys") diff --git a/app/wasmext/stargate_query.go b/app/wasmext/stargate_query.go index 6b472f8430..32a82646c2 100644 --- a/app/wasmext/stargate_query.go +++ b/app/wasmext/stargate_query.go @@ -13,6 +13,7 @@ import ( auth "github.com/cosmos/cosmos-sdk/x/auth/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/gogoproto/proto" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" @@ -70,75 +71,75 @@ deterministically. func WasmAcceptedStargateQueries() wasmkeeper.AcceptedQueries { return wasmkeeper.AcceptedQueries{ // ibc - "/ibc.core.client.v1.Query/ClientState": &ibcclienttypes.QueryClientStateResponse{}, - "/ibc.core.client.v1.Query/ConsensusState": &ibcclienttypes.QueryConsensusStateResponse{}, - "/ibc.core.connection.v1.Query/Connection": &ibcconnectiontypes.QueryConnectionResponse{}, - "/ibc.core.connection.v1.Query/Connections": &ibcconnectiontypes.QueryConnectionsResponse{}, - "/ibc.core.connection.v1.Query/ClientConnections": &ibcconnectiontypes.QueryClientConnectionsResponse{}, - "/ibc.core.connection.v1.Query/ConnectionConsensusState": &ibcconnectiontypes.QueryConnectionConsensusStateResponse{}, - "/ibc.core.connection.v1.Query/ConnectionParams": &ibcconnectiontypes.QueryConnectionParamsResponse{}, + "/ibc.core.client.v1.Query/ClientState": func() proto.Message { return &ibcclienttypes.QueryClientStateResponse{} }, + "/ibc.core.client.v1.Query/ConsensusState": func() proto.Message { return &ibcclienttypes.QueryConsensusStateResponse{} }, + "/ibc.core.connection.v1.Query/Connection": func() proto.Message { return &ibcconnectiontypes.QueryConnectionResponse{} }, + "/ibc.core.connection.v1.Query/Connections": func() proto.Message { return &ibcconnectiontypes.QueryConnectionsResponse{} }, + "/ibc.core.connection.v1.Query/ClientConnections": func() proto.Message { return &ibcconnectiontypes.QueryClientConnectionsResponse{} }, + "/ibc.core.connection.v1.Query/ConnectionConsensusState": func() proto.Message { return &ibcconnectiontypes.QueryConnectionConsensusStateResponse{} }, + "/ibc.core.connection.v1.Query/ConnectionParams": func() proto.Message { return &ibcconnectiontypes.QueryConnectionParamsResponse{} }, // ibc transfer - "/ibc.applications.transfer.v1.Query/DenomTrace": &ibctransfertypes.QueryDenomTraceResponse{}, - "/ibc.applications.transfer.v1.Query/Params": &ibctransfertypes.QueryParamsResponse{}, - "/ibc.applications.transfer.v1.Query/DenomHash": &ibctransfertypes.QueryDenomHashResponse{}, - "/ibc.applications.transfer.v1.Query/EscrowAddress": &ibctransfertypes.QueryEscrowAddressResponse{}, - "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom": &ibctransfertypes.QueryTotalEscrowForDenomResponse{}, + "/ibc.applications.transfer.v1.Query/DenomTrace": func() proto.Message { return &ibctransfertypes.QueryDenomTraceResponse{} }, + "/ibc.applications.transfer.v1.Query/Params": func() proto.Message { return &ibctransfertypes.QueryParamsResponse{} }, + "/ibc.applications.transfer.v1.Query/DenomHash": func() proto.Message { return &ibctransfertypes.QueryDenomHashResponse{} }, + "/ibc.applications.transfer.v1.Query/EscrowAddress": func() proto.Message { return &ibctransfertypes.QueryEscrowAddressResponse{} }, + "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom": func() proto.Message { return &ibctransfertypes.QueryTotalEscrowForDenomResponse{} }, // cosmos auth - "/cosmos.auth.v1beta1.Query/Account": new(auth.QueryAccountResponse), - "/cosmos.auth.v1beta1.Query/Params": new(auth.QueryParamsResponse), + "/cosmos.auth.v1beta1.Query/Account": func() proto.Message { return &auth.QueryAccountResponse{} }, + "/cosmos.auth.v1beta1.Query/Params": func() proto.Message { return &auth.QueryParamsResponse{} }, // cosmos bank - "/cosmos.bank.v1beta1.Query/Balance": new(bank.QueryBalanceResponse), - "/cosmos.bank.v1beta1.Query/DenomMetadata": new(bank.QueryDenomMetadataResponse), - "/cosmos.bank.v1beta1.Query/Params": new(bank.QueryParamsResponse), - "/cosmos.bank.v1beta1.Query/SupplyOf": new(bank.QuerySupplyOfResponse), - "/cosmos.bank.v1beta1.Query/AllBalances": new(bank.QueryAllBalancesResponse), + "/cosmos.bank.v1beta1.Query/Balance": func() proto.Message { return &bank.QueryBalanceResponse{} }, + "/cosmos.bank.v1beta1.Query/DenomMetadata": func() proto.Message { return &bank.QueryDenomMetadataResponse{} }, + "/cosmos.bank.v1beta1.Query/Params": func() proto.Message { return &bank.QueryParamsResponse{} }, + "/cosmos.bank.v1beta1.Query/SupplyOf": func() proto.Message { return &bank.QuerySupplyOfResponse{} }, + "/cosmos.bank.v1beta1.Query/AllBalances": func() proto.Message { return &bank.QueryAllBalancesResponse{} }, // cosmos gov - "/cosmos.gov.v1.Query/Proposal": new(gov.QueryProposalResponse), - "/cosmos.gov.v1.Query/Params": new(gov.QueryParamsResponse), - "/cosmos.gov.v1.Query/Vote": new(gov.QueryVoteResponse), + "/cosmos.gov.v1.Query/Proposal": func() proto.Message { return &gov.QueryProposalResponse{} }, + "/cosmos.gov.v1.Query/Params": func() proto.Message { return &gov.QueryParamsResponse{} }, + "/cosmos.gov.v1.Query/Vote": func() proto.Message { return &gov.QueryVoteResponse{} }, // nibiru tokenfactory - "/nibiru.tokenfactory.v1.Query/Denoms": new(tokenfactory.QueryDenomsResponse), - "/nibiru.tokenfactory.v1.Query/Params": new(tokenfactory.QueryParamsResponse), - "/nibiru.tokenfactory.v1.Query/DenomInfo": new(tokenfactory.QueryDenomInfoResponse), + "/nibiru.tokenfactory.v1.Query/Denoms": func() proto.Message { return &tokenfactory.QueryDenomsResponse{} }, + "/nibiru.tokenfactory.v1.Query/Params": func() proto.Message { return &tokenfactory.QueryParamsResponse{} }, + "/nibiru.tokenfactory.v1.Query/DenomInfo": func() proto.Message { return &tokenfactory.QueryDenomInfoResponse{} }, // nibiru epochs - "/nibiru.epochs.v1.Query/EpochInfos": new(epochs.QueryEpochInfosResponse), - "/nibiru.epochs.v1.Query/CurrentEpoch": new(epochs.QueryCurrentEpochResponse), + "/nibiru.epochs.v1.Query/EpochInfos": func() proto.Message { return &epochs.QueryEpochInfosResponse{} }, + "/nibiru.epochs.v1.Query/CurrentEpoch": func() proto.Message { return &epochs.QueryCurrentEpochResponse{} }, // nibiru inflation - "/nibiru.inflation.v1.Query/Period": new(inflation.QueryPeriodResponse), - "/nibiru.inflation.v1.Query/EpochMintProvision": new(inflation.QueryEpochMintProvisionResponse), - "/nibiru.inflation.v1.Query/SkippedEpochs": new(inflation.QuerySkippedEpochsResponse), - "/nibiru.inflation.v1.Query/CirculatingSupply": new(inflation.QueryCirculatingSupplyResponse), - "/nibiru.inflation.v1.Query/InflationRate": new(inflation.QueryInflationRateResponse), - "/nibiru.inflation.v1.Query/Params": new(inflation.QueryParamsResponse), + "/nibiru.inflation.v1.Query/Period": func() proto.Message { return &inflation.QueryPeriodResponse{} }, + "/nibiru.inflation.v1.Query/EpochMintProvision": func() proto.Message { return &inflation.QueryEpochMintProvisionResponse{} }, + "/nibiru.inflation.v1.Query/SkippedEpochs": func() proto.Message { return &inflation.QuerySkippedEpochsResponse{} }, + "/nibiru.inflation.v1.Query/CirculatingSupply": func() proto.Message { return &inflation.QueryCirculatingSupplyResponse{} }, + "/nibiru.inflation.v1.Query/InflationRate": func() proto.Message { return &inflation.QueryInflationRateResponse{} }, + "/nibiru.inflation.v1.Query/Params": func() proto.Message { return &inflation.QueryParamsResponse{} }, // nibiru oracle - "/nibiru.oracle.v1.Query/ExchangeRate": new(oracle.QueryExchangeRateResponse), - "/nibiru.oracle.v1.Query/ExchangeRateTwap": new(oracle.QueryExchangeRateResponse), - "/nibiru.oracle.v1.Query/ExchangeRates": new(oracle.QueryExchangeRatesResponse), - "/nibiru.oracle.v1.Query/Actives": new(oracle.QueryActivesResponse), - "/nibiru.oracle.v1.Query/VoteTargets": new(oracle.QueryVoteTargetsResponse), - "/nibiru.oracle.v1.Query/FeederDelegation": new(oracle.QueryFeederDelegationResponse), - "/nibiru.oracle.v1.Query/MissCounter": new(oracle.QueryMissCounterResponse), - "/nibiru.oracle.v1.Query/AggregatePrevote": new(oracle.QueryAggregatePrevoteResponse), - "/nibiru.oracle.v1.Query/AggregatePrevotes": new(oracle.QueryAggregatePrevotesResponse), - "/nibiru.oracle.v1.Query/AggregateVote": new(oracle.QueryAggregateVoteResponse), - "/nibiru.oracle.v1.Query/AggregateVotes": new(oracle.QueryAggregateVotesResponse), - "/nibiru.oracle.v1.Query/Params": new(oracle.QueryParamsResponse), + "/nibiru.oracle.v1.Query/ExchangeRate": func() proto.Message { return &oracle.QueryExchangeRateResponse{} }, + "/nibiru.oracle.v1.Query/ExchangeRateTwap": func() proto.Message { return &oracle.QueryExchangeRateResponse{} }, + "/nibiru.oracle.v1.Query/ExchangeRates": func() proto.Message { return &oracle.QueryExchangeRatesResponse{} }, + "/nibiru.oracle.v1.Query/Actives": func() proto.Message { return &oracle.QueryActivesResponse{} }, + "/nibiru.oracle.v1.Query/VoteTargets": func() proto.Message { return &oracle.QueryVoteTargetsResponse{} }, + "/nibiru.oracle.v1.Query/FeederDelegation": func() proto.Message { return &oracle.QueryFeederDelegationResponse{} }, + "/nibiru.oracle.v1.Query/MissCounter": func() proto.Message { return &oracle.QueryMissCounterResponse{} }, + "/nibiru.oracle.v1.Query/AggregatePrevote": func() proto.Message { return &oracle.QueryAggregatePrevoteResponse{} }, + "/nibiru.oracle.v1.Query/AggregatePrevotes": func() proto.Message { return &oracle.QueryAggregatePrevotesResponse{} }, + "/nibiru.oracle.v1.Query/AggregateVote": func() proto.Message { return &oracle.QueryAggregateVoteResponse{} }, + "/nibiru.oracle.v1.Query/AggregateVotes": func() proto.Message { return &oracle.QueryAggregateVotesResponse{} }, + "/nibiru.oracle.v1.Query/Params": func() proto.Message { return &oracle.QueryParamsResponse{} }, // nibiru sudo - "/nibiru.sudo.v1.Query/QuerySudoers": new(sudotypes.QuerySudoersResponse), + "/nibiru.sudo.v1.Query/QuerySudoers": func() proto.Message { return &sudotypes.QuerySudoersResponse{} }, // nibiru devgas - "/nibiru.devgas.v1.Query/FeeShares": new(devgas.QueryFeeSharesResponse), - "/nibiru.devgas.v1.Query/FeeShare": new(devgas.QueryFeeShareResponse), - "/nibiru.devgas.v1.Query/Params": new(devgas.QueryParamsResponse), - "/nibiru.devgas.v1.Query/FeeSharesByWithdrawer": new(devgas.QueryFeeSharesByWithdrawerResponse), + "/nibiru.devgas.v1.Query/FeeShares": func() proto.Message { return &devgas.QueryFeeSharesResponse{} }, + "/nibiru.devgas.v1.Query/FeeShare": func() proto.Message { return &devgas.QueryFeeShareResponse{} }, + "/nibiru.devgas.v1.Query/Params": func() proto.Message { return &devgas.QueryParamsResponse{} }, + "/nibiru.devgas.v1.Query/FeeSharesByWithdrawer": func() proto.Message { return &devgas.QueryFeeSharesByWithdrawerResponse{} }, } } diff --git a/app/wasmext/stargate_query_test.go b/app/wasmext/stargate_query_test.go index 1b8f981f13..a1e8404aca 100644 --- a/app/wasmext/stargate_query_test.go +++ b/app/wasmext/stargate_query_test.go @@ -75,7 +75,7 @@ func (s *Suite) TestWasmAcceptedStargateQueries() { gotQueryPaths = append(gotQueryPaths, queryPath) // Show that the underlying protobuf name and query paths coincide. - pbQueryResponseTypeUrl := "/" + proto.MessageName(protobufResponse) + pbQueryResponseTypeUrl := "/" + proto.MessageName(protobufResponse()) isExceptionPath := exceptionPaths.Has(pbQueryResponseTypeUrl) splitResponse := strings.Split(pbQueryResponseTypeUrl, "Response") assert.Lenf(t, splitResponse, 2, "typeUrl: %v", diff --git a/app/wasmext/wasm.go b/app/wasmext/wasm.go index 7fc198991b..af1969b6e8 100644 --- a/app/wasmext/wasm.go +++ b/app/wasmext/wasm.go @@ -77,6 +77,7 @@ func (h SDKMessageHandler) handleSdkMessage(ctx sdk.Context, contractAddr sdk.Ad type MsgHandlerArgs struct { Router MessageRouter Ics4Wrapper wasm.ICS4Wrapper + WasmKeeper wasmkeeper.Keeper ChannelKeeper wasm.ChannelKeeper CapabilityKeeper wasm.CapabilityKeeper BankKeeper wasm.Burner @@ -111,7 +112,7 @@ func WasmMessageHandler( encoders := wasmkeeper.DefaultEncoders(args.Unpacker, args.PortSource) return wasmkeeper.NewMessageHandlerChain( NewSDKMessageHandler(args.Cdc, args.Router, encoders), - wasmkeeper.NewIBCRawPacketHandler(args.Ics4Wrapper, args.ChannelKeeper, args.CapabilityKeeper), + wasmkeeper.NewIBCRawPacketHandler(args.Ics4Wrapper, args.WasmKeeper, args.ChannelKeeper, args.CapabilityKeeper), wasmkeeper.NewBurnCoinMessageHandler(args.BankKeeper), ) } diff --git a/go.mod b/go.mod index 9d989be88d..210ebce998 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/NibiruChain/nibiru/v2 go 1.24 require ( - github.com/CosmWasm/wasmd v0.50.0 - github.com/CosmWasm/wasmvm/v2 v2.1.0 + github.com/CosmWasm/wasmd v0.54.2 + github.com/CosmWasm/wasmvm/v2 v2.2.4 github.com/NibiruChain/collections v0.50.0 // Consenus Engine @@ -13,7 +13,7 @@ require ( // Cosmos-SDK and IBC github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.50.11 + github.com/cosmos/cosmos-sdk v0.50.14 github.com/cosmos/ibc-go/v8 v8.4.0 github.com/ethereum/go-ethereum v1.14.13 ) @@ -57,15 +57,15 @@ require ( cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.1 cosmossdk.io/depinject v1.1.0 - cosmossdk.io/log v1.4.1 + cosmossdk.io/log v1.5.0 cosmossdk.io/store v1.1.1 - cosmossdk.io/tools/confix v0.1.1 + cosmossdk.io/tools/confix v0.1.2 cosmossdk.io/x/evidence v0.1.1 cosmossdk.io/x/feegrant v0.1.1 cosmossdk.io/x/tx v0.13.7 - cosmossdk.io/x/upgrade v0.1.3 + cosmossdk.io/x/upgrade v0.1.4 github.com/cosmos/cosmos-db v1.1.1 - github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 github.com/cosmos/rosetta v0.50.11 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc @@ -87,7 +87,7 @@ require ( cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.38.0 // indirect cosmossdk.io/x/circuit v0.1.1 // indirect - cosmossdk.io/x/nft v0.1.0 // indirect + cosmossdk.io/x/nft v0.1.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -105,9 +105,13 @@ require ( github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect + github.com/bytedance/sonic v1.12.3 // indirect + github.com/bytedance/sonic/loader v0.2.0 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.3 // indirect @@ -121,7 +125,8 @@ require ( github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.2.2 // indirect + github.com/cosmos/iavl v1.2.4 // indirect + github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect @@ -197,6 +202,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect @@ -245,6 +251,7 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/urfave/cli/v2 v2.25.7 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect @@ -258,6 +265,7 @@ require ( go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect + golang.org/x/arch v0.3.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.31.0 // indirect golang.org/x/term v0.30.0 // indirect @@ -277,7 +285,8 @@ require ( replace ( cosmossdk.io/store => github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250506085932-446d68f3e818 - github.com/CosmWasm/wasmd => github.com/NibiruChain/wasmd v0.51.0-nibiru + + github.com/CosmWasm/wasmd => github.com/NibiruChain/wasmd v0.54.1-0.20250922081616-415bb8722ad1 github.com/cosmos/cosmos-sdk => github.com/NibiruChain/cosmos-sdk v0.50.11-0.20250922051739-24dfb60727ae github.com/ethereum/go-ethereum => github.com/NibiruChain/go-ethereum v1.14.13-nibiru.3 diff --git a/go.sum b/go.sum index 5f7d551ed7..41a21536c7 100644 --- a/go.sum +++ b/go.sum @@ -613,26 +613,26 @@ cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= -cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= +cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc= cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY= -cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= -cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= +cosmossdk.io/tools/confix v0.1.2 h1:2hoM1oFCNisd0ltSAAZw2i4ponARPmlhuNu3yy0VwI4= +cosmossdk.io/tools/confix v0.1.2/go.mod h1:7XfcbK9sC/KNgVGxgLM0BrFbVcR/+6Dg7MFfpx7duYo= cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= -cosmossdk.io/x/nft v0.1.0 h1:VhcsFiEK33ODN27kxKLa0r/CeFd8laBfbDBwYqCyYCM= -cosmossdk.io/x/nft v0.1.0/go.mod h1:ec4j4QAO4mJZ+45jeYRnW7awLHby1JZANqe1hNZ4S3g= +cosmossdk.io/x/nft v0.1.1 h1:pslAVS8P5NkW080+LWOamInjDcq+v2GSCo+BjN9sxZ8= +cosmossdk.io/x/nft v0.1.1/go.mod h1:Kac6F6y2gsKvoxU+fy8uvxRTi4BIhLOor2zgCNQwVgY= cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= -cosmossdk.io/x/upgrade v0.1.3 h1:q4XpXc6zp0dX6x74uBtfN6+J7ikaQev5Bla6Q0ADLK8= -cosmossdk.io/x/upgrade v0.1.3/go.mod h1:jOdQhnaY5B8CDUoUbed23/Lre0Dk+r6BMQE40iKlVVQ= +cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= +cosmossdk.io/x/upgrade v0.1.4/go.mod h1:9v0Aj+fs97O+Ztw+tG3/tp5JSlrmT7IcFhAebQHmOPo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= @@ -666,8 +666,8 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/CosmWasm/wasmvm/v2 v2.1.0 h1:bleLhNA36hM8iPjFJsNRi9RjrQW6MtXafw2+wVjAWAE= -github.com/CosmWasm/wasmvm/v2 v2.1.0/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= +github.com/CosmWasm/wasmvm/v2 v2.2.4 h1:V3UwXJMA8TNOuQETppDQkaXAevF7gOWLYpKvrThPv7o= +github.com/CosmWasm/wasmvm/v2 v2.2.4/go.mod h1:Aj/rB2KMRM8nAdbWxkO23rnQYb5KsoPuH9ZizSi0sVg= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -692,8 +692,8 @@ github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250506085932-446d68f3e818 h1: github.com/NibiruChain/cosmos-sdk/store v1.1.2-0.20250506085932-446d68f3e818/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.3 h1:vWBieiwll6sjQ4OTagJUXwtjw85Crfk3f7kAPik6BD8= github.com/NibiruChain/go-ethereum v1.14.13-nibiru.3/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY= -github.com/NibiruChain/wasmd v0.51.0-nibiru h1:qXaxYKiWAL67PR7Ug0vN5mD/S9qKJjg/38EHkSb3TPg= -github.com/NibiruChain/wasmd v0.51.0-nibiru/go.mod h1:ImLd+hxD1Pa1Z+8b0A5C9u9Qb8tmLJeiQHNGLscDPkw= +github.com/NibiruChain/wasmd v0.54.1-0.20250922081616-415bb8722ad1 h1:dIF3oJ+5GZoyw0JcwWQx7MKtKgSUaSj6H7DE9TUM7BA= +github.com/NibiruChain/wasmd v0.54.1-0.20250922081616-415bb8722ad1/go.mod h1:MQbaEfwJpyNuiseBx/DB3Fsq1uEc20zReeQ9BmSEkVQ= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -817,8 +817,11 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= -github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.12.3 h1:W2MGa7RCU1QTeYRTPE3+88mVC0yXmsRQRChiyVocVjU= +github.com/bytedance/sonic v1.12.3/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= +github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -838,8 +841,6 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -857,6 +858,10 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.79.0/go.mod h1:gkHQf9xEubaQPEuerBuoinR9P8bf8a05Lq0X6WKy1Oc= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -930,10 +935,12 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= -github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= -github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= -github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= -github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= +github.com/cosmos/iavl v1.2.4 h1:IHUrG8dkyueKEY72y92jajrizbkZKPZbMmG14QzsEkw= +github.com/cosmos/iavl v1.2.4/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= +github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd h1:Lx+/5dZ/nN6qPXP2Ofog6u1fmlkCFA1ElcOconnofEM= +github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd/go.mod h1:JWfpWVKJKiKtd53/KbRoKfxWl8FsT2GPcNezTOk0o5Q= +github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= +github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 h1:QjCi4bJoy9AXLL1e4jqi+4rHYN0gGZAQxf937cdWhw4= github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72/go.mod h1:yiulzyQAZ+Ci802z/kVQqTA3lGiSJOmDpTq7kZxOUNE= github.com/cosmos/ibc-go/v8 v8.4.0 h1:K2PfX0AZ+1XKZytHGEMuSjQXG/MZshPb83RSTQt2+cE= @@ -1513,6 +1520,7 @@ github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -2447,6 +2455,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -3006,6 +3015,7 @@ modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index 84fc0bcdeb..1ef4106025 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -3,7 +3,6 @@ package testapp import ( "encoding/json" "maps" - "testing" "time" "cosmossdk.io/log" @@ -81,7 +80,7 @@ func FirstBlockProposer( // SetDefaultSudoGenesis: Sets the sudo module genesis state to a valid // default. See "DefaultSudoers". func SetDefaultSudoGenesis(gen wasmapp.GenesisState) { - encoding := wasmapp.MakeEncodingConfig(&testing.T{}) + encoding := nibiruapp.MakeEncodingConfig() var sudoGen sudotypes.GenesisState encoding.Codec.MustUnmarshalJSON(gen[sudotypes.ModuleName], &sudoGen) diff --git a/x/evm/evmtest/upgrades.go b/x/evm/evmtest/upgrades.go index c8780eab71..d4eae36d06 100644 --- a/x/evm/evmtest/upgrades.go +++ b/x/evm/evmtest/upgrades.go @@ -22,7 +22,6 @@ func (deps *TestDeps) RunUpgrade(upgrade upgrades.Upgrade) error { &deps.App.PublicKeepers, deps.App.GetIBCKeeper().ClientKeeper, ) - // ---- Run the upgrade handler. ---- var ( @@ -52,7 +51,7 @@ func (deps *TestDeps) RunUpgrade(upgrade upgrades.Upgrade) error { return fmt.Errorf("invalid upgrade.Plan: %w", err) } - fromVm, err = deps.App.UpgradeKeeper.GetModuleVersionMap(deps.Ctx) + fromVm = deps.App.ModuleManager.GetVersionMap() _, err = upgradeHandler( deps.Ctx, diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index b744aaded8..1e88bc7e5b 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -129,7 +129,7 @@ func (s *FuntokenSuite) TestHappyPath() { deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, - sdk.NewCoins(sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420))), + sdk.NewCoins(sdk.NewCoin(funtoken.BankDenom, sdkmath.NewInt(69_420))), )) s.Run("IFunToken.bankBalance()", func() { @@ -160,7 +160,7 @@ func (s *FuntokenSuite) TestHappyPath() { deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(evm.EVMBankDenom, sdkmath.NewInt(69_420)), + BankCoin: sdk.NewCoin(funtoken.BankDenom, sdkmath.NewInt(69_420)), ToEthAddr: eth.EIP55Addr{ Address: deps.Sender.EthAddr, }, @@ -371,7 +371,7 @@ func (s *FuntokenSuite) TestHappyPath() { func (s *FuntokenSuite) TestPrecompileLocalGas() { deps := evmtest.NewTestDeps(s.T().TempDir()) - funtoken := evmtest.CreateFunTokenForBankCoin(deps, evm.EVMBankDenom, &s.Suite) + funtoken := evmtest.CreateFunTokenForBankCoin(deps, "testdenom", &s.Suite) randomAcc := testutil.AccAddress() deployResp, err := evmtest.DeployContract( @@ -380,7 +380,6 @@ func (s *FuntokenSuite) TestPrecompileLocalGas() { ) s.Require().NoError(err) contractAddr := deployResp.ContractAddr - s.Run("Fund sender's wallet", func() { s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, From ab55b2fd3ad271a5a1defa1bd5dc07d0d74bf25c Mon Sep 17 00:00:00 2001 From: expertdicer Date: Tue, 23 Sep 2025 17:40:45 +0700 Subject: [PATCH 72/72] Update genesis test to use new context for initialization --- x/evm/keeper/genesis_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/evm/keeper/genesis_test.go b/x/evm/keeper/genesis_test.go index 021ee07042..f31d00429a 100644 --- a/x/evm/keeper/genesis_test.go +++ b/x/evm/keeper/genesis_test.go @@ -5,6 +5,8 @@ import ( "math/big" "strings" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdkmath "cosmossdk.io/math" "github.com/MakeNowJust/heredoc/v2" sdk "github.com/cosmos/cosmos-sdk/types" @@ -215,7 +217,8 @@ amountToSendC: %s`, s.T().Log("Init genesis from the exported state for modules [auth, bank, evm]") { - deps = evmtest.NewTestDeps(s.T().TempDir()) + newCtx := deps.App.NewContextLegacy(true, tmproto.Header{Height: 0}) + deps.Ctx = newCtx deps.App.AccountKeeper.InitGenesis(deps.Ctx, *authGenesisState) deps.App.BankKeeper.InitGenesis(deps.Ctx, bankGensisState) deps.EvmKeeper.InitGenesis(deps.Ctx, *evmGenesisState)