From 4010d24a3c4b2b14cf2ebb32b5638be7ecdce835 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 4 Aug 2025 13:07:00 +0200 Subject: [PATCH 01/66] feat(app): apply `App Wiring Changes` from v0.53.x --- app/app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/app.go b/app/app.go index 5f2a73e..1495639 100644 --- a/app/app.go +++ b/app/app.go @@ -700,6 +700,7 @@ func New( // NOTE: upgrade module is required to be prioritized app.mm.SetOrderPreBlockers( upgradetypes.ModuleName, + authtypes.ModuleName, ) // During begin block slashing happens after distr.BeginBlocker so that From 20a005d23b439f7bb547cab41fbc36fa826e59b4 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 4 Aug 2025 16:30:53 +0200 Subject: [PATCH 02/66] chore: update cosmos-sdk dependencies --- go.mod | 180 ++++++++++++++----------- go.sum | 408 ++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 343 insertions(+), 245 deletions(-) diff --git a/go.mod b/go.mod index 75459b5..68ef8f0 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,17 @@ module github.com/xrplevm/node/v8 -go 1.22.11 +go 1.23.2 -toolchain go1.22.12 +toolchain go1.24.5 require ( - cosmossdk.io/api v0.7.6 + cosmossdk.io/api v0.9.2 cosmossdk.io/client/v2 v2.0.0-beta.3 cosmossdk.io/core v0.12.0 - cosmossdk.io/errors v1.0.1 - cosmossdk.io/log v1.4.1 - cosmossdk.io/math v1.4.0 - cosmossdk.io/store v1.1.1 + cosmossdk.io/errors v1.0.2 + cosmossdk.io/log v1.6.0 + cosmossdk.io/math v1.5.3 + cosmossdk.io/store v1.1.2 cosmossdk.io/tools/confix v0.1.2 cosmossdk.io/x/evidence v0.1.1 cosmossdk.io/x/feegrant v0.1.1 @@ -31,32 +31,38 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 - github.com/spf13/cast v1.7.1 - github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.5 + github.com/spf13/cast v1.9.2 + github.com/spf13/cobra v1.9.1 + github.com/spf13/pflag v1.0.7 github.com/stretchr/testify v1.10.0 - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a - google.golang.org/grpc v1.70.0 - google.golang.org/protobuf v1.36.4 + golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 + google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a + google.golang.org/grpc v1.72.2 + google.golang.org/protobuf v1.36.6 ) require ( - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.5.2 // indirect - cloud.google.com/go/iam v1.1.9 // indirect - cloud.google.com/go/storage v1.41.0 // indirect - cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/depinject v1.1.0 // indirect + cel.dev/expr v0.20.0 // indirect + cloud.google.com/go v0.116.0 // indirect + cloud.google.com/go/auth v0.13.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect + cloud.google.com/go/compute/metadata v0.6.0 // indirect + cloud.google.com/go/iam v1.2.2 // indirect + cloud.google.com/go/monitoring v1.21.2 // indirect + cloud.google.com/go/storage v1.49.0 // indirect + cosmossdk.io/collections v1.2.1 // indirect + cosmossdk.io/depinject v1.2.1 // indirect + cosmossdk.io/schema v1.1.0 // indirect cosmossdk.io/x/circuit v0.1.1 // indirect - cosmossdk.io/x/tx v0.13.7 // indirect + cosmossdk.io/x/tx v0.14.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect - github.com/DataDog/zstd v1.5.5 // indirect + github.com/DataDog/zstd v1.5.7 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // 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 @@ -65,21 +71,25 @@ require ( 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.8.0 // indirect + github.com/bgentry/speakeasy v0.2.0 // indirect + github.com/bits-and-blooms/bitset v1.22.0 // indirect github.com/btcsuite/btcd v0.24.2 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/btcutil v1.1.6 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect + github.com/bytedance/sonic v1.13.2 // indirect + github.com/bytedance/sonic/loader v0.2.4 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect + github.com/cloudwego/base64x v0.1.5 // indirect + github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/errors v1.12.0 // indirect github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.2 // indirect - github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect + github.com/cockroachdb/pebble v1.1.5 // indirect + github.com/cockroachdb/redact v1.1.6 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect @@ -99,7 +109,7 @@ require ( github.com/danieljoos/wincred v1.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set v1.8.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -109,12 +119,15 @@ require ( github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emicklei/dot v1.6.2 // indirect + github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/envoyproxy/protoc-gen-validate v1.2.1 // 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/fsnotify/fsnotify v1.9.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect - github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/getsentry/sentry-go v0.32.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-jose/go-jose/v4 v4.0.4 // 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 @@ -123,6 +136,7 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.1 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -131,12 +145,12 @@ require ( github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.3 // indirect github.com/google/flatbuffers v1.12.1 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // 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.5 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect + github.com/googleapis/gax-go/v2 v2.14.1 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/goware/urlx v0.3.2 // indirect @@ -144,20 +158,19 @@ require ( github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // 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-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.3 // indirect - github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-metrics v0.5.4 // indirect + github.com/hashicorp/go-plugin v1.6.3 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.7.0 // 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/hashicorp/yamux v0.1.2 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.3.0 // indirect - github.com/huandu/skiplist v1.2.0 // indirect + github.com/huandu/skiplist v1.2.1 // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect @@ -165,17 +178,18 @@ require ( 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.9 // indirect + github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.3 // 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-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mdp/qrterminal/v3 v3.2.1 // 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 @@ -185,28 +199,29 @@ require ( 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/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.20.5 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect + github.com/prometheus/common v0.63.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/tsdb v0.10.0 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rjeczalik/notify v0.9.3 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.11.1 // indirect - github.com/rs/zerolog v1.33.0 // indirect - github.com/sagikazarmark/locafero v0.4.0 // indirect - github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/rs/zerolog v1.34.0 // indirect + github.com/sagikazarmark/locafero v0.7.0 // indirect github.com/sasha-s/go-deadlock v0.3.5 // 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 - github.com/spf13/viper v1.19.0 // indirect + github.com/spf13/afero v1.12.0 // indirect + github.com/spf13/viper v1.20.1 // indirect + github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -220,49 +235,58 @@ require ( github.com/tidwall/wal v1.1.7 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d // indirect + github.com/zeebo/errs v1.4.0 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // 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.49.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.32.0 // indirect - go.opentelemetry.io/otel/metric v1.32.0 // indirect - go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.34.0 // indirect + go.opentelemetry.io/otel/sdk v1.34.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.34.0 // indirect + go.uber.org/mock v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.32.0 // indirect - golang.org/x/net v0.34.0 // indirect - golang.org/x/oauth2 v0.24.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/term v0.28.0 // indirect - golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect - gopkg.in/ini.v1 v1.67.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + golang.org/x/arch v0.15.0 // indirect + golang.org/x/crypto v0.38.0 // indirect + golang.org/x/net v0.40.0 // indirect + golang.org/x/oauth2 v0.26.0 // indirect + golang.org/x/sync v0.14.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/term v0.32.0 // indirect + golang.org/x/text v0.25.0 // indirect + golang.org/x/time v0.8.0 // indirect + google.golang.org/api v0.215.0 // indirect + google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.5.1 // indirect + gotest.tools/v3 v3.5.2 // indirect nhooyr.io/websocket v1.8.10 // indirect - pgregory.net/rapid v1.1.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + pgregory.net/rapid v1.2.0 // indirect + rsc.io/qr v0.2.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) replace ( // need this replace when importing cosmos/rosetta pkg - cosmossdk.io/core => cosmossdk.io/core v0.11.0 + cosmossdk.io/core => cosmossdk.io/core v0.11.3 // need this replace to pick up the store changes (Copy func) in our cosmos-sdk fork cosmossdk.io/store => github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // use Cosmos-SDK fork to enable Ledger functionality - github.com/cosmos/cosmos-sdk => github.com/xrplevm/cosmos-sdk v0.50.13-xrplevm.2 + github.com/cosmos/cosmos-sdk => github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/evmos/go-ethereum v1.10.26-evmos-rc4 // use exrp Evmos fork diff --git a/go.sum b/go.sum index adc9304..1b355b7 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +cel.dev/expr v0.20.0 h1:OunBvVCfvpWlt4dN7zg3FM6TDkzOePe1+foGJ9AXeeI= +cel.dev/expr v0.20.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -32,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= +cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -48,10 +50,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/auth v0.13.0 h1:8Fu8TZy167JkW8Tj3q7dIkr2v4cndv41ouecJx0PAHs= +cloud.google.com/go/auth v0.13.0/go.mod h1:COOjD9gwfKNKz+IIduatIhYJQIc0mG3H102r/EMxX6Q= +cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= +cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -75,8 +77,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= -cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= +cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -114,18 +116,24 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= +cloud.google.com/go/iam v1.2.2 h1:ozUSofHUGf/F4tCNy/mu9tHLTaxZFLOUiKzjcgWHGIA= +cloud.google.com/go/iam v1.2.2/go.mod h1:0Ys8ccaZHdI1dEUilwzqng/6ps2YB6vRsjIe00/+6JY= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/logging v1.12.0 h1:ex1igYcGFd4S/RZWOCU51StlIEuey5bjqwH9ZYjHibk= +cloud.google.com/go/logging v1.12.0/go.mod h1:wwYBt5HlYP1InnrtYI0wtwttpVU1rifnMT7RejksUAM= +cloud.google.com/go/longrunning v0.6.2 h1:xjDfh1pQcWPEvnfjZmwjKQEcHnpz6lHjfy7Fo0MK+hc= +cloud.google.com/go/longrunning v0.6.2/go.mod h1:k/vIs83RN4bE3YCswdXC5PFfWVILjm3hpEUlSko4PiI= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/monitoring v1.21.2 h1:FChwVtClH19E7pJ+e0xUhJPGksctZNVOk2UhMmblmdU= +cloud.google.com/go/monitoring v1.21.2/go.mod h1:hS3pXvaG8KgWTSz+dAdyzPrGUYmi2Q+WFX8g2hqVEZU= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= @@ -176,10 +184,12 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0= -cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= +cloud.google.com/go/storage v1.49.0 h1:zenOPBOWHCnojRd9aJZAyQXBYqkJkdQS42dxL55CIMw= +cloud.google.com/go/storage v1.49.0/go.mod h1:k1eHhhpLvrPjVGfo0mOUPEJ4Y2+a/Hv5PiwehZI9qGU= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/trace v1.11.2 h1:4ZmaBdL8Ng/ajrgKqY5jfvzqMXbrDcBsUGXOT9aqTtI= +cloud.google.com/go/trace v1.11.2/go.mod h1:bn7OwXd4pd5rFuAnTrzBuoZ4ax2XQeG3qNgYmfCy0Io= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= @@ -190,22 +200,24 @@ cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuW cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= -cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.9.2 h1:9i9ptOBdmoIEVEVWLtYYHjxZonlF/aOVODLFaxpmNtg= +cosmossdk.io/api v0.9.2/go.mod h1:CWt31nVohvoPMTlPv+mMNCtC0a7BqRdESjCsstHcTkU= cosmossdk.io/client/v2 v2.0.0-beta.3 h1:+TTuH0DwQYsUq2JFAl3fDZzKq5gQG7nt3dAattkjFDU= cosmossdk.io/client/v2 v2.0.0-beta.3/go.mod h1:CZcL41HpJPOOayTCO28j8weNBQprG+SRiKX39votypo= -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/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/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= -cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= +cosmossdk.io/collections v1.2.1 h1:mAlNMs5vJwkda4TA+k5q/43p24RVAQ/qyDrjANu3BXE= +cosmossdk.io/collections v1.2.1/go.mod h1:PSsEJ/fqny0VPsHLFT6gXDj/2C1tBOTS9eByK0+PBFU= +cosmossdk.io/core v0.11.3 h1:mei+MVDJOwIjIniaKelE3jPDqShCc/F4LkNNHh+4yfo= +cosmossdk.io/core v0.11.3/go.mod h1:9rL4RE1uDt5AJ4Tg55sYyHWXA16VmpHgbe0PbJc6N2Y= +cosmossdk.io/depinject v1.2.1 h1:eD6FxkIjlVaNZT+dXTQuwQTKZrFZ4UrfCq1RKgzyhMw= +cosmossdk.io/depinject v1.2.1/go.mod h1:lqQEycz0H2JXqvOgVwTsjEdMI0plswI7p6KX+MVqFOM= +cosmossdk.io/errors v1.0.2 h1:wcYiJz08HThbWxd/L4jObeLaLySopyyuUFB5w4AGpCo= +cosmossdk.io/errors v1.0.2/go.mod h1:0rjgiHkftRYPj//3DrD6y8hcm40HcPv/dR4R/4efr0k= +cosmossdk.io/log v1.6.0 h1:SJIOmJ059wi1piyRgNRXKXhlDXGqnB5eQwhcZKv2tOk= +cosmossdk.io/log v1.6.0/go.mod h1:5cXXBvfBkR2/BcXmosdCSLXllvgSjphrrDVdfVRmBGM= +cosmossdk.io/math v1.5.3 h1:WH6tu6Z3AUCeHbeOSHg2mt9rnoiUWVWaQ2t6Gkll96U= +cosmossdk.io/math v1.5.3/go.mod h1:uqcZv7vexnhMFJF+6zh9EWdm/+Ylyln34IvPnBauPCQ= +cosmossdk.io/schema v1.1.0 h1:mmpuz3dzouCoyjjcMcA/xHBEmMChN+EHh8EHxHRHhzE= +cosmossdk.io/schema v1.1.0/go.mod h1:Gb7pqO+tpR+jLW5qDcNOSv0KtppYs7881kfzakguhhI= 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= @@ -214,8 +226,8 @@ 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/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= -cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +cosmossdk.io/x/tx v0.14.0 h1:hB3O25kIcyDW/7kMTLMaO8Ripj3yqs5imceVd6c/heA= +cosmossdk.io/x/tx v0.14.0/go.mod h1:Tn30rSRA1PRfdGB3Yz55W4Sn6EIutr9xtMKSHij+9PM= 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= @@ -238,8 +250,16 @@ github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q 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.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= +github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 h1:f2Qw/Ehhimh5uO1fayV0QIW7DShEQqhtUfhYc+cBPlw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0/go.mod h1:2bIszWvQRlJVmJLiuLhukLImRjKPcYdzzsx6darK02A= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 h1:UQ0AhxogsIRZDkElkblfnwjc3IaltCm2HUMvezQaL7s= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1/go.mod h1:jyqM3eLpJ3IbIFDTKVz2rF9T/xWGW0rIriGwnz8l9Tk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.1 h1:oTX4vsorBZo/Zdum6OKPA4o7544hm6smoRv1QjpTwGo= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.1/go.mod h1:0wEl7vrAD8mehJyohS9HZy+WyEOaQO2mJx86Cvh93kM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 h1:8nn+rsCvTq9axyEh382S0PFLBeaFwNsT43IrPWzctRU= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1/go.mod h1:viRWSEhtMZqz1rhwmOVKkWl6SwmVowfL9O2YR5gI2PE= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= @@ -282,6 +302,7 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb 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/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= @@ -307,10 +328,10 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= -github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= +github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4= +github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= @@ -347,11 +368,16 @@ 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.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= -github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= +github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= +github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= +github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -383,6 +409,9 @@ 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.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= +github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +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= @@ -392,21 +421,23 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 h1:Om6kYQYDUk5wWbT0t0q6pvyM49i9XZAv9dDrkDA7gjk= +github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= 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/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= -github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/errors v1.12.0 h1:d7oCs6vuIMUQRVbi6jWWWEJZahLCfJpnJSVobd1/sUo= +github.com/cockroachdb/errors v1.12.0/go.mod h1:SvzfYNNBshAVbZ8wzNc/UPK3w1vf0dKDUP41ucAIf7g= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= -github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= -github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= -github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 h1:ASDL+UJcILMqgNeV5jiqR4j+sTuvQNHdf2chuKj1M5k= +github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506/go.mod h1:Mw7HqKr2kdtu6aYGn3tPmAftiP3QPX63LdK/zcariIo= +github.com/cockroachdb/pebble v1.1.5 h1:5AAWCBWbat0uE0blr8qzufZP5tBjkRyy/jWe1QWLnvw= +github.com/cockroachdb/pebble v1.1.5/go.mod h1:17wO9el1YEigxkP/YtV8NtCivQDgoCyBg5c4VR/eOWo= +github.com/cockroachdb/redact v1.1.6 h1:zXJBwDZ84xJNlHl1rMyCojqyIxv+7YUpQiJLQ7n4314= +github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -464,8 +495,8 @@ github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF 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.2/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/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creachadair/atomicfile v0.3.3 h1:yJlDq8qk9QmD/6ol+jq1X4bcoLNVdYq95+owOnauziE= github.com/creachadair/atomicfile v0.3.3/go.mod h1:X1r9P4wigJlGkYJO1HXZREdkVn+b1yHrsBBMLSj7tak= github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce h1:BFjvg2Oq88/2DOcUFu1ScIwKUn7KJYYvLr6AeuCJD54= @@ -492,11 +523,11 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= 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/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= +github.com/decred/dcrd/crypto/blake256 v1.1.0/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.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= 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/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= @@ -556,7 +587,15 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= +github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= +github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= +github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe h1:CKvjP3CcWckOiwffAARb9qe+t0+VWoVDiicYkQMvZfQ= github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe/go.mod h1:Bm6h8ZkYgVTytHK5vhHOMKw9OHyiumm3b1UbkYIJ/Ug= github.com/evmos/go-ethereum v1.10.26-evmos-rc4 h1:vwDVMScuB2KSu8ze5oWUuxm6v3bMUp6dL3PWvJNJY+I= @@ -579,16 +618,16 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= -github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.32.0 h1:YKs+//QmwE3DcYtfKRH8/KyOOF/I6Qnx7qYGNHCGmCY= +github.com/getsentry/sentry-go v0.32.0/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -601,6 +640,8 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop 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-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= +github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= 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= @@ -638,6 +679,8 @@ github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= @@ -728,8 +771,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -761,8 +804,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -773,8 +816,8 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= +github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -784,8 +827,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q= +github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -829,17 +872,17 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -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-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/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-metrics v0.5.4 h1:8mmPiIJkTPPEbAiV97IxdAGNdRdaWwVap1BU6elejKY= +github.com/hashicorp/go-metrics v0.5.4/go.mod h1:CG5yz4NZ/AI/aQt9Ucm/vdBnbh7fvmv4lxZ350i+QQI= 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.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= -github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0UUrwg= +github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -862,16 +905,15 @@ github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iP 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/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= @@ -880,8 +922,8 @@ github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXei github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= -github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= -github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/huandu/skiplist v1.2.1 h1:dTi93MgjwErA/8idWTzIw4Y1kZsMWx35fmI2c8Rij7w= +github.com/huandu/skiplist v1.2.1/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= @@ -912,8 +954,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= 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.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= -github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= +github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= 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= @@ -929,6 +971,7 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -949,13 +992,16 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +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/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -987,8 +1033,8 @@ github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PN github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= +github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= @@ -1000,8 +1046,9 @@ github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -1020,6 +1067,8 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mdp/qrterminal/v3 v3.2.1 h1:6+yQjiiOsSuXT5n9/m60E54vdgFsw0zhADHhHLrFet4= +github.com/mdp/qrterminal/v3 v3.2.1/go.mod h1:jOTmXvnBsMy5xqLniO0R++Jmjs2sTm9dFSuQ5kpz/SU= 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/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= @@ -1068,8 +1117,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= 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= @@ -1121,8 +1170,8 @@ github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChl github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -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/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -1140,6 +1189,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1150,8 +1201,9 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -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_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= 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= @@ -1168,14 +1220,16 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= +github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= 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.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 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.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= @@ -1195,24 +1249,22 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -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/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= 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.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= -github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= +github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= +github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= 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= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= -github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= -github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= -github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo= +github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= 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= @@ -1239,23 +1291,27 @@ github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIK github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= -github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= +github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= -github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= +github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= 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.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= 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= -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/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= +github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -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/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= +github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= +github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= +github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= 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= @@ -1282,7 +1338,6 @@ 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/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= @@ -1320,6 +1375,7 @@ github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYm github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -1347,8 +1403,8 @@ github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6Ut github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/xrplevm/cosmos-sdk v0.50.13-xrplevm.2 h1:fDXEMuDN1H4z+jKywS4R0zObIP1DKkjVa9ThCmYYSig= -github.com/xrplevm/cosmos-sdk v0.50.13-xrplevm.2/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67FS1nnMrQIjO2daw= +github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 h1:D94e6BQmJlnS51qQqrMcpbJ32PdVkipH1hK7m2bMQAo= +github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1/go.mod h1:7U3+WHZtI44dEOnU46+lDzBb2tFh1QlMvi8Z5JugopI= github.com/xrplevm/evmos/v20 v20.0.0-exrp.7 h1:LhaLbm3HoDWxjeblfbFnWvkIdZpcf3ULhaj9tRsetiA= github.com/xrplevm/evmos/v20 v20.0.0-exrp.7/go.mod h1:QslHUHSn613wH4l2axRfoyUxBu+OjyqwbNUM3XW8QsM= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= @@ -1361,6 +1417,8 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d h1:XQyeLr7N9iY9mi+TGgsBFkj54+j3fdoo8e2u6zrGP5A= github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d/go.mod h1:hoMeDjlNXTNqVwrCk8YDyaBS2g5vFfEX2ezMi4vb6CY= +github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= +github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= @@ -1380,26 +1438,36 @@ 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.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.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= -go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= -go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= -go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= -go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= -go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= -go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= -go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/detectors/gcp v1.34.0 h1:JRxssobiPg23otYU5SbWtQC//snGVIM3Tx6QRzlQBao= +go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQmF0PRsq8w/lMGzdbCSveBHo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= 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.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= +go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= 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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -1410,8 +1478,14 @@ go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= +go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.15.0 h1:QtOrQd0bTUnhNVNndMpLHNWrDmYzZ2KDqSrEymqInZw= +golang.org/x/arch v0.15.0/go.mod h1:JmwW7aLIoRUKgaTzhkiEFxvcEiQGyOg9BMonBJUS7EE= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1434,8 +1508,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= 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= @@ -1451,8 +1525,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH 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-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= +golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= 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= @@ -1550,8 +1624,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= 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= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1577,8 +1651,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= -golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= +golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1594,8 +1668,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.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= @@ -1668,6 +1742,7 @@ golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1707,8 +1782,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 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= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1716,8 +1791,8 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= 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= @@ -1732,16 +1807,16 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1810,8 +1885,8 @@ 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.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= +golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= 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= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1820,8 +1895,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T 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/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.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1877,8 +1950,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.215.0 h1:jdYF4qnyczlEz2ReWIsosNLDuzXyvFHJtI5gcr0J7t0= +google.golang.org/api v0.215.0/go.mod h1:fta3CVtuJYOEdugLNWm6WodzOS8KdFckABwN4I40hzY= 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= @@ -1995,12 +2068,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a h1:OAiGFfOiA0v9MRYsSidp3ubZaBnteRUyn3xB2ZQ5G/E= -google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a/go.mod h1:jehYqy3+AhJU9ve55aNOaSml7wUXjF9x6z2LcCfpAhY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= +google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= +google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2042,8 +2115,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= -google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= +google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= 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= @@ -2061,8 +2134,8 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.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.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM= -google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 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= @@ -2075,8 +2148,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -2097,8 +2168,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2111,14 +2182,17 @@ honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= -pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= -pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= +pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= +rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 28506cb8c0d71a912a04a41d91de89d2ba48c070 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 11 Aug 2025 12:07:44 +0200 Subject: [PATCH 03/66] fix: add latest cosmos-sdk version to go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 68ef8f0..f94642f 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/cometbft/cometbft v0.38.17 github.com/cosmos/cosmos-db v1.1.1 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.50.13 + github.com/cosmos/cosmos-sdk v0.53.4 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 From b6e0c8d3388c80b6f502a48861069463b1573f1e Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 11 Aug 2025 17:14:27 +0200 Subject: [PATCH 04/66] refactor(app): replace evmos with cosmos/evm --- app/ante.go | 34 ++++++++++++--- app/ante_interfaces.go | 29 +++++++++++++ app/app.go | 85 ++++++++++++++++++++----------------- app/export.go | 2 +- app/genesis.go | 4 +- app/precompiles.go | 35 ++++++++------- app/simulation_test.go | 16 ++++--- app/upgrades/v4/upgrades.go | 9 ++-- 8 files changed, 142 insertions(+), 72 deletions(-) create mode 100644 app/ante_interfaces.go diff --git a/app/ante.go b/app/ante.go index 078083b..10b774f 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,17 +1,41 @@ package app import ( + storetypes "cosmossdk.io/store/types" + txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/evmos/evmos/v20/app/ante" - ethante "github.com/evmos/evmos/v20/app/ante/evm" - etherminttypes "github.com/evmos/evmos/v20/types" + "github.com/cosmos/evm/ante" + ethante "github.com/cosmos/evm/ante/evm" + anteinterfaces "github.com/cosmos/evm/ante/interfaces" + etherminttypes "github.com/cosmos/evm/types" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" poaante "github.com/xrplevm/node/v8/x/poa/ante" ) -type AnteHandlerOptions ante.HandlerOptions +type AnteHandlerOptions struct { + Cdc codec.BinaryCodec + AccountKeeper anteinterfaces.AccountKeeper + BankKeeper anteinterfaces.BankKeeper + IBCKeeper *ibckeeper.Keeper + FeeMarketKeeper anteinterfaces.FeeMarketKeeper + EvmKeeper anteinterfaces.EVMKeeper + FeegrantKeeper authante.FeegrantKeeper + ExtensionOptionChecker authante.ExtensionOptionChecker + SignModeHandler *txsigning.HandlerMap + SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error + MaxTxGasWanted uint64 + TxFeeChecker authante.TxFeeChecker + StakingKeeper StakingKeeper + DistributionKeeper DistributionKeeper + ExtraDecorator sdk.AnteDecorator + AuthzDisabledMsgTypes []string +} func NewAnteHandlerOptionsFromApp(app *App, txConfig client.TxConfig, maxGasWanted uint64) *AnteHandlerOptions { return &AnteHandlerOptions{ @@ -26,7 +50,7 @@ func NewAnteHandlerOptionsFromApp(app *App, txConfig client.TxConfig, maxGasWant SignModeHandler: txConfig.SignModeHandler(), SigGasConsumer: ante.SigVerificationGasConsumer, MaxTxGasWanted: maxGasWanted, - TxFeeChecker: ethante.NewDynamicFeeChecker(app.EvmKeeper), + TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), StakingKeeper: app.StakingKeeper, DistributionKeeper: app.DistrKeeper, ExtraDecorator: poaante.NewPoaDecorator(), diff --git a/app/ante_interfaces.go b/app/ante_interfaces.go new file mode 100644 index 0000000..3b91604 --- /dev/null +++ b/app/ante_interfaces.go @@ -0,0 +1,29 @@ +package app + +import ( + "context" + + addresscodec "cosmossdk.io/core/address" + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// BankKeeper defines the exposed interface for using functionality of the bank keeper +// in the context of the AnteHandler utils package. +type BankKeeper interface { + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin +} + +// DistributionKeeper defines the exposed interface for using functionality of the distribution +// keeper in the context of the AnteHandler utils package. +type DistributionKeeper interface { + WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) +} + +// StakingKeeper defines the exposed interface for using functionality of the staking keeper +// in the context of the AnteHandler utils package. +type StakingKeeper interface { + BondDenom(ctx context.Context) (string, error) + ValidatorAddressCodec() addresscodec.Codec + IterateDelegations(ctx context.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) error +} diff --git a/app/app.go b/app/app.go index 1495639..ae6d4b4 100644 --- a/app/app.go +++ b/app/app.go @@ -11,11 +11,18 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/types/msgservice" + distr "github.com/cosmos/cosmos-sdk/x/distribution" + distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" sdkstaking "github.com/cosmos/cosmos-sdk/x/staking" + "github.com/cosmos/evm/encoding" + evmante "github.com/cosmos/evm/evmd/ante" + cosmosevmutils "github.com/cosmos/evm/utils" "github.com/cosmos/gogoproto/proto" ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v8" ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" @@ -24,16 +31,11 @@ import ( ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v8/testing" - "github.com/evmos/evmos/v20/encoding" - "github.com/evmos/evmos/v20/utils" - "github.com/evmos/evmos/v20/x/evm/core/vm" - - "cosmossdk.io/math" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/spf13/cast" + vmmod "github.com/cosmos/evm/x/vm" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "github.com/cosmos/cosmos-sdk/runtime" @@ -101,10 +103,10 @@ 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" + evmostypes "github.com/cosmos/evm/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" - evmostypes "github.com/evmos/evmos/v20/types" ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" @@ -124,28 +126,25 @@ import ( poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" poatypes "github.com/xrplevm/node/v8/x/poa/types" - // "github.com/xrplevm/node/v8/app/ante" - "github.com/evmos/evmos/v20/app/ante" - srvflags "github.com/evmos/evmos/v20/server/flags" + srvflags "github.com/cosmos/evm/server/flags" - "github.com/evmos/evmos/v20/x/erc20" - erc20keeper "github.com/evmos/evmos/v20/x/erc20/keeper" - erc20types "github.com/evmos/evmos/v20/x/erc20/types" - "github.com/evmos/evmos/v20/x/evm" - evmkeeper "github.com/evmos/evmos/v20/x/evm/keeper" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" - "github.com/evmos/evmos/v20/x/feemarket" - feemarketkeeper "github.com/evmos/evmos/v20/x/feemarket/keeper" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" + "github.com/cosmos/evm/x/erc20" + erc20keeper "github.com/cosmos/evm/x/erc20/keeper" + erc20types "github.com/cosmos/evm/x/erc20/types" + "github.com/cosmos/evm/x/feemarket" + feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + evmkeeper "github.com/cosmos/evm/x/vm/keeper" + evmtypes "github.com/cosmos/evm/x/vm/types" // Overriders - "github.com/evmos/evmos/v20/x/ibc/transfer" - ibctransferkeeper "github.com/evmos/evmos/v20/x/ibc/transfer/keeper" - "github.com/evmos/evmos/v20/x/staking" - stakingkeeper "github.com/evmos/evmos/v20/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/x/staking" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/cosmos/evm/x/ibc/transfer" + ibctransferkeeper "github.com/cosmos/evm/x/ibc/transfer/keeper" // Force load evmos app for variable modification - _ "github.com/evmos/evmos/v20/app" + _ "github.com/cosmos/evm/evmd" // Force-load the tracer engines to trigger registration due to Go-Ethereum v1.10.15 changes _ "github.com/ethereum/go-ethereum/eth/tracers/js" _ "github.com/ethereum/go-ethereum/eth/tracers/native" @@ -159,6 +158,8 @@ const ( DisplayDenom = "xrp" // BaseDenom defines to the default denomination used in EVM BaseDenom = "axrp" + // BaseDenomUnit defines the unit of the base denomination + BaseDenomUnit = 18 ) var ( @@ -271,11 +272,12 @@ func New( loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, + evmChainID uint64, invCheckPeriod uint, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *App { - encodingConfig := encoding.MakeConfig() + encodingConfig := encoding.MakeConfig(evmChainID) appCodec := encodingConfig.Codec cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -464,32 +466,30 @@ func New( // Ethermint keepers // Feemarket Keeper - feeMarketSs := app.GetSubspace(feemarkettypes.ModuleName) app.FeeMarketKeeper = feemarketkeeper.NewKeeper( appCodec, authtypes.NewModuleAddress(govtypes.ModuleName), keys[feemarkettypes.StoreKey], tkeys[feemarkettypes.TransientKey], - feeMarketSs, ) // EVM Keeper tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) - evmSs := app.GetSubspace(evmtypes.ModuleName) app.EvmKeeper = evmkeeper.NewKeeper( - appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], + appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], keys, authtypes.NewModuleAddress(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.FeeMarketKeeper, + &app.ConsensusParamsKeeper, // FIX: Temporary solution to solve keeper interdependency while new precompile module // is being developed. &app.Erc20Keeper, - tracer, evmSs, + tracer, ) // ERC20 Keeper app.Erc20Keeper = erc20keeper.NewKeeper( keys[erc20types.StoreKey], appCodec, authtypes.NewModuleAddress(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.EvmKeeper, app.StakingKeeper, - app.AuthzKeeper, &app.TransferKeeper, + &app.TransferKeeper, ) // Create IBC Keeper @@ -512,6 +512,7 @@ func New( app.IBCKeeper.ChannelKeeper, // ICS4Wrapper ) // Create Transfer Keepers + // TODO: Update when migrating to v10 app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, keys[ibctransfertypes.StoreKey], @@ -523,7 +524,6 @@ func New( app.BankKeeper, scopedTransferKeeper, app.Erc20Keeper, // Add ERC20 Keeper for ERC20 transfers - authAddress, ) transferModule := transfer.NewAppModule(app.TransferKeeper) // Create the app.ICAHostKeeper @@ -588,7 +588,9 @@ func New( app.AuthzKeeper, app.TransferKeeper, app.IBCKeeper.ChannelKeeper, + app.EvmKeeper, app.GovKeeper, + app.AppCodec(), ), ) @@ -616,6 +618,7 @@ func New( // create IBC module from top to bottom of stack var transferStack ibcporttypes.IBCModule + // TODO: Update when migrating to v10 transferStack = transfer.NewIBCModule(app.TransferKeeper) transferStack = ratelimit.NewIBCMiddleware(app.RateLimitKeeper, transferStack) transferStack = erc20.NewIBCMiddleware(app.Erc20Keeper, transferStack) @@ -669,9 +672,9 @@ func New( ratelimit.NewAppModule(appCodec, app.RateLimitKeeper), // Ethermint app modules - feemarket.NewAppModule(app.FeeMarketKeeper, feeMarketSs), - evm.NewAppModule(app.EvmKeeper, app.AccountKeeper, evmSs), - erc20.NewAppModule(app.Erc20Keeper, app.AccountKeeper, app.GetSubspace(erc20types.ModuleName)), + feemarket.NewAppModule(app.FeeMarketKeeper), + vmmod.NewAppModule(app.EvmKeeper, app.AccountKeeper, app.AccountKeeper.AddressCodec()), + erc20.NewAppModule(app.Erc20Keeper, app.AccountKeeper), // exrp app modules poa.NewAppModule(appCodec, app.PoaKeeper, app.BankKeeper, app.StakingKeeper, app.AccountKeeper, app.interfaceRegistry), @@ -685,12 +688,14 @@ func New( app.mm, map[string]module.AppModuleBasic{ genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + // TODO: Update when migrating to v10 stakingtypes.ModuleName: staking.AppModuleBasic{AppModuleBasic: &sdkstaking.AppModuleBasic{}}, govtypes.ModuleName: gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, }, ), + // TODO: Update when migrating to v10 ibctransfertypes.ModuleName: transfer.AppModuleBasic{AppModuleBasic: &ibctransfer.AppModuleBasic{}}, }, ) @@ -846,7 +851,7 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { panic(err) } - app.SetAnteHandler(ante.NewAnteHandler(handlerOpts.Options())) + app.SetAnteHandler(evmante.NewAnteHandler(handlerOpts.Options())) } func (app *App) setPostHandler() { @@ -920,12 +925,12 @@ func (app *App) BlockedModuleAccountAddrs() map[string]bool { } blockedPrecompilesHex := evmtypes.AvailableStaticPrecompiles - for _, addr := range vm.PrecompiledAddressesBerlin { + for _, addr := range vm.PrecompiledAddressesPrague{ blockedPrecompilesHex = append(blockedPrecompilesHex, addr.Hex()) } for _, precompile := range blockedPrecompilesHex { - blockedAddrs[utils.EthHexToSDKAddr(precompile).String()] = true + blockedAddrs[cosmosevmutils.Bech32StringFromHexAddress(precompile)] = true } return blockedAddrs diff --git a/app/export.go b/app/export.go index cf91699..02d095d 100644 --- a/app/export.go +++ b/app/export.go @@ -45,7 +45,7 @@ func (app *App) ExportAppStateAndValidators( return servertypes.ExportedApp{}, err } - validators, err := staking.WriteValidators(ctx, app.StakingKeeper.Keeper) + validators, err := staking.WriteValidators(ctx, app.StakingKeeper) if err != nil { return servertypes.ExportedApp{}, err } diff --git a/app/genesis.go b/app/genesis.go index c0182c4..aca8659 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -5,7 +5,7 @@ import ( sdkmath "cosmossdk.io/math" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" ) // GenesisState The genesis state of the blockchain is represented here as a map of raw json @@ -24,7 +24,7 @@ func NewDefaultGenesisState(app *App) GenesisState { var feeMarketState feemarkettypes.GenesisState app.cdc.MustUnmarshalJSON(genState[feemarkettypes.ModuleName], &feeMarketState) feeMarketState.Params.NoBaseFee = true - feeMarketState.Params.BaseFee = sdkmath.NewInt(0) + feeMarketState.Params.BaseFee = sdkmath.LegacyNewDec(0) genState[feemarkettypes.ModuleName] = app.cdc.MustMarshalJSON(&feeMarketState) return genState diff --git a/app/precompiles.go b/app/precompiles.go index c30fc4d..6ce0a30 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -3,24 +3,26 @@ package app import ( "fmt" + "github.com/cosmos/cosmos-sdk/codec" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + bankprecompile "github.com/cosmos/evm/precompiles/bank" + "github.com/cosmos/evm/precompiles/bech32" + distprecompile "github.com/cosmos/evm/precompiles/distribution" + govprecompile "github.com/cosmos/evm/precompiles/gov" + ics20precompile "github.com/cosmos/evm/precompiles/ics20" + "github.com/cosmos/evm/precompiles/p256" + stakingprecompile "github.com/cosmos/evm/precompiles/staking" + erc20Keeper "github.com/cosmos/evm/x/erc20/keeper" + transferkeeper "github.com/cosmos/evm/x/ibc/transfer/keeper" + evmkeeper "github.com/cosmos/evm/x/vm/keeper" channelkeeper "github.com/cosmos/ibc-go/v8/modules/core/04-channel/keeper" "github.com/ethereum/go-ethereum/common" - bankprecompile "github.com/evmos/evmos/v20/precompiles/bank" - "github.com/evmos/evmos/v20/precompiles/bech32" - distprecompile "github.com/evmos/evmos/v20/precompiles/distribution" - govprecompile "github.com/evmos/evmos/v20/precompiles/gov" - ics20precompile "github.com/evmos/evmos/v20/precompiles/ics20" - "github.com/evmos/evmos/v20/precompiles/p256" - stakingprecompile "github.com/evmos/evmos/v20/precompiles/staking" - erc20Keeper "github.com/evmos/evmos/v20/x/erc20/keeper" - "github.com/evmos/evmos/v20/x/evm/core/vm" - transferkeeper "github.com/evmos/evmos/v20/x/ibc/transfer/keeper" - stakingkeeper "github.com/evmos/evmos/v20/x/staking/keeper" + "github.com/ethereum/go-ethereum/core/vm" "golang.org/x/exp/maps" ) @@ -36,7 +38,9 @@ func NewAvailableStaticPrecompiles( authzKeeper authzkeeper.Keeper, transferKeeper transferkeeper.Keeper, channelKeeper channelkeeper.Keeper, + evmKeeper *evmkeeper.Keeper, govKeeper govkeeper.Keeper, + codec codec.Codec, ) map[common.Address]vm.PrecompiledContract { // Clone the mapping from the latest EVM fork. precompiles := maps.Clone(vm.PrecompiledContractsBerlin) @@ -49,7 +53,7 @@ func NewAvailableStaticPrecompiles( panic(fmt.Errorf("failed to instantiate bech32 precompile: %w", err)) } - stakingPrecompile, err := stakingprecompile.NewPrecompile(stakingKeeper, authzKeeper) + stakingPrecompile, err := stakingprecompile.NewPrecompile(stakingKeeper) if err != nil { panic(fmt.Errorf("failed to instantiate staking precompile: %w", err)) } @@ -57,7 +61,7 @@ func NewAvailableStaticPrecompiles( distributionPrecompile, err := distprecompile.NewPrecompile( distributionKeeper, stakingKeeper, - authzKeeper, + evmKeeper, ) if err != nil { panic(fmt.Errorf("failed to instantiate distribution precompile: %w", err)) @@ -66,8 +70,9 @@ func NewAvailableStaticPrecompiles( ibcTransferPrecompile, err := ics20precompile.NewPrecompile( stakingKeeper, transferKeeper, + // TODO: Update when migrating to v10 channelKeeper, - authzKeeper, + evmKeeper, ) if err != nil { panic(fmt.Errorf("failed to instantiate ICS20 precompile: %w", err)) @@ -78,7 +83,7 @@ func NewAvailableStaticPrecompiles( panic(fmt.Errorf("failed to instantiate bank precompile: %w", err)) } - govPrecompile, err := govprecompile.NewPrecompile(govKeeper, authzKeeper) + govPrecompile, err := govprecompile.NewPrecompile(govKeeper, codec) if err != nil { panic(fmt.Errorf("failed to instantiate gov precompile: %w", err)) } diff --git a/app/simulation_test.go b/app/simulation_test.go index 86c03f4..8971446 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/evmos/evmos/v20/crypto/ethsecp256k1" + "github.com/cosmos/evm/crypto/ethsecp256k1" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" @@ -20,16 +20,20 @@ import ( simulationtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" - "github.com/evmos/evmos/v20/app/ante" + evmante "github.com/cosmos/evm/evmd/ante" "github.com/stretchr/testify/require" "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v8/app/ante" ) func init() { simcli.GetSimulatorFlags() } -const SimAppChainID = "simulation_777-1" +const ( + SimAppChainID = "simulation_777-1" + SimAppEVMChainID = 777 +) // NewSimApp disable feemarket on native tx, otherwise the cosmos-sdk simulation tests will fail. func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*app.App, error) { @@ -44,15 +48,17 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap false, map[int64]bool{}, app.DefaultNodeHome, + SimAppEVMChainID, simcli.FlagPeriodValue, appOptions, + baseapp.SetChainID(config.ChainID), ) - handlerOpts := app.NewAnteHandlerOptionsFromApp(bApp, bApp.GetTxConfig(), 0) + handlerOpts := ante.NewAnteHandlerOptionsFromApp(bApp, bApp.GetTxConfig(), 0) if err := handlerOpts.Validate(); err != nil { panic(err) } - bApp.SetAnteHandler(ante.NewAnteHandler(handlerOpts.Options())) + bApp.SetAnteHandler(evmante.NewAnteHandler(handlerOpts.Options())) if err := bApp.LoadLatestVersion(); err != nil { return nil, err diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index a1807f9..d838d73 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -15,10 +15,10 @@ import ( consensusparamskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - erc20keeper "github.com/evmos/evmos/v20/x/erc20/keeper" - erc20types "github.com/evmos/evmos/v20/x/erc20/types" - evmkeeper "github.com/evmos/evmos/v20/x/evm/keeper" - "github.com/evmos/evmos/v20/x/evm/types" + erc20keeper "github.com/cosmos/evm/x/erc20/keeper" + erc20types "github.com/cosmos/evm/x/erc20/types" + evmkeeper "github.com/cosmos/evm/x/vm/keeper" + "github.com/cosmos/evm/x/vm/types" ) const ( @@ -137,6 +137,7 @@ func AssignXrpOwnerAddress(ctx sdk.Context, ek erc20keeper.Keeper, address sdk.A if !found { return errors.New("token pair not found") } + // TODO: Should autofix when replacing with forked cosmos/evm version is installed ek.SetTokenPairOwnerAddress(ctx, tokenPair, address.String()) return nil } From 7c7180e58c9459610e9ac8285745262baf402edf Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 11 Aug 2025 17:14:46 +0200 Subject: [PATCH 05/66] refactor(cmd): replace evmos with cosmos/evm --- cmd/exrpd/cmd/root.go | 12 +- cmd/exrpd/main.go | 3 +- go.sum | 1206 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1214 insertions(+), 7 deletions(-) diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 6f65a53..2817a13 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -38,15 +38,15 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/evmos/evmos/v20/crypto/hd" + "github.com/cosmos/evm/crypto/hd" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" - ethermintclient "github.com/evmos/evmos/v20/client" - ethermintserver "github.com/evmos/evmos/v20/server" - ethermintservercfg "github.com/evmos/evmos/v20/server/config" - ethermintserverflags "github.com/evmos/evmos/v20/server/flags" + ethermintclient "github.com/cosmos/evm/client" + ethermintserver "github.com/cosmos/evm/server" + ethermintservercfg "github.com/cosmos/evm/server/config" + ethermintserverflags "github.com/cosmos/evm/server/flags" "github.com/xrplevm/node/v8/app" ) @@ -65,6 +65,7 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { nil, true, nil, tempDir(app.DefaultNodeHome), 0, + 0, emptyAppOptions{}, ) encodingConfig := sdktestutil.TestEncodingConfig{ @@ -392,6 +393,7 @@ func (a appCreator) appExport( height == -1, // -1: no height provided map[int64]bool{}, homePath, + 0, uint(1), appOpts, ) diff --git a/cmd/exrpd/main.go b/cmd/exrpd/main.go index 3523312..ed909ae 100644 --- a/cmd/exrpd/main.go +++ b/cmd/exrpd/main.go @@ -7,7 +7,6 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - ethermint "github.com/evmos/evmos/v20/types" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" @@ -49,7 +48,7 @@ func registerDenoms() { panic(err) } - if err := sdk.RegisterDenom(app.BaseDenom, math.LegacyNewDecWithPrec(1, ethermint.BaseDenomUnit)); err != nil { + if err := sdk.RegisterDenom(app.BaseDenom, math.LegacyNewDecWithPrec(1, app.BaseDenomUnit)); err != nil { panic(err) } } diff --git a/go.sum b/go.sum index 1b355b7..633a2ee 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,15 @@ cel.dev/expr v0.20.0 h1:OunBvVCfvpWlt4dN7zg3FM6TDkzOePe1+foGJ9AXeeI= cel.dev/expr v0.20.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cloud.google.com/go v0.0.0-20170206221025-ce650573d812/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -19,6 +23,7 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -30,32 +35,100 @@ cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +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.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= +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= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= +cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= +cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= +cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= +cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= +cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= +cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= +cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= +cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= +cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= +cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= +cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= +cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= +cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= +cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= +cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= +cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= +cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= +cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= +cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= +cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= cloud.google.com/go/auth v0.13.0 h1:8Fu8TZy167JkW8Tj3q7dIkr2v4cndv41ouecJx0PAHs= cloud.google.com/go/auth v0.13.0/go.mod h1:COOjD9gwfKNKz+IIduatIhYJQIc0mG3H102r/EMxX6Q= +cloud.google.com/go/auth v0.14.1 h1:AwoJbzUdxA/whv1qj3TLKwh3XX5sikny2fc40wUl+h0= +cloud.google.com/go/auth v0.14.1/go.mod h1:4JHUxlGXisL0AW8kXPtUF6ztuOksyfUQNFjfsOCXkPM= cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= +cloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74z6cBk9Rw6M= +cloud.google.com/go/auth/oauth2adapt v0.2.7/go.mod h1:NTbTTzfvPl1Y3V1nPpOgl2w6d/FjO7NNUQaWSox6ZMc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= +cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= +cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -63,13 +136,45 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= +cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= +cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= +cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= +cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= +cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= +cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= +cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= +cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= +cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= +cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= @@ -77,133 +182,458 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +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/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/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= +cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= +cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= +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= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= +cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= +cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= +cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= +cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= +cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= +cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= +cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= +cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= +cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= +cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= +cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= +cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= +cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= +cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= +cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= +cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= +cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= +cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= +cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +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.2.2 h1:ozUSofHUGf/F4tCNy/mu9tHLTaxZFLOUiKzjcgWHGIA= cloud.google.com/go/iam v1.2.2/go.mod h1:0Ys8ccaZHdI1dEUilwzqng/6ps2YB6vRsjIe00/+6JY= +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= +cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= +cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= +cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= +cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= +cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= +cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= cloud.google.com/go/logging v1.12.0 h1:ex1igYcGFd4S/RZWOCU51StlIEuey5bjqwH9ZYjHibk= cloud.google.com/go/logging v1.12.0/go.mod h1:wwYBt5HlYP1InnrtYI0wtwttpVU1rifnMT7RejksUAM= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/longrunning v0.6.2 h1:xjDfh1pQcWPEvnfjZmwjKQEcHnpz6lHjfy7Fo0MK+hc= cloud.google.com/go/longrunning v0.6.2/go.mod h1:k/vIs83RN4bE3YCswdXC5PFfWVILjm3hpEUlSko4PiI= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= +cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= +cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= +cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= cloud.google.com/go/monitoring v1.21.2 h1:FChwVtClH19E7pJ+e0xUhJPGksctZNVOk2UhMmblmdU= cloud.google.com/go/monitoring v1.21.2/go.mod h1:hS3pXvaG8KgWTSz+dAdyzPrGUYmi2Q+WFX8g2hqVEZU= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= +cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= +cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= +cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= +cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= +cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= +cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= +cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= +cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= +cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= +cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= +cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= +cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= +cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= +cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= +cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= +cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= +cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= +cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= +cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= +cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= +cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= +cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= +cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= +cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= +cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= 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.49.0 h1:zenOPBOWHCnojRd9aJZAyQXBYqkJkdQS42dxL55CIMw= cloud.google.com/go/storage v1.49.0/go.mod h1:k1eHhhpLvrPjVGfo0mOUPEJ4Y2+a/Hv5PiwehZI9qGU= +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= +cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= +cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= cloud.google.com/go/trace v1.11.2 h1:4ZmaBdL8Ng/ajrgKqY5jfvzqMXbrDcBsUGXOT9aqTtI= cloud.google.com/go/trace v1.11.2/go.mod h1:bn7OwXd4pd5rFuAnTrzBuoZ4ax2XQeG3qNgYmfCy0Io= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= +cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= +cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= +cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= +cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= +cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= +cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= +cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +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= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= cosmossdk.io/api v0.9.2 h1:9i9ptOBdmoIEVEVWLtYYHjxZonlF/aOVODLFaxpmNtg= cosmossdk.io/api v0.9.2/go.mod h1:CWt31nVohvoPMTlPv+mMNCtC0a7BqRdESjCsstHcTkU= cosmossdk.io/client/v2 v2.0.0-beta.3 h1:+TTuH0DwQYsUq2JFAl3fDZzKq5gQG7nt3dAattkjFDU= cosmossdk.io/client/v2 v2.0.0-beta.3/go.mod h1:CZcL41HpJPOOayTCO28j8weNBQprG+SRiKX39votypo= +cosmossdk.io/client/v2 v2.0.0-beta.7 h1:O0PfZL5kC3Sp54wZASLNihQ612Gd6duMp11aM9wawNg= +cosmossdk.io/client/v2 v2.0.0-beta.7/go.mod h1:TzwwrzeK+AfSVSESVEIOYO/9xuCh1fPv0HgeocmfVnM= cosmossdk.io/collections v1.2.1 h1:mAlNMs5vJwkda4TA+k5q/43p24RVAQ/qyDrjANu3BXE= cosmossdk.io/collections v1.2.1/go.mod h1:PSsEJ/fqny0VPsHLFT6gXDj/2C1tBOTS9eByK0+PBFU= cosmossdk.io/core v0.11.3 h1:mei+MVDJOwIjIniaKelE3jPDqShCc/F4LkNNHh+4yfo= @@ -218,48 +648,85 @@ cosmossdk.io/math v1.5.3 h1:WH6tu6Z3AUCeHbeOSHg2mt9rnoiUWVWaQ2t6Gkll96U= cosmossdk.io/math v1.5.3/go.mod h1:uqcZv7vexnhMFJF+6zh9EWdm/+Ylyln34IvPnBauPCQ= cosmossdk.io/schema v1.1.0 h1:mmpuz3dzouCoyjjcMcA/xHBEmMChN+EHh8EHxHRHhzE= cosmossdk.io/schema v1.1.0/go.mod h1:Gb7pqO+tpR+jLW5qDcNOSv0KtppYs7881kfzakguhhI= +cosmossdk.io/store v1.1.2 h1:3HOZG8+CuThREKv6cn3WSohAc6yccxO3hLzwK6rBC7o= +cosmossdk.io/store v1.1.2/go.mod h1:60rAGzTHevGm592kFhiUVkNC9w7gooSEn5iUBPzHQ6A= 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/evidence v0.2.0 h1:o72zbmgCM7U0v7z7b0XnMB+NqX0tFamqb1HHkQbhrZ0= +cosmossdk.io/x/evidence v0.2.0/go.mod h1:zx/Xqy+hnGVzkqVuVuvmP9KsO6YCl4SfbAetYi+k+sE= 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/feegrant v0.2.0 h1:oq3WVpoJdxko/XgWmpib63V1mYy9ZQN/1qxDajwGzJ8= +cosmossdk.io/x/feegrant v0.2.0/go.mod h1:9CutZbmhulk/Yo6tQSVD5LG8Lk40ZAQ1OX4d1CODWAE= cosmossdk.io/x/tx v0.14.0 h1:hB3O25kIcyDW/7kMTLMaO8Ripj3yqs5imceVd6c/heA= cosmossdk.io/x/tx v0.14.0/go.mod h1:Tn30rSRA1PRfdGB3Yz55W4Sn6EIutr9xtMKSHij+9PM= 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= +cosmossdk.io/x/upgrade v0.2.0 h1:ZHy0xny3wBCSLomyhE06+UmQHWO8cYlVYjfFAJxjz5g= +cosmossdk.io/x/upgrade v0.2.0/go.mod h1:DXDtkvi//TrFyHWSOaeCZGBoiGAE6Rs8/0ABt2pcDD0= 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.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0/go.mod h1:ceIuwmxDWptoW3eCqSXlnPsZFKh4X+R38dWPv7GS9Vs= +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 v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= +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-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.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= 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/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= 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/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+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= github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190129172621-c8b1d7a94ddf/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 h1:f2Qw/Ehhimh5uO1fayV0QIW7DShEQqhtUfhYc+cBPlw= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0/go.mod h1:2bIszWvQRlJVmJLiuLhukLImRjKPcYdzzsx6darK02A= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 h1:UQ0AhxogsIRZDkElkblfnwjc3IaltCm2HUMvezQaL7s= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1/go.mod h1:jyqM3eLpJ3IbIFDTKVz2rF9T/xWGW0rIriGwnz8l9Tk= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.1 h1:oTX4vsorBZo/Zdum6OKPA4o7544hm6smoRv1QjpTwGo= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.1/go.mod h1:0wEl7vrAD8mehJyohS9HZy+WyEOaQO2mJx86Cvh93kM= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 h1:8nn+rsCvTq9axyEh382S0PFLBeaFwNsT43IrPWzctRU= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1/go.mod h1:viRWSEhtMZqz1rhwmOVKkWl6SwmVowfL9O2YR5gI2PE= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= @@ -270,6 +737,7 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN 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= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -277,14 +745,23 @@ github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDO github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= +github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= 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.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= +github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= +github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20210923152817-c3b6e2f0c527/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -295,10 +772,15 @@ github.com/alitto/pond v1.8.3/go.mod h1:CmvIIGd5jKLasGI3D87qDkQxjzChdKMmnXMg3fG6 github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= +github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= 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= @@ -310,16 +792,32 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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 v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY= +github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/config v1.18.45/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck= github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/route53 v1.30.2/go.mod h1:TQZBt/WaQy+zTHoW++rnl8JBrmZ0VO6EUbVua1+foCA= github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg= github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +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= @@ -330,10 +828,16 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4= github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= @@ -386,22 +890,30 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +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/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= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= 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-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= 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= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= @@ -409,6 +921,7 @@ 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.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/cloudflare/cloudflare-go v0.114.0/go.mod h1:O7fYfFfA6wKqKFn2QIR9lhj7FDw6VQCGOY6hd2TBtd0= github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= @@ -416,31 +929,45 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX 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= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +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-20250121191232-2f005788dc42 h1:Om6kYQYDUk5wWbT0t0q6pvyM49i9XZAv9dDrkDA7gjk= github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= 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/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= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= github.com/cockroachdb/errors v1.12.0 h1:d7oCs6vuIMUQRVbi6jWWWEJZahLCfJpnJSVobd1/sUo= github.com/cockroachdb/errors v1.12.0/go.mod h1:SvzfYNNBshAVbZ8wzNc/UPK3w1vf0dKDUP41ucAIf7g= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 h1:ASDL+UJcILMqgNeV5jiqR4j+sTuvQNHdf2chuKj1M5k= github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506/go.mod h1:Mw7HqKr2kdtu6aYGn3tPmAftiP3QPX63LdK/zcariIo= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/pebble v1.1.5 h1:5AAWCBWbat0uE0blr8qzufZP5tBjkRyy/jWe1QWLnvw= github.com/cockroachdb/pebble v1.1.5/go.mod h1:17wO9el1YEigxkP/YtV8NtCivQDgoCyBg5c4VR/eOWo= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/redact v1.1.6 h1:zXJBwDZ84xJNlHl1rMyCojqyIxv+7YUpQiJLQ7n4314= github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= 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= @@ -450,24 +977,42 @@ github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/bavard v0.1.27 h1:j6hKUrGAy/H+gpNrpLU3I26n1yc+VMGmd6ID5+gAhOs= +github.com/consensys/bavard v0.1.27/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/consensys/gnark-crypto v0.13.0/go.mod h1:wKqwsieaKPThcFkHe0d0zMsbHEUWFmZcG7KBCse210o= +github.com/consensys/gnark-crypto v0.16.0 h1:8Dl4eYmUWK9WmlP1Bj6je688gBRJCJbT8Mw4KoTAawo= +github.com/consensys/gnark-crypto v0.16.0/go.mod h1:Ke3j06ndtPTVvo++PhGNgvm+lgpLvzbcE2MqljY7diU= github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +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.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/evm v0.3.0 h1:eXELtkofmbfuDvbUqpZdRYuXRdpn7tZd6EyXQfBTkzU= +github.com/cosmos/evm v0.3.0/go.mod h1:5CXFoQfFcu5XfouVLcAm6uJnGg01hmmU20OLJ0gJgLY= +github.com/cosmos/evm v0.3.1 h1:Hj0c3wBZJGCZ8dd/5lVC0FLwooboycN2txeZkY9Zn+Q= +github.com/cosmos/evm v0.3.1/go.mod h1:hWf38CXlH6id8GAECtMo7Sg66q04kBlY5HZlPQ19LI8= 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/go-ethereum v1.15.11-cosmos-0 h1:a8C6CAL2ta06CYpI08a3jM1OdjRquYe4ur6JMjL35lQ= +github.com/cosmos/go-ethereum v1.15.11-cosmos-0/go.mod h1:mf8YiHIb0GR4x4TipcvBUPxJLw1mFdmxzoDi11sDRoI= 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= @@ -479,6 +1024,8 @@ github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 h1:AQO9NIAP3RFqvBCj7I github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0/go.mod h1:/ZpKJSW/SKPkFS7jTqkPVn7kOHUUfRNzu+8aS7YOL8o= 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/v10 v10.2.0 h1:wlk/zqz2O0WRyE6UConoR1ci2HSW02P9ywamZCh5/N4= +github.com/cosmos/ibc-go/v10 v10.2.0/go.mod h1:ijeyJ1FDvXoc5w+rlhpMntjhZ558EF02SBFjroW1hPo= github.com/cosmos/ibc-go/v8 v8.7.0 h1:HqhVOkO8bDpClXE81DFQgFjroQcTvtpm0tCS7SQVKVY= github.com/cosmos/ibc-go/v8 v8.7.0/go.mod h1:G2z+Q6ZQSMcyHI2+BVcJdvfOupb09M2h/tgpXOEdY6k= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= @@ -494,15 +1041,28 @@ github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFg github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= 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.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI= +github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= +github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= github.com/creachadair/atomicfile v0.3.3 h1:yJlDq8qk9QmD/6ol+jq1X4bcoLNVdYq95+owOnauziE= github.com/creachadair/atomicfile v0.3.3/go.mod h1:X1r9P4wigJlGkYJO1HXZREdkVn+b1yHrsBBMLSj7tak= +github.com/creachadair/atomicfile v0.3.7 h1:wdg8+Isz07NDMi2yZQAoI1EKB9SxuDhvo5MUii/ZqlM= +github.com/creachadair/atomicfile v0.3.7/go.mod h1:lUrZrE/XjMA7rJY/n8dF7/sSpy6KjtPaxPbrDambthA= github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce h1:BFjvg2Oq88/2DOcUFu1ScIwKUn7KJYYvLr6AeuCJD54= github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce/go.mod h1:okn1ft6DY+qjPmnvYynyq7ufIQKJ2x2qwOCJZecei1k= github.com/creachadair/tomledit v0.0.26 h1:MoDdgHIHZ5PctBVsAZDjxdxreWUEa9ObPKTRkk5PPwA= github.com/creachadair/tomledit v0.0.26/go.mod h1:SJi1OxKpMyR141tq1lzsbPtIg3j8TeVPM/ZftfieD7o= +github.com/creachadair/tomledit v0.0.28 h1:aQJVwcNTzx4SZ/tSbkyGE69w4YQ6Gn+xhHHKtqMZwuw= +github.com/creachadair/tomledit v0.0.28/go.mod h1:pqb2HRQi0lMu6MBiUmTk/0XQ+SmPtq2QbUrG+eiLP5w= 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/crypto-org-chain/cronos/memiavl v0.0.5-0.20240722062311-8384cad72737 h1:9jyWTnpgelwEvTRFkRxDIn/WBuj8pO4WcWYLbh/fi2k= @@ -514,7 +1074,10 @@ github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240722062311-8384cad72737/ github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -522,6 +1085,8 @@ 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 v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +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/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= @@ -533,6 +1098,8 @@ github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= 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/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo= +github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE= 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= @@ -545,7 +1112,9 @@ github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMa github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= 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/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 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= @@ -556,10 +1125,15 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 h1:kgvzE5wLsLa7XKfV85VZl40QXaMCaeFtHpPwJ8fhotY= github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= +github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= +github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -568,6 +1142,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -575,6 +1151,7 @@ github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7j github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= +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= @@ -587,6 +1164,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= +github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= @@ -594,8 +1173,15 @@ github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1 github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +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.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= +github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w= +github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E= +github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= +github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe h1:CKvjP3CcWckOiwffAARb9qe+t0+VWoVDiicYkQMvZfQ= github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe/go.mod h1:Bm6h8ZkYgVTytHK5vhHOMKw9OHyiumm3b1UbkYIJ/Ug= github.com/evmos/go-ethereum v1.10.26-evmos-rc4 h1:vwDVMScuB2KSu8ze5oWUuxm6v3bMUp6dL3PWvJNJY+I= @@ -604,12 +1190,19 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv 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/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= 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= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= +github.com/fjl/gencodec v0.1.0/go.mod h1:Um1dFHPONZGTHog1qD1NaWjXJW/SPB38wPv0O8uZ2fI= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -618,6 +1211,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= @@ -626,8 +1221,10 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/getsentry/sentry-go v0.32.0 h1:YKs+//QmwE3DcYtfKRH8/KyOOF/I6Qnx7qYGNHCGmCY= github.com/getsentry/sentry-go v0.32.0/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -637,11 +1234,18 @@ github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1T github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +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-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= +github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE= +github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= 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= @@ -650,26 +1254,41 @@ github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4F 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= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= 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.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/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= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -677,18 +1296,27 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -699,14 +1327,26 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= +github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -740,6 +1380,7 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -748,7 +1389,14 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e h1:4bw4WeyTYPp0smaXiJZCNnLrvVBqirQVreixayXezGc= +github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= +github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= +github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= +github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= +github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= +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.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= @@ -756,6 +1404,9 @@ github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl76 github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= +github.com/google/flatbuffers v24.3.25+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= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -771,8 +1422,10 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -783,6 +1436,7 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= @@ -796,16 +1450,26 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= +github.com/google/safehtml v0.0.2/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -816,8 +1480,11 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= +github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -827,11 +1494,16 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= 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.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q= github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= 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/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= 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.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= @@ -839,7 +1511,9 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +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/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -848,20 +1522,27 @@ github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad 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= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= 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= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 h1:dygLcbEBA+t/P7ck6a8AkXv6juQ4cK0RHBoh32jxhHM= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2/go.mod h1:Ap9RLCIJVtgQg1/BBgVEfypOAySvvlcpcVQkSzJCH4Y= 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/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= @@ -872,6 +1553,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.8 h1:mshVHx1Fto0/MydBekWan5zUipGq7jO0novchgMmSiY= +github.com/hashicorp/go-getter v1.7.8/go.mod h1:2c6CboOEb9jG6YvmC9xdD+tyAFsrUaJPedwXDGr0TM4= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -893,6 +1576,7 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b 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-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= @@ -914,11 +1598,14 @@ github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8 github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4= github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= +github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -927,11 +1614,17 @@ github.com/huandu/skiplist v1.2.1/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXM github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +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= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -941,6 +1634,7 @@ github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7m github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= @@ -949,9 +1643,13 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= +github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +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.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= @@ -964,6 +1662,7 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -979,22 +1678,39 @@ github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52/go.mod h1:qk1sX/IBgppQNcGCRoj90u6EGC056EBoIc1oEjCWla8= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= +github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= +github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= +github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= +github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= +github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= +github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= +github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +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.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +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/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= @@ -1004,6 +1720,7 @@ github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH6 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= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -1018,10 +1735,14 @@ github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LE github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 h1:LGEzZvf33Y1NhuP5+jI/ni9l1TFS6oYPDilgy74NusM= github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263/go.mod h1:OXgMDuUo2lZ3NpH29ZvMYbk+LxFd5ffDl2Z2mGMuY/I= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= @@ -1030,21 +1751,32 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= +github.com/linxGnu/grocksdb v1.9.8 h1:vOIKv9/+HKiqJAElJIEYv3ZLcihRxyP7Suu/Mu8Dxjs= +github.com/linxGnu/grocksdb v1.9.8/go.mod h1:C3CNe9UYc9hlEM2pC82AqiGS3LRW537u9LFV4wIZuHk= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= @@ -1056,6 +1788,7 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -1064,15 +1797,28 @@ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= 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/mdp/qrterminal/v3 v3.2.1 h1:6+yQjiiOsSuXT5n9/m60E54vdgFsw0zhADHhHLrFet4= github.com/mdp/qrterminal/v3 v3.2.1/go.mod h1:jOTmXvnBsMy5xqLniO0R++Jmjs2sTm9dFSuQ5kpz/SU= +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/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/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= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1080,22 +1826,29 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= 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= @@ -1109,14 +1862,22 @@ github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.19.0/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA= +github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= +github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= @@ -1136,14 +1897,36 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= +github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= +github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= +github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= +github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= +github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= +github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1169,6 +1952,8 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= @@ -1178,30 +1963,57 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssy 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/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +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= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= +github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg= +github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= +github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= +github.com/pion/transport v0.13.1 h1:/UH5yLeQtwm2VZIPjxwnNFxjS4DFhyLfS4GlfuKUzfA= +github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= +github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= 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.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1210,10 +2022,13 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 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.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= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -1221,26 +2036,37 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 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.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= 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= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 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.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/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +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= +github.com/protolambda/zrnt v0.34.1/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= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= @@ -1248,7 +2074,10 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +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.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -1262,12 +2091,16 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR 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= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo= github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k= 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.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/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= @@ -1275,15 +2108,23 @@ github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfP github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= 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= +github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -1291,16 +2132,25 @@ github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIK github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= 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.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -1308,6 +2158,8 @@ github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= github.com/spf13/pflag v1.0.7/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.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= @@ -1324,7 +2176,9 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1338,13 +2192,21 @@ 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/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.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= 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.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= +github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8= +github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= +github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= +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.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= @@ -1355,6 +2217,8 @@ github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vl github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94= github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= @@ -1370,10 +2234,15 @@ github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= @@ -1381,7 +2250,10 @@ github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:s github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= @@ -1392,22 +2264,37 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/cli/v2 v2.10.2 h1:x3p8awjp/2arX+Nl/G2040AZpOCHS/eMJJ1/a+mye4Y= github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= +github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= +github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 h1:D94e6BQmJlnS51qQqrMcpbJ32PdVkipH1hK7m2bMQAo= github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1/go.mod h1:7U3+WHZtI44dEOnU46+lDzBb2tFh1QlMvi8Z5JugopI= github.com/xrplevm/evmos/v20 v20.0.0-exrp.7 h1:LhaLbm3HoDWxjeblfbFnWvkIdZpcf3ULhaj9tRsetiA= github.com/xrplevm/evmos/v20 v20.0.0-exrp.7/go.mod h1:QslHUHSn613wH4l2axRfoyUxBu+OjyqwbNUM3XW8QsM= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1415,18 +2302,29 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d h1:XQyeLr7N9iY9mi+TGgsBFkj54+j3fdoo8e2u6zrGP5A= github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d/go.mod h1:hoMeDjlNXTNqVwrCk8YDyaBS2g5vFfEX2ezMi4vb6CY= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +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.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/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= +go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1442,27 +2340,47 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/detectors/gcp v1.34.0 h1:JRxssobiPg23otYU5SbWtQC//snGVIM3Tx6QRzlQBao= go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQmF0PRsq8w/lMGzdbCSveBHo= +go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= +go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I= go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= +go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= 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.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/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1477,6 +2395,7 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= @@ -1495,6 +2414,7 @@ golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1503,13 +2423,35 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +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.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +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.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= +golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= 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= @@ -1517,6 +2459,7 @@ golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL 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= @@ -1525,11 +2468,23 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH 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-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= 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= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1553,10 +2508,21 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1569,9 +2535,11 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1600,15 +2568,20 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1619,13 +2592,31 @@ golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= 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.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +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.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +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= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1637,6 +2628,7 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1649,10 +2641,18 @@ golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7Lm golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +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.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +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= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1666,10 +2666,18 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.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= @@ -1680,6 +2688,7 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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= @@ -1726,44 +2735,59 @@ golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1771,28 +2795,65 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc 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= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.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.20.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.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= 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= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +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.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +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.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= +golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= +golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= 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= @@ -1804,19 +2865,38 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +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.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= +golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1837,10 +2917,12 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw 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= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/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= @@ -1872,10 +2954,14 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1883,10 +2969,21 @@ 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= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= 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.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= 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= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1898,9 +2995,16 @@ golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNq gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +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= +gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.10.0/go.mod h1:JWIHJ7U20drSQb/aDpTetJzfC1KlAPldJLpkSy88dvQ= +gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= +google.golang.org/api v0.0.0-20170206182103-3d017632ea10/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1923,6 +3027,7 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= @@ -1949,9 +3054,20 @@ google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaE google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +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.215.0 h1:jdYF4qnyczlEz2ReWIsosNLDuzXyvFHJtI5gcr0J7t0= google.golang.org/api v0.215.0/go.mod h1:fta3CVtuJYOEdugLNWm6WodzOS8KdFckABwN4I40hzY= +google.golang.org/api v0.222.0 h1:Aiewy7BKLCuq6cUCeOUrsAlzjXPqBkEeQ/iwGHVQa/4= +google.golang.org/api v0.222.0/go.mod h1:efZia3nXpWELrwMlN5vyQrD4GmJN1Vw0x68Et3r+a9c= 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= @@ -1960,6 +3076,7 @@ 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/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= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2000,8 +3117,10 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2035,6 +3154,7 @@ google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= @@ -2067,13 +3187,44 @@ google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53B google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= +google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +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-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ= google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +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= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2106,6 +3257,7 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= @@ -2115,8 +3267,15 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +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.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= +google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= 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= @@ -2133,13 +3292,18 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +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/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 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= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -2148,6 +3312,9 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -2166,6 +3333,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +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/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= @@ -2179,9 +3347,46 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= +modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= +modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= +modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= +modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= +modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= +modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= +modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +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/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= +nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= +nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= @@ -2191,6 +3396,7 @@ rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= From 8aacd9a67306fea2e65663eacc328759e046153c Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 11 Aug 2025 17:14:55 +0200 Subject: [PATCH 06/66] chore: bump deps --- go.mod | 147 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 83 insertions(+), 64 deletions(-) diff --git a/go.mod b/go.mod index f94642f..60f6b33 100644 --- a/go.mod +++ b/go.mod @@ -1,31 +1,31 @@ module github.com/xrplevm/node/v8 -go 1.23.2 +go 1.23.8 toolchain go1.24.5 require ( cosmossdk.io/api v0.9.2 - cosmossdk.io/client/v2 v2.0.0-beta.3 + cosmossdk.io/client/v2 v2.0.0-beta.7 cosmossdk.io/core v0.12.0 cosmossdk.io/errors v1.0.2 cosmossdk.io/log v1.6.0 cosmossdk.io/math v1.5.3 cosmossdk.io/store v1.1.2 cosmossdk.io/tools/confix v0.1.2 - cosmossdk.io/x/evidence v0.1.1 - cosmossdk.io/x/feegrant v0.1.1 - cosmossdk.io/x/upgrade v0.1.4 + cosmossdk.io/x/evidence v0.2.0 + cosmossdk.io/x/feegrant v0.2.0 + cosmossdk.io/x/upgrade v0.2.0 github.com/cometbft/cometbft v0.38.17 github.com/cosmos/cosmos-db v1.1.1 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.53.4 + github.com/cosmos/evm v0.3.0 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/v8 v8.7.0 - github.com/ethereum/go-ethereum v1.11.5 - github.com/evmos/evmos/v20 v20.0.0 + github.com/ethereum/go-ethereum v1.15.11 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 @@ -37,16 +37,16 @@ require ( github.com/stretchr/testify v1.10.0 golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a - google.golang.org/grpc v1.72.2 + google.golang.org/grpc v1.74.2 google.golang.org/protobuf v1.36.6 ) require ( - cel.dev/expr v0.20.0 // indirect + cel.dev/expr v0.24.0 // indirect cloud.google.com/go v0.116.0 // indirect - cloud.google.com/go/auth v0.13.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect - cloud.google.com/go/compute/metadata v0.6.0 // indirect + cloud.google.com/go/auth v0.14.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect + cloud.google.com/go/compute/metadata v0.7.0 // indirect cloud.google.com/go/iam v1.2.2 // indirect cloud.google.com/go/monitoring v1.21.2 // indirect cloud.google.com/go/storage v1.49.0 // indirect @@ -58,17 +58,18 @@ require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect - github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.7 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // 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.6.0 // indirect + github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/alitto/pond v1.8.3 // indirect - github.com/aws/aws-sdk-go v1.44.224 // indirect + github.com/aws/aws-sdk-go v1.49.0 // 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.2.0 // indirect @@ -83,71 +84,81 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.5 // indirect - github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect + github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.12.0 // indirect - github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect + github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect github.com/cockroachdb/pebble v1.1.5 // indirect github.com/cockroachdb/redact v1.1.6 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect + github.com/consensys/bavard v0.1.27 // indirect + github.com/consensys/gnark-crypto v0.16.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.2 // indirect + github.com/cosmos/ibc-go/v10 v10.2.0 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/cosmos/rosetta v0.50.9 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/atomicfile v0.3.3 // indirect - github.com/creachadair/tomledit v0.0.26 // indirect + github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect + github.com/creachadair/atomicfile v0.3.7 // indirect + github.com/creachadair/tomledit v0.0.28 // indirect github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20240722062311-8384cad72737 // indirect github.com/crypto-org-chain/cronos/store v0.0.5-0.20240722062311-8384cad72737 // indirect github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240722062311-8384cad72737 // indirect - github.com/danieljoos/wincred v1.2.0 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set v1.8.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect - github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/desertbit/timer v1.0.1 // indirect github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect - github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 // indirect + github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emicklei/dot v1.6.2 // indirect github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect - github.com/fatih/color v1.16.0 // indirect + github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect + github.com/ethereum/go-verkle v0.2.2 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/getsentry/sentry-go v0.32.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-jose/go-jose/v4 v4.0.4 // indirect + github.com/go-jose/go-jose/v4 v4.0.5 // 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.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.2.4 // indirect + github.com/golang/glog v1.2.5 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/flatbuffers v1.12.1 // indirect + github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.8 // indirect + github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect + github.com/google/s2a-go v0.1.9 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect github.com/googleapis/gax-go/v2 v2.14.1 // indirect @@ -157,7 +168,7 @@ require ( 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-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.5 // indirect + github.com/hashicorp/go-getter v1.7.8 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.4 // indirect @@ -169,9 +180,9 @@ require ( github.com/hashicorp/yamux v0.1.2 // indirect github.com/hdevalence/ed25519consensus v0.2.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.3.0 // indirect + github.com/holiman/uint256 v1.3.2 // indirect github.com/huandu/skiplist v1.2.1 // indirect - github.com/huin/goupnp v1.0.3 // 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 @@ -184,16 +195,17 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 // indirect github.com/lib/pq v1.10.9 // indirect - github.com/linxGnu/grocksdb v1.9.3 // indirect + github.com/linxGnu/grocksdb v1.9.8 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mdp/qrterminal/v3 v3.2.1 // 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/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 @@ -201,6 +213,11 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect + github.com/pion/dtls/v2 v2.2.7 // indirect + github.com/pion/logging v0.2.2 // indirect + github.com/pion/stun/v2 v2.0.0 // indirect + github.com/pion/transport/v2 v2.2.1 // indirect + github.com/pion/transport/v3 v3.0.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -211,6 +228,7 @@ require ( github.com/prometheus/tsdb v0.10.0 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/rjeczalik/notify v0.9.3 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.11.1 // indirect @@ -224,17 +242,18 @@ require ( github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/supranational/blst v0.3.14 // 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.7.0 // indirect - github.com/tidwall/gjson v1.17.3 // indirect + github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.2.5 // indirect github.com/tidwall/tinylru v1.1.0 // indirect github.com/tidwall/wal v1.1.7 // indirect - github.com/tklauser/go-sysconf v0.3.11 // indirect - github.com/tklauser/numcpus v0.6.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/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect @@ -242,55 +261,55 @@ require ( github.com/zeebo/errs v1.4.0 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect + go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect - go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/metric v1.34.0 // indirect - go.opentelemetry.io/otel/sdk v1.34.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect - go.opentelemetry.io/otel/trace v1.34.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect + go.opentelemetry.io/otel v1.36.0 // indirect + go.opentelemetry.io/otel/metric v1.36.0 // indirect + go.opentelemetry.io/otel/sdk v1.36.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect + go.opentelemetry.io/otel/trace v1.36.0 // indirect go.uber.org/mock v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect golang.org/x/arch v0.15.0 // indirect - golang.org/x/crypto v0.38.0 // indirect - golang.org/x/net v0.40.0 // indirect - golang.org/x/oauth2 v0.26.0 // indirect - golang.org/x/sync v0.14.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/term v0.32.0 // indirect - golang.org/x/text v0.25.0 // indirect - golang.org/x/time v0.8.0 // indirect - google.golang.org/api v0.215.0 // indirect + golang.org/x/crypto v0.40.0 // indirect + golang.org/x/net v0.42.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sync v0.16.0 // indirect + golang.org/x/sys v0.34.0 // indirect + golang.org/x/term v0.33.0 // indirect + golang.org/x/text v0.27.0 // indirect + golang.org/x/time v0.10.0 // indirect + google.golang.org/api v0.222.0 // indirect google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.2 // indirect - nhooyr.io/websocket v1.8.10 // indirect + nhooyr.io/websocket v1.8.11 // indirect pgregory.net/rapid v1.2.0 // indirect rsc.io/qr v0.2.0 // indirect + rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) replace ( // need this replace when importing cosmos/rosetta pkg cosmossdk.io/core => cosmossdk.io/core v0.11.3 - // need this replace to pick up the store changes (Copy func) in our cosmos-sdk fork - cosmossdk.io/store => github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // use Cosmos-SDK fork to enable Ledger functionality github.com/cosmos/cosmos-sdk => github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 + // map cosmos/evm to evmos + // fix cosmos-sdk store path mismatch + github.com/cosmos/cosmos-sdk/store => cosmossdk.io/store v1.1.2 // use Evmos geth fork - github.com/ethereum/go-ethereum => github.com/evmos/go-ethereum v1.10.26-evmos-rc4 - // use exrp Evmos fork - github.com/evmos/evmos/v20 => github.com/xrplevm/evmos/v20 v20.0.0-exrp.7 + github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v1.15.11-cosmos-0 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb From 7a39bab13dcd432e214bf696b0d20af81ca5d6d3 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 11 Aug 2025 17:15:15 +0200 Subject: [PATCH 07/66] refactor(tests, testutil): replace evmos with cosmos/evm dependencies --- tests/integration/network.go | 6 +++--- tests/integration/suite.go | 2 +- tests/upgrade/network.go | 6 +++--- testutil/integration/common/factory/helper.go | 2 +- testutil/integration/common/grpc/feemarket.go | 2 +- testutil/integration/common/grpc/grpc.go | 2 +- testutil/integration/common/keyring/keyring.go | 2 +- testutil/integration/common/network/network.go | 2 +- testutil/integration/exrp/common/clients.go | 12 ++++++------ testutil/integration/exrp/common/config.go | 2 +- testutil/integration/exrp/common/setup.go | 8 +++++--- testutil/integration/exrp/integration/config.go | 2 +- testutil/integration/exrp/integration/keepers.go | 8 ++++---- testutil/integration/exrp/integration/network.go | 2 +- testutil/integration/exrp/integration/setup.go | 12 ++++++------ .../integration/exrp/integration/unit_network.go | 4 ++-- testutil/integration/exrp/upgrade/keepers.go | 8 ++++---- testutil/integration/exrp/upgrade/network.go | 2 +- testutil/integration/exrp/upgrade/unit_network.go | 4 ++-- 19 files changed, 45 insertions(+), 43 deletions(-) diff --git a/tests/integration/network.go b/tests/integration/network.go index 9c912c9..0c4c945 100644 --- a/tests/integration/network.go +++ b/tests/integration/network.go @@ -8,9 +8,9 @@ import ( govtypes "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" - erc20types "github.com/evmos/evmos/v20/x/erc20/types" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" + erc20types "github.com/cosmos/evm/x/erc20/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + evmtypes "github.com/cosmos/evm/x/vm/types" commonnetwork "github.com/xrplevm/node/v8/testutil/integration/common/network" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" diff --git a/tests/integration/suite.go b/tests/integration/suite.go index ab42b6c..4bbc375 100644 --- a/tests/integration/suite.go +++ b/tests/integration/suite.go @@ -3,7 +3,7 @@ package integration import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" + evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/stretchr/testify/suite" "github.com/xrplevm/node/v8/app" factory "github.com/xrplevm/node/v8/testutil/integration/common/factory" diff --git a/tests/upgrade/network.go b/tests/upgrade/network.go index 1632a9b..d567482 100644 --- a/tests/upgrade/network.go +++ b/tests/upgrade/network.go @@ -7,9 +7,9 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - erc20types "github.com/evmos/evmos/v20/x/erc20/types" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" + erc20types "github.com/cosmos/evm/x/erc20/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + evmtypes "github.com/cosmos/evm/x/vm/types" commonnetwork "github.com/xrplevm/node/v8/testutil/integration/common/network" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" upgradenetwork "github.com/xrplevm/node/v8/testutil/integration/exrp/upgrade" diff --git a/testutil/integration/common/factory/helper.go b/testutil/integration/common/factory/helper.go index 6950bd0..fea26c8 100644 --- a/testutil/integration/common/factory/helper.go +++ b/testutil/integration/common/factory/helper.go @@ -89,7 +89,7 @@ func (tf *baseTxFactory) calculateFees(gasPrice *sdkmath.Int, gasLimit uint64) ( return sdktypes.Coins{}, errorsmod.Wrap(err, "failed to get base fee") } price := resp.BaseFee - fees = sdktypes.Coins{{Denom: denom, Amount: price.MulRaw(int64(gasLimit))}} //#nosec G115 + fees = sdktypes.Coins{{Denom: denom, Amount: price.Mul(int64(gasLimit))}} //#nosec G115 } return fees, nil } diff --git a/testutil/integration/common/grpc/feemarket.go b/testutil/integration/common/grpc/feemarket.go index 7fa9ee3..90c3452 100644 --- a/testutil/integration/common/grpc/feemarket.go +++ b/testutil/integration/common/grpc/feemarket.go @@ -3,7 +3,7 @@ package grpc import ( "context" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" ) // GetBaseFee returns the base fee from the feemarket module. diff --git a/testutil/integration/common/grpc/grpc.go b/testutil/integration/common/grpc/grpc.go index 4b37af2..4e1848f 100644 --- a/testutil/integration/common/grpc/grpc.go +++ b/testutil/integration/common/grpc/grpc.go @@ -9,7 +9,7 @@ import ( 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" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" network "github.com/xrplevm/node/v8/testutil/integration/common/network" ) diff --git a/testutil/integration/common/keyring/keyring.go b/testutil/integration/common/keyring/keyring.go index 013e499..bade677 100644 --- a/testutil/integration/common/keyring/keyring.go +++ b/testutil/integration/common/keyring/keyring.go @@ -9,7 +9,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdktypes "github.com/cosmos/cosmos-sdk/types" - utiltx "github.com/evmos/evmos/v20/testutil/tx" + utiltx "github.com/cosmos/evm/testutil/tx" ) type Key struct { diff --git a/testutil/integration/common/network/network.go b/testutil/integration/common/network/network.go index bb98e18..2d2f19d 100644 --- a/testutil/integration/common/network/network.go +++ b/testutil/integration/common/network/network.go @@ -18,8 +18,8 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" ibctesting "github.com/cosmos/ibc-go/v8/testing" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" ) // Network is the interface that wraps the common methods to interact with integration test network. diff --git a/testutil/integration/exrp/common/clients.go b/testutil/integration/exrp/common/clients.go index f6f5614..652d524 100644 --- a/testutil/integration/exrp/common/clients.go +++ b/testutil/integration/exrp/common/clients.go @@ -21,12 +21,12 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - erc20keeper "github.com/evmos/evmos/v20/x/erc20/keeper" - erc20types "github.com/evmos/evmos/v20/x/erc20/types" - evmkeeper "github.com/evmos/evmos/v20/x/evm/keeper" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" - feemarketkeeper "github.com/evmos/evmos/v20/x/feemarket/keeper" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" + erc20keeper "github.com/cosmos/evm/x/erc20/keeper" + erc20types "github.com/cosmos/evm/x/erc20/types" + feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + evmkeeper "github.com/cosmos/evm/x/vm/keeper" + evmtypes "github.com/cosmos/evm/x/vm/types" poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" poatypes "github.com/xrplevm/node/v8/x/poa/types" ) diff --git a/testutil/integration/exrp/common/config.go b/testutil/integration/exrp/common/config.go index 2ac26f5..64fdba1 100644 --- a/testutil/integration/exrp/common/config.go +++ b/testutil/integration/exrp/common/config.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" sdktypes "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - evmostypes "github.com/evmos/evmos/v20/types" + evmostypes "github.com/cosmos/evm/types" "github.com/xrplevm/node/v8/app" ) diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index a27ca6f..2afe7fc 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -19,10 +19,10 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + erc20types "github.com/cosmos/evm/x/erc20/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + evmtypes "github.com/cosmos/evm/x/vm/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - erc20types "github.com/evmos/evmos/v20/x/erc20/types" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" ) // GenSetupFn is the type for the module genesis setup functions @@ -105,6 +105,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp loadLatest := true skipUpgradeHeights := map[int64]bool{} homePath := testNodeHome + evmChainID := uint64(1) invCheckPeriod := uint(5) appOptions := simutils.NewAppOptionsWithFlagHome(homePath) baseAppOptions := append(customBaseAppOptions, baseapp.SetChainID(chainID)) //nolint:gocritic @@ -116,6 +117,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp loadLatest, skipUpgradeHeights, homePath, + evmChainID, invCheckPeriod, appOptions, baseAppOptions..., diff --git a/testutil/integration/exrp/integration/config.go b/testutil/integration/exrp/integration/config.go index 2b2666d..2ca4a9e 100644 --- a/testutil/integration/exrp/integration/config.go +++ b/testutil/integration/exrp/integration/config.go @@ -10,7 +10,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - testtx "github.com/evmos/evmos/v20/testutil/tx" + testtx "github.com/cosmos/evm/testutil/tx" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" ) diff --git a/testutil/integration/exrp/integration/keepers.go b/testutil/integration/exrp/integration/keepers.go index e7ffa89..543b030 100644 --- a/testutil/integration/exrp/integration/keepers.go +++ b/testutil/integration/exrp/integration/keepers.go @@ -9,9 +9,9 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - erc20keeper "github.com/evmos/evmos/v20/x/erc20/keeper" - evmkeeper "github.com/evmos/evmos/v20/x/evm/keeper" - feemarketkeeper "github.com/evmos/evmos/v20/x/feemarket/keeper" + erc20keeper "github.com/cosmos/evm/x/erc20/keeper" + feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" + evmkeeper "github.com/cosmos/evm/x/vm/keeper" poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" ) @@ -32,7 +32,7 @@ func (n *IntegrationNetwork) GovKeeper() *govkeeper.Keeper { } func (n *IntegrationNetwork) StakingKeeper() *stakingkeeper.Keeper { - return n.app.StakingKeeper.Keeper + return n.app.StakingKeeper } func (n *IntegrationNetwork) SlashingKeeper() slashingkeeper.Keeper { diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 7df2118..f8f5cfb 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -14,7 +14,7 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" "github.com/xrplevm/node/v8/app" - "github.com/evmos/evmos/v20/types" + "github.com/cosmos/evm/types" abcitypes "github.com/cometbft/cometbft/abci/types" cmtjson "github.com/cometbft/cometbft/libs/json" diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index 1afb8b6..ab4cab4 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -28,13 +28,13 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/crypto" - evmostypes "github.com/evmos/evmos/v20/types" - epochstypes "github.com/evmos/evmos/v20/x/epochs/types" - erc20types "github.com/evmos/evmos/v20/x/erc20/types" - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" - infltypes "github.com/evmos/evmos/v20/x/inflation/v1/types" + evmostypes "github.com/cosmos/evm/types" + epochstypes "github.com/cosmos/evm/x/epochs/types" + erc20types "github.com/cosmos/evm/x/erc20/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + infltypes "github.com/cosmos/evm/x/inflation/v1/types" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" + evmtypes "github.com/cosmos/evm/x/vm/types" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" "github.com/xrplevm/node/v8/app" diff --git a/testutil/integration/exrp/integration/unit_network.go b/testutil/integration/exrp/integration/unit_network.go index a860e26..50e80ba 100644 --- a/testutil/integration/exrp/integration/unit_network.go +++ b/testutil/integration/exrp/integration/unit_network.go @@ -4,9 +4,9 @@ package exrpintegration import ( sdktypes "github.com/cosmos/cosmos-sdk/types" + inflationtypes "github.com/cosmos/evm/x/inflation/v1/types" + "github.com/cosmos/evm/x/vm/statedb" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v20/x/evm/statedb" - inflationtypes "github.com/evmos/evmos/v20/x/inflation/v1/types" "github.com/xrplevm/node/v8/app" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" ) diff --git a/testutil/integration/exrp/upgrade/keepers.go b/testutil/integration/exrp/upgrade/keepers.go index f5018e8..7224f3b 100644 --- a/testutil/integration/exrp/upgrade/keepers.go +++ b/testutil/integration/exrp/upgrade/keepers.go @@ -9,9 +9,9 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - erc20keeper "github.com/evmos/evmos/v20/x/erc20/keeper" - evmkeeper "github.com/evmos/evmos/v20/x/evm/keeper" - feemarketkeeper "github.com/evmos/evmos/v20/x/feemarket/keeper" + erc20keeper "github.com/cosmos/evm/x/erc20/keeper" + feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" + evmkeeper "github.com/cosmos/evm/x/vm/keeper" poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" ) @@ -32,7 +32,7 @@ func (n *UpgradeIntegrationNetwork) GovKeeper() *govkeeper.Keeper { } func (n *UpgradeIntegrationNetwork) StakingKeeper() *stakingkeeper.Keeper { - return n.app.StakingKeeper.Keeper + return n.app.StakingKeeper } func (n *UpgradeIntegrationNetwork) SlashingKeeper() slashingkeeper.Keeper { diff --git a/testutil/integration/exrp/upgrade/network.go b/testutil/integration/exrp/upgrade/network.go index f5fe1d7..40ab969 100644 --- a/testutil/integration/exrp/upgrade/network.go +++ b/testutil/integration/exrp/upgrade/network.go @@ -25,7 +25,7 @@ import ( txtypes "github.com/cosmos/cosmos-sdk/types/tx" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/evmos/evmos/v20/types" + "github.com/cosmos/evm/types" ) // Network is the interface that wraps the methods to interact with integration test network. diff --git a/testutil/integration/exrp/upgrade/unit_network.go b/testutil/integration/exrp/upgrade/unit_network.go index 02fdbf0..1f5ee47 100644 --- a/testutil/integration/exrp/upgrade/unit_network.go +++ b/testutil/integration/exrp/upgrade/unit_network.go @@ -4,9 +4,9 @@ package exrpupgrade import ( sdktypes "github.com/cosmos/cosmos-sdk/types" + inflationtypes "github.com/cosmos/evm/x/inflation/v1/types" + "github.com/cosmos/evm/x/vm/statedb" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v20/x/evm/statedb" - inflationtypes "github.com/evmos/evmos/v20/x/inflation/v1/types" "github.com/xrplevm/node/v8/app" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" ) From d3cd3b518d76e308051125f0b67383240e871bb7 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 12 Aug 2025 10:35:01 +0200 Subject: [PATCH 08/66] refactor(app): ante handler options --- app/ante.go | 83 ++++++++---------------------------------- app/app.go | 38 ++++++++++++++++--- app/simulation_test.go | 37 +++++++++++++++++-- 3 files changed, 82 insertions(+), 76 deletions(-) diff --git a/app/ante.go b/app/ante.go index 10b774f..0c53a50 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,82 +1,31 @@ package app import ( - storetypes "cosmossdk.io/store/types" - txsigning "cosmossdk.io/x/tx/signing" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/evm/ante" - ethante "github.com/cosmos/evm/ante/evm" - anteinterfaces "github.com/cosmos/evm/ante/interfaces" - etherminttypes "github.com/cosmos/evm/types" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - poaante "github.com/xrplevm/node/v8/x/poa/ante" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + evmante "github.com/cosmos/evm/evmd/ante" ) -type AnteHandlerOptions struct { - Cdc codec.BinaryCodec - AccountKeeper anteinterfaces.AccountKeeper - BankKeeper anteinterfaces.BankKeeper - IBCKeeper *ibckeeper.Keeper - FeeMarketKeeper anteinterfaces.FeeMarketKeeper - EvmKeeper anteinterfaces.EVMKeeper - FeegrantKeeper authante.FeegrantKeeper - ExtensionOptionChecker authante.ExtensionOptionChecker - SignModeHandler *txsigning.HandlerMap - SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error - MaxTxGasWanted uint64 - TxFeeChecker authante.TxFeeChecker +type HandlerOptions struct { + evmante.HandlerOptions StakingKeeper StakingKeeper DistributionKeeper DistributionKeeper ExtraDecorator sdk.AnteDecorator AuthzDisabledMsgTypes []string } -func NewAnteHandlerOptionsFromApp(app *App, txConfig client.TxConfig, maxGasWanted uint64) *AnteHandlerOptions { - return &AnteHandlerOptions{ - Cdc: app.appCodec, - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, - EvmKeeper: app.EvmKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - IBCKeeper: app.IBCKeeper, - FeeMarketKeeper: app.FeeMarketKeeper, - SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: maxGasWanted, - TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), - StakingKeeper: app.StakingKeeper, - DistributionKeeper: app.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), - AuthzDisabledMsgTypes: []string{ - sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), - sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), - }, +// Validate checks if the keepers are defined +func (options *HandlerOptions) Validate() error { + if options.StakingKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "staking keeper is required for AnteHandler") } + if options.DistributionKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "distribution keeper is required for AnteHandler") + } + return options.HandlerOptions.Validate() } -func (aa *AnteHandlerOptions) Validate() error { - return (*ante.HandlerOptions)(aa).Validate() -} - -func (aa *AnteHandlerOptions) Options() ante.HandlerOptions { - return ante.HandlerOptions(*aa) -} - -func (aa *AnteHandlerOptions) WithCodec(cdc codec.BinaryCodec) *AnteHandlerOptions { - aa.Cdc = cdc - return aa -} - -func (aa *AnteHandlerOptions) WithMaxTxGasWanted(maxTxGasWanted uint64) *AnteHandlerOptions { - aa.MaxTxGasWanted = maxTxGasWanted - return aa -} +func NewAnteHandler(options HandlerOptions) sdk.AnteHandler { + return evmante.NewAnteHandler(options.HandlerOptions) +} \ No newline at end of file diff --git a/app/app.go b/app/app.go index ae6d4b4..2ef59ae 100644 --- a/app/app.go +++ b/app/app.go @@ -19,9 +19,11 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - sdkstaking "github.com/cosmos/cosmos-sdk/x/staking" + "github.com/cosmos/evm/ante" + ethante "github.com/cosmos/evm/ante/evm" "github.com/cosmos/evm/encoding" evmante "github.com/cosmos/evm/evmd/ante" + etherminttypes "github.com/cosmos/evm/types" cosmosevmutils "github.com/cosmos/evm/utils" "github.com/cosmos/gogoproto/proto" ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v8" @@ -123,6 +125,7 @@ import ( ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types" "github.com/xrplevm/node/v8/docs" + poaante "github.com/xrplevm/node/v8/x/poa/ante" poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" poatypes "github.com/xrplevm/node/v8/x/poa/types" @@ -351,6 +354,7 @@ func New( app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), + // TODO: Update when replacing with forked cosmos/evm version is installed evmostypes.ProtoAccount, maccPerms, authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), @@ -688,8 +692,7 @@ func New( app.mm, map[string]module.AppModuleBasic{ genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), - // TODO: Update when migrating to v10 - stakingtypes.ModuleName: staking.AppModuleBasic{AppModuleBasic: &sdkstaking.AppModuleBasic{}}, + stakingtypes.ModuleName: staking.AppModuleBasic{}, govtypes.ModuleName: gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, @@ -845,13 +848,38 @@ func New( // use Ethermint's custom AnteHandler func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { - handlerOpts := NewAnteHandlerOptionsFromApp(app, txConfig, maxGasWanted) + handlerOpts := &HandlerOptions{ + HandlerOptions: evmante.HandlerOptions{ + Cdc: app.appCodec, + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, + EvmKeeper: app.EvmKeeper, + FeegrantKeeper: app.FeeGrantKeeper, + // TODO: Update when migrating to v10 + IBCKeeper: app.IBCKeeper, + FeeMarketKeeper: app.FeeMarketKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: maxGasWanted, + TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), + }, + StakingKeeper: app.StakingKeeper, + DistributionKeeper: app.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), + AuthzDisabledMsgTypes: []string{ + sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), + sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), + sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), + sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), + }, + } if err := handlerOpts.Validate(); err != nil { panic(err) } - app.SetAnteHandler(evmante.NewAnteHandler(handlerOpts.Options())) + app.SetAnteHandler(NewAnteHandler(*handlerOpts)) } func (app *App) setPostHandler() { diff --git a/app/simulation_test.go b/app/simulation_test.go index 8971446..fc034e8 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -10,7 +10,12 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/evm/ante" + ethante "github.com/cosmos/evm/ante/evm" "github.com/cosmos/evm/crypto/ethsecp256k1" + etherminttypes "github.com/cosmos/evm/types" + "github.com/xrplevm/node/v8/app" + poaante "github.com/xrplevm/node/v8/x/poa/ante" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" @@ -20,10 +25,9 @@ import ( simulationtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" evmante "github.com/cosmos/evm/evmd/ante" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/app" - "github.com/xrplevm/node/v8/app/ante" ) func init() { @@ -54,11 +58,36 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap baseapp.SetChainID(config.ChainID), ) - handlerOpts := ante.NewAnteHandlerOptionsFromApp(bApp, bApp.GetTxConfig(), 0) + handlerOpts := &app.HandlerOptions{ + HandlerOptions: evmante.HandlerOptions{ + Cdc: bApp.AppCodec(), + AccountKeeper: bApp.AccountKeeper, + BankKeeper: bApp.BankKeeper, + ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, + EvmKeeper: bApp.EvmKeeper, + FeegrantKeeper: bApp.FeeGrantKeeper, + // TODO: Update when migrating to v10 + IBCKeeper: bApp.IBCKeeper, + FeeMarketKeeper: bApp.FeeMarketKeeper, + SignModeHandler: bApp.GetTxConfig().SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: 0, + TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), + }, + StakingKeeper: bApp.StakingKeeper, + DistributionKeeper: bApp.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), + AuthzDisabledMsgTypes: []string{ + sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), + sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), + sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), + sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), + }, + } if err := handlerOpts.Validate(); err != nil { panic(err) } - bApp.SetAnteHandler(evmante.NewAnteHandler(handlerOpts.Options())) + bApp.SetAnteHandler(app.NewAnteHandler(*handlerOpts)) if err := bApp.LoadLatestVersion(); err != nil { return nil, err From 4b4d42c2f723c4329160b5a0a15155b39fc1bc88 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 12 Aug 2025 12:06:02 +0200 Subject: [PATCH 09/66] feat(cmd): create `InitAppConfig` for root command --- cmd/exrpd/cmd/config.go | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/cmd/exrpd/cmd/config.go b/cmd/exrpd/cmd/config.go index 1d619dd..2c0e720 100644 --- a/cmd/exrpd/cmd/config.go +++ b/cmd/exrpd/cmd/config.go @@ -1 +1,51 @@ package cmd + +import ( + cosmosevmserverconfig "github.com/cosmos/evm/server/config" + + serverconfig "github.com/cosmos/cosmos-sdk/server/config" +) + +// InitAppConfig helps to override default appConfig template and configs. +// return "", nil if no custom configuration is required for the application. +func InitAppConfig(denom string, evmChainID uint64) (string, interface{}) { + type CustomAppConfig struct { + serverconfig.Config + + EVM cosmosevmserverconfig.EVMConfig + JSONRPC cosmosevmserverconfig.JSONRPCConfig + TLS cosmosevmserverconfig.TLSConfig + } + + // Optionally allow the chain developer to overwrite the SDK's default + // server config. + srvCfg := serverconfig.DefaultConfig() + // The SDK's default minimum gas price is set to "" (empty value) inside + // app.toml. If left empty by validators, the node will halt on startup. + // However, the chain developer can set a default app.toml value for their + // validators here. + // + // In summary: + // - if you leave srvCfg.MinGasPrices = "", all validators MUST tweak their + // own app.toml config, + // - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their + // own app.toml to override, or use this default value. + // + // In this example application, we set the min gas prices to 0. + srvCfg.MinGasPrices = "0" + denom + + evmCfg := cosmosevmserverconfig.DefaultEVMConfig() + evmCfg.EVMChainID = evmChainID + + customAppConfig := CustomAppConfig{ + Config: *srvCfg, + EVM: *evmCfg, + JSONRPC: *cosmosevmserverconfig.DefaultJSONRPCConfig(), + TLS: *cosmosevmserverconfig.DefaultTLSConfig(), + } + + customAppTemplate := serverconfig.DefaultConfigTemplate + + cosmosevmserverconfig.DefaultEVMConfigTemplate + + return customAppTemplate, customAppConfig +} From 7182f383fc391b76acb1f7654bc755f7aeef3758 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 12 Aug 2025 12:08:23 +0200 Subject: [PATCH 10/66] refactor(cmd): init config app on root command, `DefaultGasAdjustment` and evm chain id configuration --- cmd/exrpd/cmd/root.go | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 2817a13..8aa44a5 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -15,6 +15,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/tx" txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + srvflags "github.com/cosmos/evm/server/flags" + "cosmossdk.io/log" "cosmossdk.io/store/snapshots" snapshottypes "cosmossdk.io/store/snapshots/types" @@ -43,10 +45,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - ethermintclient "github.com/cosmos/evm/client" + evmserver "github.com/cosmos/evm/client" ethermintserver "github.com/cosmos/evm/server" ethermintservercfg "github.com/cosmos/evm/server/config" - ethermintserverflags "github.com/cosmos/evm/server/flags" "github.com/xrplevm/node/v8/app" ) @@ -126,7 +127,8 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { return err } - customAppTemplate, customAppConfig := initAppConfig() + // TODO: retrieve evmChainID from genesis file + customAppTemplate, customAppConfig := InitAppConfig(app.BaseDenom, 0) customTMConfig := initTendermintConfig() return sdkserver.InterceptConfigsPreRunHandler( cmd, customAppTemplate, customAppConfig, customTMConfig, @@ -166,9 +168,6 @@ func initRootCmd( a := appCreator{encodingConfig} rootCmd.AddCommand( - ethermintclient.ValidateChainID( - genutilcli.InitCmd(tempApp.BasicModuleManager, app.DefaultNodeHome), - ), genutilcli.CollectGenTxsCmd( banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, @@ -184,7 +183,6 @@ func initRootCmd( genutilcli.ValidateGenesisCmd(tempApp.BasicModuleManager), AddGenesisAccountCmd(app.DefaultNodeHome), cmtcli.NewCompletionCmd(rootCmd, true), - ethermintclient.NewTestnetCmd(tempApp.BasicModuleManager, banktypes.GenesisBalancesIterator{}), debug.Cmd(), pruning.Cmd(a.newApp, app.DefaultNodeHome), confixcmd.ConfigCommand(), @@ -204,10 +202,10 @@ func initRootCmd( sdkserver.StatusCommand(), queryCommand(), txCommand(), - ethermintclient.KeyCommands(app.DefaultNodeHome), + evmserver.KeyCommands(app.DefaultNodeHome, true), ) - _, err := ethermintserverflags.AddTxFlags(rootCmd) + _, err := srvflags.AddTxFlags(rootCmd) if err != nil { panic(err) } @@ -262,10 +260,8 @@ func txCommand() *cobra.Command { authcmd.GetSimulateCmd(), ) - // DefaultGasAdjustment value to use as default in gas-adjustment flag - flags.DefaultGasAdjustment = ethermintservercfg.DefaultGasAdjustment - cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") + cmd.PersistentFlags().Float64(flags.FlagGasAdjustment, ethermintservercfg.DefaultGasAdjustment, "adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored ") return cmd } @@ -353,6 +349,8 @@ func (a appCreator) newApp( true, skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), + // TODO: Review this + cast.ToUint64(appOpts.Get(flags.FlagChainID)), cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), appOpts, baseapp.SetPruning(pruningOpts), @@ -407,14 +405,6 @@ func (a appCreator) appExport( return app.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } -// initAppConfig helps to override default appConfig template and configs. -// return "", nil if no custom configuration is required for the application. -func initAppConfig() (string, interface{}) { - // The following code snippet is just for reference. - customAppTemplate, customAppConfig := ethermintservercfg.AppConfig(app.BaseDenom) - return customAppTemplate, customAppConfig -} - func tempDir(defaultHome string) string { dir, err := os.MkdirTemp("", ".exrpd-tmp") if err != nil { From 9eeec5155cb74e485b98c80752f6eb3c00a7b7be Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 12 Aug 2025 13:35:57 +0200 Subject: [PATCH 11/66] refactor(testutil): remove evmos testsuite files + adapt evm testsuite --- tests/integration/network.go | 4 +- tests/integration/suite.go | 8 +- tests/upgrade/network.go | 3 +- testutil/integration/common/factory/base.go | 118 ----------------- .../common/factory/distribution.go | 87 ------------- .../integration/common/factory/factory.go | 48 ------- testutil/integration/common/factory/fund.go | 51 -------- testutil/integration/common/factory/helper.go | 119 ------------------ testutil/integration/common/factory/sign.go | 58 --------- .../integration/common/factory/staking.go | 88 ------------- testutil/integration/common/factory/types.go | 24 ---- testutil/integration/common/grpc/account.go | 28 ----- testutil/integration/common/grpc/authz.go | 117 ----------------- testutil/integration/common/grpc/bank.go | 40 ------ .../integration/common/grpc/distribution.go | 56 --------- testutil/integration/common/grpc/feemarket.go | 13 -- testutil/integration/common/grpc/gov.go | 28 ----- testutil/integration/common/grpc/grpc.go | 71 ----------- testutil/integration/common/grpc/staking.go | 68 ---------- .../integration/common/keyring/keyring.go | 119 ------------------ .../integration/common/network/network.go | 58 --------- testutil/integration/exrp/common/config.go | 13 -- .../integration/exrp/integration/clients.go | 82 ++++++++++++ .../integration/exrp/integration/network.go | 15 ++- .../integration/exrp/integration/setup.go | 5 +- .../exrp/integration/unit_network.go | 7 +- .../integration/exrp/upgrade/unit_network.go | 6 +- testutil/integration/exrp/utils/gov.go | 34 ++--- 28 files changed, 126 insertions(+), 1242 deletions(-) delete mode 100644 testutil/integration/common/factory/base.go delete mode 100644 testutil/integration/common/factory/distribution.go delete mode 100644 testutil/integration/common/factory/factory.go delete mode 100644 testutil/integration/common/factory/fund.go delete mode 100644 testutil/integration/common/factory/helper.go delete mode 100644 testutil/integration/common/factory/sign.go delete mode 100644 testutil/integration/common/factory/staking.go delete mode 100644 testutil/integration/common/factory/types.go delete mode 100644 testutil/integration/common/grpc/account.go delete mode 100644 testutil/integration/common/grpc/authz.go delete mode 100644 testutil/integration/common/grpc/bank.go delete mode 100644 testutil/integration/common/grpc/distribution.go delete mode 100644 testutil/integration/common/grpc/feemarket.go delete mode 100644 testutil/integration/common/grpc/gov.go delete mode 100644 testutil/integration/common/grpc/grpc.go delete mode 100644 testutil/integration/common/grpc/staking.go delete mode 100644 testutil/integration/common/keyring/keyring.go delete mode 100644 testutil/integration/common/network/network.go create mode 100644 testutil/integration/exrp/integration/clients.go diff --git a/tests/integration/network.go b/tests/integration/network.go index 0c4c945..401aea3 100644 --- a/tests/integration/network.go +++ b/tests/integration/network.go @@ -11,13 +11,13 @@ import ( erc20types "github.com/cosmos/evm/x/erc20/types" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmtypes "github.com/cosmos/evm/x/vm/types" - commonnetwork "github.com/xrplevm/node/v8/testutil/integration/common/network" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" poatypes "github.com/xrplevm/node/v8/x/poa/types" ) -var _ commonnetwork.Network = (*Network)(nil) +// TODO: Update when migrating to v10 +var _ exrpintegration.Network = (*Network)(nil) type Network struct { exrpintegration.IntegrationNetwork diff --git a/tests/integration/suite.go b/tests/integration/suite.go index 4bbc375..bb8fe7c 100644 --- a/tests/integration/suite.go +++ b/tests/integration/suite.go @@ -3,12 +3,12 @@ package integration import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/evm/testutil/integration/common/factory" + "github.com/cosmos/evm/testutil/integration/os/grpc" + "github.com/cosmos/evm/testutil/integration/os/keyring" evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/stretchr/testify/suite" "github.com/xrplevm/node/v8/app" - factory "github.com/xrplevm/node/v8/testutil/integration/common/factory" - "github.com/xrplevm/node/v8/testutil/integration/common/grpc" - "github.com/xrplevm/node/v8/testutil/integration/common/keyring" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" ) @@ -53,8 +53,10 @@ func (s *TestSuite) SetupTest() { ) s.Require().NotNil(s.network) + // TODO: Update when migrating to v10 grpcHandler := grpc.NewIntegrationHandler(s.network) + // TODO: Update when migrating to v10 s.factory = factory.New(s.network, grpcHandler) s.keyring = kr s.grpcHandler = grpcHandler diff --git a/tests/upgrade/network.go b/tests/upgrade/network.go index d567482..5f8590f 100644 --- a/tests/upgrade/network.go +++ b/tests/upgrade/network.go @@ -10,13 +10,12 @@ import ( erc20types "github.com/cosmos/evm/x/erc20/types" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmtypes "github.com/cosmos/evm/x/vm/types" - commonnetwork "github.com/xrplevm/node/v8/testutil/integration/common/network" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" upgradenetwork "github.com/xrplevm/node/v8/testutil/integration/exrp/upgrade" poatypes "github.com/xrplevm/node/v8/x/poa/types" ) -var _ commonnetwork.Network = (*UpgradeTestNetwork)(nil) +var _ exrpcommon.Network = (*UpgradeTestNetwork)(nil) type UpgradeTestNetwork struct { upgradenetwork.UpgradeIntegrationNetwork diff --git a/testutil/integration/common/factory/base.go b/testutil/integration/common/factory/base.go deleted file mode 100644 index f1832a2..0000000 --- a/testutil/integration/common/factory/base.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package factory - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - abcitypes "github.com/cometbft/cometbft/abci/types" - "github.com/cosmos/cosmos-sdk/client" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdktypes "github.com/cosmos/cosmos-sdk/types" - testutiltypes "github.com/cosmos/cosmos-sdk/types/module/testutil" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - "github.com/xrplevm/node/v8/testutil/integration/common/grpc" - "github.com/xrplevm/node/v8/testutil/integration/common/network" -) - -// BaseTxFactory is the interface that wraps the common methods to build and broadcast transactions -// within cosmos chains -type BaseTxFactory interface { - // BuildCosmosTx builds a Cosmos tx with the provided private key and txArgs - BuildCosmosTx(privKey cryptotypes.PrivKey, txArgs CosmosTxArgs) (authsigning.Tx, error) - // SignCosmosTx signs a Cosmos transaction with the provided - // private key and tx builder - SignCosmosTx(privKey cryptotypes.PrivKey, txBuilder client.TxBuilder) error - // ExecuteCosmosTx builds, signs and broadcasts a Cosmos tx with the provided private key and txArgs - ExecuteCosmosTx(privKey cryptotypes.PrivKey, txArgs CosmosTxArgs) (abcitypes.ExecTxResult, error) - // EncodeTx encodes the provided transaction - EncodeTx(tx sdktypes.Tx) ([]byte, error) - // CommitCosmosTx creates, signs and commits a cosmos tx - // (produces a block with the specified transaction) - CommitCosmosTx(privKey cryptotypes.PrivKey, txArgs CosmosTxArgs) (abcitypes.ExecTxResult, error) -} - -// baseTxFactory is the struct of the basic tx factory -// to build and broadcast transactions. -// This is to simulate the behavior of a real user. -type baseTxFactory struct { - grpcHandler grpc.Handler - network network.Network - ec testutiltypes.TestEncodingConfig -} - -// newBaseTxFactory instantiates a new baseTxFactory -func newBaseTxFactory( - network network.Network, - grpcHandler grpc.Handler, -) BaseTxFactory { - return &baseTxFactory{ - grpcHandler: grpcHandler, - network: network, - ec: network.GetEncodingConfig(), - } -} - -func (tf *baseTxFactory) BuildCosmosTx(privKey cryptotypes.PrivKey, txArgs CosmosTxArgs) (authsigning.Tx, error) { - txBuilder, err := tf.buildTx(privKey, txArgs) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to build tx") - } - return txBuilder.GetTx(), nil -} - -// ExecuteCosmosTx creates, signs and broadcasts a Cosmos transaction -func (tf *baseTxFactory) ExecuteCosmosTx(privKey cryptotypes.PrivKey, txArgs CosmosTxArgs) (abcitypes.ExecTxResult, error) { - signedTx, err := tf.BuildCosmosTx(privKey, txArgs) - if err != nil { - return abcitypes.ExecTxResult{}, errorsmod.Wrap(err, "failed to build tx") - } - - txBytes, err := tf.EncodeTx(signedTx) - if err != nil { - return abcitypes.ExecTxResult{}, errorsmod.Wrap(err, "failed to encode tx") - } - - return tf.network.BroadcastTxSync(txBytes) -} - -// CommitCosmosTx creates and signs a Cosmos transaction, and then includes it in -// a block and commits the state changes on the chain -func (tf *baseTxFactory) CommitCosmosTx(privKey cryptotypes.PrivKey, txArgs CosmosTxArgs) (abcitypes.ExecTxResult, error) { - signedTx, err := tf.BuildCosmosTx(privKey, txArgs) - if err != nil { - return abcitypes.ExecTxResult{}, errorsmod.Wrap(err, "failed to build tx") - } - - txBytes, err := tf.EncodeTx(signedTx) - if err != nil { - return abcitypes.ExecTxResult{}, errorsmod.Wrap(err, "failed to encode tx") - } - - blockRes, err := tf.network.NextBlockWithTxs(txBytes) - if err != nil { - return abcitypes.ExecTxResult{}, errorsmod.Wrap(err, "failed to include the tx in a block") - } - txResCount := len(blockRes.TxResults) - if txResCount != 1 { - return abcitypes.ExecTxResult{}, fmt.Errorf("expected to receive only one tx result, but got %d", txResCount) - } - return *blockRes.TxResults[0], nil -} - -// SignCosmosTx is a helper function that signs a Cosmos transaction -// with the provided private key and transaction builder -func (tf *baseTxFactory) SignCosmosTx(privKey cryptotypes.PrivKey, txBuilder client.TxBuilder) error { - txConfig := tf.ec.TxConfig - signMode, err := authsigning.APISignModeToInternal(txConfig.SignModeHandler().DefaultMode()) - if err != nil { - return errorsmod.Wrap(err, "invalid sign mode") - } - signerData, err := tf.setSignatures(privKey, txBuilder, signMode) - if err != nil { - return errorsmod.Wrap(err, "failed to set tx signatures") - } - - return tf.signWithPrivKey(privKey, txBuilder, signerData, signMode) -} diff --git a/testutil/integration/common/factory/distribution.go b/testutil/integration/common/factory/distribution.go deleted file mode 100644 index ed530a6..0000000 --- a/testutil/integration/common/factory/distribution.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package factory - -import ( - "fmt" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" -) - -type DistributionTxFactory interface { - // SetWithdrawAddress is a method to create and broadcast a MsgSetWithdrawAddress - SetWithdrawAddress(delegatorPriv cryptotypes.PrivKey, withdrawerAddr sdk.AccAddress) error - // WithdrawDelegationRewards is a method to create and broadcast a MsgWithdrawDelegationRewards - WithdrawDelegationRewards(delegatorPriv cryptotypes.PrivKey, validatorAddr string) error - // WithdrawValidatorCommission is a method to create and broadcast a MsgWithdrawValidatorCommission - WithdrawValidatorCommission(validatorPriv cryptotypes.PrivKey) error -} - -type distributionTxFactory struct { - BaseTxFactory -} - -func newDistrTxFactory(bf BaseTxFactory) DistributionTxFactory { - return &distributionTxFactory{bf} -} - -func (tf *distributionTxFactory) SetWithdrawAddress(delegatorPriv cryptotypes.PrivKey, withdrawerAddr sdk.AccAddress) error { - delegatorAccAddr := sdk.AccAddress(delegatorPriv.PubKey().Address()) - - msg := distrtypes.NewMsgSetWithdrawAddress( - delegatorAccAddr, - withdrawerAddr, - ) - - resp, err := tf.ExecuteCosmosTx(delegatorPriv, CosmosTxArgs{ - Msgs: []sdk.Msg{msg}, - }) - - if resp.Code != 0 { - err = fmt.Errorf("received error code %d on SetWithdrawAddress transaction. Logs: %s", resp.Code, resp.Log) - } - - return err -} - -// WithdrawDelegationRewards will withdraw any unclaimed staking rewards for the delegator associated with -// the given private key from the validator. -// The validator address should be in the format `evmosvaloper1...`. -func (tf *distributionTxFactory) WithdrawDelegationRewards(delegatorPriv cryptotypes.PrivKey, validatorAddr string) error { - delegatorAccAddr := sdk.AccAddress(delegatorPriv.PubKey().Address()) - - msg := distrtypes.NewMsgWithdrawDelegatorReward( - delegatorAccAddr.String(), - validatorAddr, - ) - - resp, err := tf.ExecuteCosmosTx(delegatorPriv, CosmosTxArgs{ - Msgs: []sdk.Msg{msg}, - }) - - if resp.Code != 0 { - err = fmt.Errorf("received error code %d on WithdrawDelegationRewards transaction. Logs: %s", resp.Code, resp.Log) - } - - return err -} - -func (tf *distributionTxFactory) WithdrawValidatorCommission(validatorPriv cryptotypes.PrivKey) error { - validatorAddr := sdk.ValAddress(validatorPriv.PubKey().Address()) - - msg := distrtypes.NewMsgWithdrawValidatorCommission( - validatorAddr.String(), - ) - - resp, err := tf.ExecuteCosmosTx(validatorPriv, CosmosTxArgs{ - Msgs: []sdk.Msg{msg}, - }) - - if resp.Code != 0 { - err = fmt.Errorf("received error code %d on WithdrawValidatorCommission transaction. Logs: %s", resp.Code, resp.Log) - } - - return err -} diff --git a/testutil/integration/common/factory/factory.go b/testutil/integration/common/factory/factory.go deleted file mode 100644 index 84b4b37..0000000 --- a/testutil/integration/common/factory/factory.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package factory - -import ( - "github.com/xrplevm/node/v8/testutil/integration/common/grpc" - "github.com/xrplevm/node/v8/testutil/integration/common/network" -) - -const ( - GasAdjustment = float64(1.7) -) - -// CoreTxFactory is the interface that wraps the methods -// to build and broadcast cosmos transactions, and also -// includes module-specific transactions -type CoreTxFactory interface { - BaseTxFactory - DistributionTxFactory - StakingTxFactory - FundTxFactory -} - -var _ CoreTxFactory = (*IntegrationTxFactory)(nil) - -// IntegrationTxFactory is a helper struct to build and broadcast transactions -// to the network on integration tests. This is to simulate the behavior of a real user. -type IntegrationTxFactory struct { - BaseTxFactory - DistributionTxFactory - StakingTxFactory - FundTxFactory -} - -// New creates a new IntegrationTxFactory instance -func New( - network network.Network, - grpcHandler grpc.Handler, -) CoreTxFactory { - bf := newBaseTxFactory(network, grpcHandler) - return &IntegrationTxFactory{ - bf, - newDistrTxFactory(bf), - newStakingTxFactory(bf), - newFundTxFactory(bf), - } -} diff --git a/testutil/integration/common/factory/fund.go b/testutil/integration/common/factory/fund.go deleted file mode 100644 index 448a724..0000000 --- a/testutil/integration/common/factory/fund.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package factory - -import ( - "fmt" - - sdktypes "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/xrplevm/node/v8/testutil/integration/common/keyring" -) - -// FundTxFactory is the interface that wraps the common methods to fund accounts -// via a bank send transaction -type FundTxFactory interface { - // FundAccount funds the given account with the given amount. - FundAccount(sender keyring.Key, receiver sdktypes.AccAddress, amount sdktypes.Coins) error -} - -// baseTxFactory is the struct of the basic tx factory -// to build and broadcast transactions. -// This is to simulate the behavior of a real user. -type fundTxFactory struct { - BaseTxFactory -} - -// newBaseTxFactory instantiates a new baseTxFactory -func newFundTxFactory(bf BaseTxFactory) FundTxFactory { - return &fundTxFactory{bf} -} - -// FundAccount funds the given account with the given amount of coins. -func (tf *fundTxFactory) FundAccount(sender keyring.Key, receiver sdktypes.AccAddress, coins sdktypes.Coins) error { - bankmsg := banktypes.NewMsgSend( - sender.AccAddr, - receiver, - coins, - ) - txArgs := CosmosTxArgs{Msgs: []sdktypes.Msg{bankmsg}} - txRes, err := tf.ExecuteCosmosTx(sender.Priv, txArgs) - if err != nil { - return err - } - - if txRes.Code != 0 { - return fmt.Errorf("transaction returned non-zero code %d", txRes.Code) - } - - return nil -} diff --git a/testutil/integration/common/factory/helper.go b/testutil/integration/common/factory/helper.go deleted file mode 100644 index fea26c8..0000000 --- a/testutil/integration/common/factory/helper.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package factory - -import ( - "math/big" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdktypes "github.com/cosmos/cosmos-sdk/types" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -// EncodeTx encodes the tx using the txConfig's encoder. -func (tf *baseTxFactory) EncodeTx(tx sdktypes.Tx) ([]byte, error) { - txConfig := tf.ec.TxConfig - txBytes, err := txConfig.TxEncoder()(tx) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to encode tx") - } - return txBytes, nil -} - -// buildTx builds a tx with the provided private key and txArgs -func (tf *baseTxFactory) buildTx(privKey cryptotypes.PrivKey, txArgs CosmosTxArgs) (client.TxBuilder, error) { - txConfig := tf.ec.TxConfig - txBuilder := txConfig.NewTxBuilder() - - if err := txBuilder.SetMsgs(txArgs.Msgs...); err != nil { - return nil, errorsmod.Wrap(err, "failed to set tx msgs") - } - - if txArgs.FeeGranter != nil { - txBuilder.SetFeeGranter(txArgs.FeeGranter) - } - - senderAddress := sdktypes.AccAddress(privKey.PubKey().Address().Bytes()) - - if txArgs.FeeGranter != nil { - txBuilder.SetFeeGranter(txArgs.FeeGranter) - } - - txBuilder.SetFeePayer(senderAddress) - - // need to sign the tx to simulate the tx to get the gas estimation - signMode, err := authsigning.APISignModeToInternal(txConfig.SignModeHandler().DefaultMode()) - if err != nil { - return nil, errorsmod.Wrap(err, "invalid sign mode") - } - signerData, err := tf.setSignatures(privKey, txBuilder, signMode) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to set tx signatures") - } - - gasLimit, err := tf.estimateGas(txArgs, txBuilder) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to estimate gas") - } - txBuilder.SetGasLimit(gasLimit) - - fees := txArgs.Fees - if fees.IsZero() { - fees, err = tf.calculateFees(txArgs.GasPrice, gasLimit) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to calculate fees") - } - } - txBuilder.SetFeeAmount(fees) - - if err := tf.signWithPrivKey(privKey, txBuilder, signerData, signMode); err != nil { - return nil, errorsmod.Wrap(err, "failed to sign Cosmos Tx") - } - - return txBuilder, nil -} - -// calculateFees calculates the fees for the transaction. -func (tf *baseTxFactory) calculateFees(gasPrice *sdkmath.Int, gasLimit uint64) (sdktypes.Coins, error) { - denom := tf.network.GetDenom() - var fees sdktypes.Coins - if gasPrice != nil { - fees = sdktypes.Coins{{Denom: denom, Amount: gasPrice.MulRaw(int64(gasLimit))}} //#nosec G115 - } else { - resp, err := tf.grpcHandler.GetBaseFee() - if err != nil { - return sdktypes.Coins{}, errorsmod.Wrap(err, "failed to get base fee") - } - price := resp.BaseFee - fees = sdktypes.Coins{{Denom: denom, Amount: price.Mul(int64(gasLimit))}} //#nosec G115 - } - return fees, nil -} - -// estimateGas estimates the gas needed for the transaction. -func (tf *baseTxFactory) estimateGas(txArgs CosmosTxArgs, txBuilder client.TxBuilder) (uint64, error) { - txConfig := tf.ec.TxConfig - simulateBytes, err := txConfig.TxEncoder()(txBuilder.GetTx()) - if err != nil { - return 0, errorsmod.Wrap(err, "failed to encode tx") - } - - var gasLimit uint64 - if txArgs.Gas == nil { - simulateRes, err := tf.network.Simulate(simulateBytes) - if err != nil { - return 0, errorsmod.Wrap(err, "failed to simulate tx") - } - - gasAdj := new(big.Float).SetFloat64(GasAdjustment) - gasUsed := new(big.Float).SetUint64(simulateRes.GasInfo.GasUsed) - gasLimit, _ = gasAdj.Mul(gasAdj, gasUsed).Uint64() - } else { - gasLimit = *txArgs.Gas - } - return gasLimit, nil -} diff --git a/testutil/integration/common/factory/sign.go b/testutil/integration/common/factory/sign.go deleted file mode 100644 index 6686dfe..0000000 --- a/testutil/integration/common/factory/sign.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package factory - -import ( - "context" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/client" - cosmostx "github.com/cosmos/cosmos-sdk/client/tx" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdktypes "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -// setSignatures is a helper function that sets the signature for -// the transaction in the tx builder. It returns the signerData to be used -// when signing the transaction (e.g. when calling signWithPrivKey) -func (tf *baseTxFactory) setSignatures(privKey cryptotypes.PrivKey, txBuilder client.TxBuilder, signMode signing.SignMode) (signerData authsigning.SignerData, err error) { - senderAddress := sdktypes.AccAddress(privKey.PubKey().Address().Bytes()) - account, err := tf.grpcHandler.GetAccount(senderAddress.String()) - if err != nil { - return signerData, err - } - sequence := account.GetSequence() - signerData = authsigning.SignerData{ - ChainID: tf.network.GetChainID(), - AccountNumber: account.GetAccountNumber(), - Sequence: sequence, - Address: senderAddress.String(), - PubKey: privKey.PubKey(), - } - - sigsV2 := signing.SignatureV2{ - PubKey: privKey.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: signMode, - Signature: nil, - }, - Sequence: sequence, - } - - return signerData, txBuilder.SetSignatures(sigsV2) -} - -// signWithPrivKey is a helper function that signs a transaction -// with the provided private key -func (tf *baseTxFactory) signWithPrivKey(privKey cryptotypes.PrivKey, txBuilder client.TxBuilder, signerData authsigning.SignerData, signMode signing.SignMode) error { - txConfig := tf.ec.TxConfig - signature, err := cosmostx.SignWithPrivKey(context.TODO(), signMode, signerData, txBuilder, privKey, txConfig, signerData.Sequence) - if err != nil { - return errorsmod.Wrap(err, "failed to sign tx") - } - - return txBuilder.SetSignatures(signature) -} diff --git a/testutil/integration/common/factory/staking.go b/testutil/integration/common/factory/staking.go deleted file mode 100644 index 72799a4..0000000 --- a/testutil/integration/common/factory/staking.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package factory - -import ( - "fmt" - - "cosmossdk.io/math" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -type StakingTxFactory interface { - // Delegate is a method to create and execute a MsgDelegate paying always the same fee amount - // The tx is included in a block and committed in the chain state - Delegate(delegatorPriv cryptotypes.PrivKey, validatorAddr string, amount sdk.Coin) error - // CreateValidator is a method to create and broadcast a MsgCreateValidator - CreateValidator(operatorPriv cryptotypes.PrivKey, pubKey cryptotypes.PubKey, selfDelegation sdk.Coin, description stakingtypes.Description, commission stakingtypes.CommissionRates, minSelfDelegation math.Int) error -} - -type stakingTxFactory struct { - BaseTxFactory -} - -func newStakingTxFactory(bf BaseTxFactory) StakingTxFactory { - return &stakingTxFactory{bf} -} - -// Delegate on behalf of the account associated with the given private key. -// The defined amount will delegated to the specified validator. -// The validator address should be in the format `evmosvaloper1...`. -func (tf *stakingTxFactory) Delegate(delegatorPriv cryptotypes.PrivKey, validatorAddr string, amount sdk.Coin) error { - delegatorAccAddr := sdk.AccAddress(delegatorPriv.PubKey().Address()) - - msgDelegate := stakingtypes.NewMsgDelegate( - delegatorAccAddr.String(), - validatorAddr, - amount, - ) - - // set gas and gas prices to pay the same fees - // every time this function is called - feesToPay := math.NewInt(1e16) - gas := uint64(400_000) - gasPrice := feesToPay.QuoRaw(int64(gas)) //#nosec G115 -- gas will not exceed int64 - - res, err := tf.CommitCosmosTx(delegatorPriv, CosmosTxArgs{ - Msgs: []sdk.Msg{msgDelegate}, - Gas: &gas, - GasPrice: &gasPrice, - }) - - if res.IsErr() { - return fmt.Errorf("tx result with code %d. Logs: %s", res.Code, res.Log) - } - - return err -} - -// CreateValidator executes the transaction to create a validator -// with the parameters specified -func (tf *stakingTxFactory) CreateValidator(operatorPriv cryptotypes.PrivKey, pubKey cryptotypes.PubKey, selfDelegation sdk.Coin, description stakingtypes.Description, commission stakingtypes.CommissionRates, minSelfDelegation math.Int) error { - operatorAccAddr := sdk.ValAddress(operatorPriv.PubKey().Address()) - - msgCreateValidator, err := stakingtypes.NewMsgCreateValidator( - operatorAccAddr.String(), - pubKey, - selfDelegation, - description, - commission, - minSelfDelegation, - ) - if err != nil { - return err - } - - resp, err := tf.ExecuteCosmosTx(operatorPriv, CosmosTxArgs{ - Msgs: []sdk.Msg{msgCreateValidator}, - }) - - if resp.Code != 0 { - err = fmt.Errorf("received error code %d on CreateValidator transaction. Logs: %s", resp.Code, resp.Log) - } - - return err -} diff --git a/testutil/integration/common/factory/types.go b/testutil/integration/common/factory/types.go deleted file mode 100644 index 52b6861..0000000 --- a/testutil/integration/common/factory/types.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package factory - -import ( - sdkmath "cosmossdk.io/math" - sdktypes "github.com/cosmos/cosmos-sdk/types" -) - -// CosmosTxArgs contains the params to create a cosmos tx -type CosmosTxArgs struct { - // ChainID is the chain's id in cosmos format, e.g. 'evmos_9000-1' - ChainID string - // Gas to be used on the tx - Gas *uint64 - // GasPrice to use on tx - GasPrice *sdkmath.Int - // Fees is the fee to be used on the tx (amount and denom) - Fees sdktypes.Coins - // FeeGranter is the account address of the fee granter - FeeGranter sdktypes.AccAddress - // Msgs slice of messages to include on the tx - Msgs []sdktypes.Msg -} diff --git a/testutil/integration/common/grpc/account.go b/testutil/integration/common/grpc/account.go deleted file mode 100644 index b53cce0..0000000 --- a/testutil/integration/common/grpc/account.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package grpc - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// GetAccount returns the account for the given address. -func (gqh *IntegrationHandler) GetAccount(address string) (sdk.AccountI, error) { - authClient := gqh.network.GetAuthClient() - res, err := authClient.Account(context.Background(), &authtypes.QueryAccountRequest{ - Address: address, - }) - if err != nil { - return nil, err - } - - encodingCgf := gqh.network.GetEncodingConfig() - var acc sdk.AccountI - if err = encodingCgf.InterfaceRegistry.UnpackAny(res.Account, &acc); err != nil { - return nil, err - } - return acc, nil -} diff --git a/testutil/integration/common/grpc/authz.go b/testutil/integration/common/grpc/authz.go deleted file mode 100644 index bd60044..0000000 --- a/testutil/integration/common/grpc/authz.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package grpc - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/x/authz" -) - -// GetGrants returns the grants for the given grantee and granter combination. -// -// NOTE: To extract the concrete authorizations, use the GetAuthorizations method. -func (gqh *IntegrationHandler) GetGrants(grantee, granter string) ([]*authz.Grant, error) { - authzClient := gqh.network.GetAuthzClient() - res, err := authzClient.Grants(context.Background(), &authz.QueryGrantsRequest{ - Grantee: grantee, - Granter: granter, - }) - if err != nil { - return nil, err - } - - return res.Grants, nil -} - -// GetGrantsByGrantee returns the grants for the given grantee. -// -// NOTE: To extract the concrete authorizations, use the GetAuthorizationsByGrantee method. -func (gqh *IntegrationHandler) GetGrantsByGrantee(grantee string) ([]*authz.GrantAuthorization, error) { - authzClient := gqh.network.GetAuthzClient() - res, err := authzClient.GranteeGrants(context.Background(), &authz.QueryGranteeGrantsRequest{ - Grantee: grantee, - }) - if err != nil { - return nil, err - } - - return res.Grants, nil -} - -// GetGrantsByGranter returns the grants for the given granter. -// -// NOTE: To extract the concrete authorizations, use the GetAuthorizationsByGranter method. -func (gqh *IntegrationHandler) GetGrantsByGranter(granter string) ([]*authz.GrantAuthorization, error) { - authzClient := gqh.network.GetAuthzClient() - res, err := authzClient.GranterGrants(context.Background(), &authz.QueryGranterGrantsRequest{ - Granter: granter, - }) - if err != nil { - return nil, err - } - - return res.Grants, nil -} - -// GetAuthorizations returns the concrete authorizations for the given grantee and granter combination. -func (gqh *IntegrationHandler) GetAuthorizations(grantee, granter string) ([]authz.Authorization, error) { - encodingCfg := gqh.network.GetEncodingConfig() - - grants, err := gqh.GetGrants(grantee, granter) - if err != nil { - return nil, err - } - - auths := make([]authz.Authorization, 0, len(grants)) - for _, grant := range grants { - var auth authz.Authorization - err := encodingCfg.InterfaceRegistry.UnpackAny(grant.Authorization, &auth) - if err != nil { - return nil, err - } - - auths = append(auths, auth) - } - - return auths, nil -} - -// GetAuthorizationsByGrantee returns the concrete authorizations for the given grantee. -func (gqh *IntegrationHandler) GetAuthorizationsByGrantee(grantee string) ([]authz.Authorization, error) { - grants, err := gqh.GetGrantsByGrantee(grantee) - if err != nil { - return nil, err - } - - return gqh.unpackGrantAuthzs(grants) -} - -// GetAuthorizationsByGranter returns the concrete authorizations for the given granter. -func (gqh *IntegrationHandler) GetAuthorizationsByGranter(granter string) ([]authz.Authorization, error) { - grants, err := gqh.GetGrantsByGranter(granter) - if err != nil { - return nil, err - } - - return gqh.unpackGrantAuthzs(grants) -} - -// unpackGrantAuthzs unpacks the given grant authorization. -func (gqh *IntegrationHandler) unpackGrantAuthzs(grantAuthzs []*authz.GrantAuthorization) ([]authz.Authorization, error) { - encodingCfg := gqh.network.GetEncodingConfig() - - auths := make([]authz.Authorization, 0, len(grantAuthzs)) - for _, grantAuthz := range grantAuthzs { - var auth authz.Authorization - err := encodingCfg.InterfaceRegistry.UnpackAny(grantAuthz.Authorization, &auth) - if err != nil { - return nil, err - } - - auths = append(auths, auth) - } - - return auths, nil -} diff --git a/testutil/integration/common/grpc/bank.go b/testutil/integration/common/grpc/bank.go deleted file mode 100644 index 2d6675e..0000000 --- a/testutil/integration/common/grpc/bank.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package grpc - -import ( - "context" - - sdktypes "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// GetBalance returns the balance for the given address and denom. -func (gqh *IntegrationHandler) GetBalance(address sdktypes.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error) { - bankClient := gqh.network.GetBankClient() - return bankClient.Balance(context.Background(), &banktypes.QueryBalanceRequest{ - Address: address.String(), - Denom: denom, - }) -} - -// GetAllBalances returns all the balances for the given address. -func (gqh *IntegrationHandler) GetAllBalances(address sdktypes.AccAddress) (*banktypes.QueryAllBalancesResponse, error) { - bankClient := gqh.network.GetBankClient() - return bankClient.AllBalances(context.Background(), &banktypes.QueryAllBalancesRequest{ - Address: address.String(), - }) -} - -// GetTotalSupply returns all the balances for the given address. -func (gqh *IntegrationHandler) GetTotalSupply() (*banktypes.QueryTotalSupplyResponse, error) { - bankClient := gqh.network.GetBankClient() - return bankClient.TotalSupply(context.Background(), &banktypes.QueryTotalSupplyRequest{}) -} - -// GetSpendableBalance returns the spendable balance for the given denomination. -func (gqh *IntegrationHandler) GetSpendableBalance(address sdktypes.AccAddress, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error) { - bankClient := gqh.network.GetBankClient() - return bankClient.SpendableBalanceByDenom(context.Background(), &banktypes.QuerySpendableBalanceByDenomRequest{Address: address.String(), Denom: denom}) -} diff --git a/testutil/integration/common/grpc/distribution.go b/testutil/integration/common/grpc/distribution.go deleted file mode 100644 index 2e89b41..0000000 --- a/testutil/integration/common/grpc/distribution.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package grpc - -import ( - "context" - - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" -) - -// GetDelegationTotalRewards returns the total delegation rewards for the given delegator. -func (gqh *IntegrationHandler) GetDelegationTotalRewards(delegatorAddress string) (*distrtypes.QueryDelegationTotalRewardsResponse, error) { - distrClient := gqh.network.GetDistrClient() - return distrClient.DelegationTotalRewards(context.Background(), &distrtypes.QueryDelegationTotalRewardsRequest{ - DelegatorAddress: delegatorAddress, - }) -} - -// GetDelegationRewards returns the delegation rewards for the given delegator and validator. -func (gqh *IntegrationHandler) GetDelegationRewards(delegatorAddress string, validatorAddress string) (*distrtypes.QueryDelegationRewardsResponse, error) { - distrClient := gqh.network.GetDistrClient() - return distrClient.DelegationRewards(context.Background(), &distrtypes.QueryDelegationRewardsRequest{ - DelegatorAddress: delegatorAddress, - ValidatorAddress: validatorAddress, - }) -} - -// GetDelegatorWithdrawAddr returns the withdraw address the given delegator. -func (gqh *IntegrationHandler) GetDelegatorWithdrawAddr(delegatorAddress string) (*distrtypes.QueryDelegatorWithdrawAddressResponse, error) { - distrClient := gqh.network.GetDistrClient() - return distrClient.DelegatorWithdrawAddress(context.Background(), &distrtypes.QueryDelegatorWithdrawAddressRequest{ - DelegatorAddress: delegatorAddress, - }) -} - -// GetValidatorCommission returns the commission for the given validator. -func (gqh *IntegrationHandler) GetValidatorCommission(validatorAddress string) (*distrtypes.QueryValidatorCommissionResponse, error) { - distrClient := gqh.network.GetDistrClient() - return distrClient.ValidatorCommission(context.Background(), &distrtypes.QueryValidatorCommissionRequest{ - ValidatorAddress: validatorAddress, - }) -} - -// GetValidatorOutstandingRewards returns the delegation rewards for the given delegator and validator. -func (gqh *IntegrationHandler) GetValidatorOutstandingRewards(validatorAddress string) (*distrtypes.QueryValidatorOutstandingRewardsResponse, error) { - distrClient := gqh.network.GetDistrClient() - return distrClient.ValidatorOutstandingRewards(context.Background(), &distrtypes.QueryValidatorOutstandingRewardsRequest{ - ValidatorAddress: validatorAddress, - }) -} - -// GetCommunityPool queries the community pool coins. -func (gqh *IntegrationHandler) GetCommunityPool() (*distrtypes.QueryCommunityPoolResponse, error) { - distrClient := gqh.network.GetDistrClient() - return distrClient.CommunityPool(context.Background(), &distrtypes.QueryCommunityPoolRequest{}) -} diff --git a/testutil/integration/common/grpc/feemarket.go b/testutil/integration/common/grpc/feemarket.go deleted file mode 100644 index 90c3452..0000000 --- a/testutil/integration/common/grpc/feemarket.go +++ /dev/null @@ -1,13 +0,0 @@ -package grpc - -import ( - "context" - - feemarkettypes "github.com/cosmos/evm/x/feemarket/types" -) - -// GetBaseFee returns the base fee from the feemarket module. -func (gqh *IntegrationHandler) GetBaseFee() (*feemarkettypes.QueryBaseFeeResponse, error) { - feeMarketClient := gqh.network.GetFeeMarketClient() - return feeMarketClient.BaseFee(context.Background(), &feemarkettypes.QueryBaseFeeRequest{}) -} diff --git a/testutil/integration/common/grpc/gov.go b/testutil/integration/common/grpc/gov.go deleted file mode 100644 index e916c7d..0000000 --- a/testutil/integration/common/grpc/gov.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package grpc - -import ( - "fmt" - "slices" - - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" -) - -// GetGovParams returns the gov params from the gov module. -func (gqh *IntegrationHandler) GetGovParams(paramsType string) (*govtypes.QueryParamsResponse, error) { - possibleTypes := []string{"deposit", "tallying", "voting"} - if !slices.Contains(possibleTypes, paramsType) { - return nil, fmt.Errorf("invalid params type: %s\npossible types: %s", paramsType, possibleTypes) - } - - govClient := gqh.network.GetGovClient() - return govClient.Params(gqh.network.GetContext(), &govtypes.QueryParamsRequest{ParamsType: paramsType}) -} - -// GetProposal returns the proposal from the gov module. -func (gqh *IntegrationHandler) GetProposal(proposalID uint64) (*govtypes.QueryProposalResponse, error) { - govClient := gqh.network.GetGovClient() - return govClient.Proposal(gqh.network.GetContext(), &govtypes.QueryProposalRequest{ProposalId: proposalID}) -} diff --git a/testutil/integration/common/grpc/grpc.go b/testutil/integration/common/grpc/grpc.go deleted file mode 100644 index 4e1848f..0000000 --- a/testutil/integration/common/grpc/grpc.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package grpc - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "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" - feemarkettypes "github.com/cosmos/evm/x/feemarket/types" - network "github.com/xrplevm/node/v8/testutil/integration/common/network" -) - -// Handler is an interface that defines the common methods that are used to query -// the network's modules via gRPC. -type Handler interface { - // Account methods - GetAccount(address string) (sdk.AccountI, error) - - // Authz methods - GetAuthorizations(grantee, granter string) ([]authz.Authorization, error) - GetAuthorizationsByGrantee(grantee string) ([]authz.Authorization, error) - GetAuthorizationsByGranter(granter string) ([]authz.Authorization, error) - GetGrants(grantee, granter string) ([]*authz.Grant, error) - GetGrantsByGrantee(grantee string) ([]*authz.GrantAuthorization, error) - GetGrantsByGranter(granter string) ([]*authz.GrantAuthorization, error) - - // Bank methods - GetBalance(address sdk.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error) - GetSpendableBalance(address sdk.AccAddress, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error) - GetAllBalances(address sdk.AccAddress) (*banktypes.QueryAllBalancesResponse, error) - GetTotalSupply() (*banktypes.QueryTotalSupplyResponse, error) - - // Staking methods - GetDelegation(delegatorAddress string, validatorAddress string) (*stakingtypes.QueryDelegationResponse, error) - GetDelegatorDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorDelegationsResponse, error) - GetValidatorDelegations(validatorAddress string) (*stakingtypes.QueryValidatorDelegationsResponse, error) - GetRedelegations(delegatorAddress, srcValidator, dstValidator string) (*stakingtypes.QueryRedelegationsResponse, error) - GetValidatorUnbondingDelegations(validatorAddress string) (*stakingtypes.QueryValidatorUnbondingDelegationsResponse, error) - GetDelegatorUnbondingDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorUnbondingDelegationsResponse, error) - - // Distribution methods - GetDelegationTotalRewards(delegatorAddress string) (*distrtypes.QueryDelegationTotalRewardsResponse, error) - GetDelegationRewards(delegatorAddress string, validatorAddress string) (*distrtypes.QueryDelegationRewardsResponse, error) - GetDelegatorWithdrawAddr(delegatorAddress string) (*distrtypes.QueryDelegatorWithdrawAddressResponse, error) - GetValidatorCommission(validatorAddress string) (*distrtypes.QueryValidatorCommissionResponse, error) - GetValidatorOutstandingRewards(validatorAddress string) (*distrtypes.QueryValidatorOutstandingRewardsResponse, error) - GetCommunityPool() (*distrtypes.QueryCommunityPoolResponse, error) - GetBondedValidators() (*stakingtypes.QueryValidatorsResponse, error) - - // FeeMarket methods - GetBaseFee() (*feemarkettypes.QueryBaseFeeResponse, error) -} - -var _ Handler = (*IntegrationHandler)(nil) - -// IntegrationHandler is a helper struct to query the network's modules -// via gRPC. This is to simulate the behavior of a real user and avoid querying -// the modules directly. -type IntegrationHandler struct { - network network.Network -} - -// NewIntegrationHandler creates a new IntegrationHandler instance. -func NewIntegrationHandler(network network.Network) *IntegrationHandler { - return &IntegrationHandler{ - network: network, - } -} diff --git a/testutil/integration/common/grpc/staking.go b/testutil/integration/common/grpc/staking.go deleted file mode 100644 index 71cec10..0000000 --- a/testutil/integration/common/grpc/staking.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package grpc - -import ( - "context" - - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -// GetDelegation returns the delegation for the given delegator and validator addresses. -func (gqh *IntegrationHandler) GetDelegation(delegatorAddress string, validatorAddress string) (*stakingtypes.QueryDelegationResponse, error) { - stakingClient := gqh.network.GetStakingClient() - return stakingClient.Delegation(context.Background(), &stakingtypes.QueryDelegationRequest{ - DelegatorAddr: delegatorAddress, - ValidatorAddr: validatorAddress, - }) -} - -// GetValidatorDelegations returns the delegations to a given validator. -func (gqh *IntegrationHandler) GetValidatorDelegations(validatorAddress string) (*stakingtypes.QueryValidatorDelegationsResponse, error) { - stakingClient := gqh.network.GetStakingClient() - return stakingClient.ValidatorDelegations(context.Background(), &stakingtypes.QueryValidatorDelegationsRequest{ - ValidatorAddr: validatorAddress, - }) -} - -// GetDelegatorDelegations returns the delegations to a given delegator. -func (gqh *IntegrationHandler) GetDelegatorDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorDelegationsResponse, error) { - stakingClient := gqh.network.GetStakingClient() - return stakingClient.DelegatorDelegations(context.Background(), &stakingtypes.QueryDelegatorDelegationsRequest{ - DelegatorAddr: delegatorAddress, - }) -} - -// GetRedelegations returns the redelegations to a given delegator and validators. -func (gqh *IntegrationHandler) GetRedelegations(delegatorAddress, srcValidator, dstValidator string) (*stakingtypes.QueryRedelegationsResponse, error) { - stakingClient := gqh.network.GetStakingClient() - return stakingClient.Redelegations(context.Background(), &stakingtypes.QueryRedelegationsRequest{ - DelegatorAddr: delegatorAddress, - SrcValidatorAddr: srcValidator, - DstValidatorAddr: dstValidator, - }) -} - -// GetValidatorUnbondingDelegations returns the unbonding delegations to a given validator. -func (gqh *IntegrationHandler) GetValidatorUnbondingDelegations(validatorAddress string) (*stakingtypes.QueryValidatorUnbondingDelegationsResponse, error) { - stakingClient := gqh.network.GetStakingClient() - return stakingClient.ValidatorUnbondingDelegations(context.Background(), &stakingtypes.QueryValidatorUnbondingDelegationsRequest{ - ValidatorAddr: validatorAddress, - }) -} - -// GetDelegatorUnbondingDelegations returns all the unbonding delegations for given delegator. -func (gqh *IntegrationHandler) GetDelegatorUnbondingDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorUnbondingDelegationsResponse, error) { - stakingClient := gqh.network.GetStakingClient() - return stakingClient.DelegatorUnbondingDelegations(context.Background(), &stakingtypes.QueryDelegatorUnbondingDelegationsRequest{ - DelegatorAddr: delegatorAddress, - }) -} - -// GetValidators returns the list of all bonded validators. -func (gqh *IntegrationHandler) GetBondedValidators() (*stakingtypes.QueryValidatorsResponse, error) { - stakingClient := gqh.network.GetStakingClient() - return stakingClient.Validators(context.Background(), &stakingtypes.QueryValidatorsRequest{ - Status: stakingtypes.BondStatusBonded, - }) -} diff --git a/testutil/integration/common/keyring/keyring.go b/testutil/integration/common/keyring/keyring.go deleted file mode 100644 index bade677..0000000 --- a/testutil/integration/common/keyring/keyring.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package keyring - -import ( - "fmt" - - "github.com/ethereum/go-ethereum/common" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdktypes "github.com/cosmos/cosmos-sdk/types" - utiltx "github.com/cosmos/evm/testutil/tx" -) - -type Key struct { - Addr common.Address - AccAddr sdktypes.AccAddress - Priv cryptotypes.PrivKey -} - -func NewKey() Key { - addr, privKey := utiltx.NewAddrKey() - return Key{ - Addr: addr, - AccAddr: sdktypes.AccAddress(addr.Bytes()), - Priv: privKey, - } -} - -type Keyring interface { - // GetPrivKey returns the private key of the account at the given keyring index. - GetPrivKey(index int) cryptotypes.PrivKey - // GetAddr returns the address of the account at the given keyring index. - GetAddr(index int) common.Address - // GetAccAddr returns the SDK address of the account at the given keyring index. - GetAccAddr(index int) sdktypes.AccAddress - // GetAllAccAddrs returns all the SDK addresses of the accounts in the keyring. - GetAllAccAddrs() []sdktypes.AccAddress - // GetKey returns the key at the given keyring index - GetKey(index int) Key - // GetKeys returns all the keys - GetKeys() []Key - - // AddKey adds a new account to the keyring - AddKey() int - - // Sign signs message with the specified account. - Sign(index int, msg []byte) ([]byte, error) -} - -// IntegrationKeyring is a keyring designed for integration tests. -type IntegrationKeyring struct { - keys []Key -} - -var _ Keyring = (*IntegrationKeyring)(nil) - -// New returns a new keyring with nAccs accounts. -func New(nAccs int) Keyring { - accs := make([]Key, 0, nAccs) - for i := 0; i < nAccs; i++ { - acc := NewKey() - accs = append(accs, acc) - } - return &IntegrationKeyring{ - keys: accs, - } -} - -// GetPrivKey returns the private key of the specified account. -func (kr *IntegrationKeyring) GetPrivKey(index int) cryptotypes.PrivKey { - return kr.keys[index].Priv -} - -// GetAddr returns the address of the specified account. -func (kr *IntegrationKeyring) GetAddr(index int) common.Address { - return kr.keys[index].Addr -} - -// GetAccAddr returns the sdk address of the specified account. -func (kr *IntegrationKeyring) GetAccAddr(index int) sdktypes.AccAddress { - return kr.keys[index].AccAddr -} - -// GetAllAccAddrs returns all the sdk addresses of the accounts in the keyring. -func (kr *IntegrationKeyring) GetAllAccAddrs() []sdktypes.AccAddress { - accs := make([]sdktypes.AccAddress, 0, len(kr.keys)) - for _, key := range kr.keys { - accs = append(accs, key.AccAddr) - } - return accs -} - -// GetKey returns the key specified by index -func (kr *IntegrationKeyring) GetKey(index int) Key { - return kr.keys[index] -} - -// GetKey returns the key specified by index -func (kr *IntegrationKeyring) GetKeys() []Key { - return kr.keys -} - -// AddKey adds a new account to the keyring. It returns the index for the key -func (kr *IntegrationKeyring) AddKey() int { - acc := NewKey() - index := len(kr.keys) - kr.keys = append(kr.keys, acc) - return index -} - -// Sign signs message with the specified key. -func (kr *IntegrationKeyring) Sign(index int, msg []byte) ([]byte, error) { - privKey := kr.GetPrivKey(index) - if privKey == nil { - return nil, fmt.Errorf("no private key for account %d", index) - } - return privKey.Sign(msg) -} diff --git a/testutil/integration/common/network/network.go b/testutil/integration/common/network/network.go deleted file mode 100644 index 2d2f19d..0000000 --- a/testutil/integration/common/network/network.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package network - -import ( - "testing" - "time" - - sdkmath "cosmossdk.io/math" - abcitypes "github.com/cometbft/cometbft/abci/types" - sdktypes "github.com/cosmos/cosmos-sdk/types" - sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - authz "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" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - feemarkettypes "github.com/cosmos/evm/x/feemarket/types" - ibctesting "github.com/cosmos/ibc-go/v8/testing" -) - -// Network is the interface that wraps the common methods to interact with integration test network. -// -// It was designed to avoid users to access module's keepers directly and force integration tests -// to be closer to the real user's behavior. -type Network interface { - GetContext() sdktypes.Context - GetChainID() string - GetDenom() string - GetOtherDenoms() []string - GetValidators() []stakingtypes.Validator - GetMinDepositAmt() sdkmath.Int - NextBlock() error - NextBlockAfter(duration time.Duration) error - NextBlockWithTxs(txBytes ...[]byte) (*abcitypes.ResponseFinalizeBlock, error) - - // Clients - GetAuthClient() authtypes.QueryClient - GetAuthzClient() authz.QueryClient - GetBankClient() banktypes.QueryClient - GetStakingClient() stakingtypes.QueryClient - GetDistrClient() distrtypes.QueryClient - GetFeeMarketClient() feemarkettypes.QueryClient - GetGovClient() govtypes.QueryClient - - BroadcastTxSync(txBytes []byte) (abcitypes.ExecTxResult, error) - Simulate(txBytes []byte) (*txtypes.SimulateResponse, error) - CheckTx(txBytes []byte) (*abcitypes.ResponseCheckTx, error) - - // GetIBCChain returns the IBC test chain. - // NOTE: this is only used for testing IBC related functionality. - // The idea is to deprecate this eventually. - GetIBCChain(t *testing.T, coord *ibctesting.Coordinator) *ibctesting.TestChain - GetEncodingConfig() sdktestutil.TestEncodingConfig -} diff --git a/testutil/integration/exrp/common/config.go b/testutil/integration/exrp/common/config.go index 64fdba1..f3d45a7 100644 --- a/testutil/integration/exrp/common/config.go +++ b/testutil/integration/exrp/common/config.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" sdktypes "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - evmostypes "github.com/cosmos/evm/types" "github.com/xrplevm/node/v8/app" ) @@ -54,18 +53,6 @@ func DefaultConfig() Config { // requires to be changed. type ConfigOption func(*Config) -// WithChainID sets a custom chainID for the network. It panics if the chainID is invalid. -func WithChainID(chainID string) ConfigOption { - chainIDNum, err := evmostypes.ParseChainID(chainID) - if err != nil { - panic(err) - } - return func(cfg *Config) { - cfg.ChainID = chainID - cfg.EIP155ChainID = chainIDNum - } -} - // WithAmountOfValidators sets the amount of validators for the network. func WithAmountOfValidators(amount int) ConfigOption { return func(cfg *Config) { diff --git a/testutil/integration/exrp/integration/clients.go b/testutil/integration/exrp/integration/clients.go new file mode 100644 index 0000000..c4a36c3 --- /dev/null +++ b/testutil/integration/exrp/integration/clients.go @@ -0,0 +1,82 @@ +package exrpintegration + +import ( + "github.com/cosmos/cosmos-sdk/baseapp" + sdktypes "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + 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" + distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + erc20types "github.com/cosmos/evm/x/erc20/types" + feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + evmtypes "github.com/cosmos/evm/x/vm/types" +) + +func getQueryHelper(ctx sdktypes.Context, encCfg testutil.TestEncodingConfig) *baseapp.QueryServiceTestHelper { + interfaceRegistry := encCfg.InterfaceRegistry + // This is needed so that state changes are not committed in precompiles + // simulations. + cacheCtx, _ := ctx.CacheContext() + return baseapp.NewQueryServerTestHelper(cacheCtx, interfaceRegistry) +} + +func (n *IntegrationNetwork) GetERC20Client() erc20types.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + erc20types.RegisterQueryServer(queryHelper, n.app.Erc20Keeper) + return erc20types.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetEvmClient() evmtypes.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + evmtypes.RegisterQueryServer(queryHelper, n.app.EvmKeeper) + return evmtypes.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetGovClient() govtypes.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + govtypes.RegisterQueryServer(queryHelper, govkeeper.NewQueryServer(&n.app.GovKeeper)) + return govtypes.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetBankClient() banktypes.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + banktypes.RegisterQueryServer(queryHelper, n.app.BankKeeper) + return banktypes.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetFeeMarketClient() feemarkettypes.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + feemarkettypes.RegisterQueryServer(queryHelper, n.app.FeeMarketKeeper) + return feemarkettypes.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetAuthClient() authtypes.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + authtypes.RegisterQueryServer(queryHelper, authkeeper.NewQueryServer(n.app.AccountKeeper)) + return authtypes.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetAuthzClient() authz.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + authz.RegisterQueryServer(queryHelper, n.app.AuthzKeeper) + return authz.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetStakingClient() stakingtypes.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + stakingtypes.RegisterQueryServer(queryHelper, stakingkeeper.Querier{Keeper: n.app.StakingKeeper}) + return stakingtypes.NewQueryClient(queryHelper) +} + +func (n *IntegrationNetwork) GetDistrClient() distrtypes.QueryClient { + queryHelper := getQueryHelper(n.GetContext(), n.GetEncodingConfig()) + distrtypes.RegisterQueryServer(queryHelper, distrkeeper.Querier{Keeper: n.app.DistrKeeper}) + return distrtypes.NewQueryClient(queryHelper) +} diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index f8f5cfb..6996d28 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -14,6 +14,7 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" "github.com/xrplevm/node/v8/app" + "github.com/cosmos/evm/testutil/integration/common/network" "github.com/cosmos/evm/types" abcitypes "github.com/cometbft/cometbft/abci/types" @@ -26,6 +27,7 @@ import ( sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" txtypes "github.com/cosmos/cosmos-sdk/types/tx" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" ) @@ -35,12 +37,17 @@ import ( // It was designed to avoid users to access module's keepers directly and force integration tests // to be closer to the real user's behavior. type Network interface { - exrpcommon.Network + network.Network + + GetGovClient() govtypes.QueryClient GetEIP155ChainID() *big.Int GetValidatorSet() *cmttypes.ValidatorSet + + GetMinDepositAmt() sdkmath.Int } +// TODO: Update when migrating to v10 var _ Network = (*IntegrationNetwork)(nil) // IntegrationNetwork is the implementation of the Network interface for integration tests. @@ -275,12 +282,12 @@ func (n *IntegrationNetwork) GetMinDepositAmt() sdkmath.Int { // GetChainConfig returns the network's chain config func (n *IntegrationNetwork) GetEVMChainConfig() *gethparams.ChainConfig { - params := n.app.EvmKeeper.GetParams(n.ctx) - return params.ChainConfig.EthereumConfig(n.cfg.EIP155ChainID) + // TODO: Implement this + return nil } // GetDenom returns the network's denom -func (n *IntegrationNetwork) GetDenom() string { +func (n *IntegrationNetwork) GetBaseDenom() string { return n.cfg.Denom } diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index ab4cab4..a41a197 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -29,10 +29,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" evmostypes "github.com/cosmos/evm/types" - epochstypes "github.com/cosmos/evm/x/epochs/types" erc20types "github.com/cosmos/evm/x/erc20/types" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" - infltypes "github.com/cosmos/evm/x/inflation/v1/types" evmtypes "github.com/cosmos/evm/x/vm/types" exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" @@ -59,12 +57,10 @@ var genesisSetupFunctions = map[string]genSetupFn{ evmtypes.ModuleName: genStateSetter[*evmtypes.GenesisState](evmtypes.ModuleName), erc20types.ModuleName: genStateSetter[*erc20types.GenesisState](erc20types.ModuleName), govtypes.ModuleName: genStateSetter[*govtypesv1.GenesisState](govtypes.ModuleName), - infltypes.ModuleName: genStateSetter[*infltypes.GenesisState](infltypes.ModuleName), feemarkettypes.ModuleName: genStateSetter[*feemarkettypes.GenesisState](feemarkettypes.ModuleName), distrtypes.ModuleName: genStateSetter[*distrtypes.GenesisState](distrtypes.ModuleName), banktypes.ModuleName: setBankGenesisState, authtypes.ModuleName: setAuthGenesisState, - epochstypes.ModuleName: genStateSetter[*epochstypes.GenesisState](epochstypes.ModuleName), consensustypes.ModuleName: func(_ *app.App, genesisState evmostypes.GenesisState, _ interface{}) (evmostypes.GenesisState, error) { // no-op. Consensus does not have a genesis state on the application // but the params are used on it @@ -114,6 +110,7 @@ func createGenesisAccounts(accounts []sdktypes.AccAddress) []authtypes.GenesisAc emptyCodeHash := crypto.Keccak256Hash(nil).String() for _, acc := range accounts { baseAcc := authtypes.NewBaseAccount(acc, nil, 0, 0) + // TODO: Update when replacing with forked cosmos/evm version is installed ethAcc := &evmostypes.EthAccount{ BaseAccount: baseAcc, CodeHash: emptyCodeHash, diff --git a/testutil/integration/exrp/integration/unit_network.go b/testutil/integration/exrp/integration/unit_network.go index 50e80ba..234df0c 100644 --- a/testutil/integration/exrp/integration/unit_network.go +++ b/testutil/integration/exrp/integration/unit_network.go @@ -4,7 +4,7 @@ package exrpintegration import ( sdktypes "github.com/cosmos/cosmos-sdk/types" - inflationtypes "github.com/cosmos/evm/x/inflation/v1/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/evm/x/vm/statedb" "github.com/ethereum/go-ethereum/common" "github.com/xrplevm/node/v8/app" @@ -19,6 +19,7 @@ type UnitTestIntegrationNetwork struct { App *app.App } +// TODO: Update when migrating to v10 var _ Network = (*UnitTestIntegrationNetwork)(nil) // NewUnitTestNetwork configures and initializes a new Evmos Network instance with @@ -49,9 +50,9 @@ func (n *UnitTestIntegrationNetwork) GetStateDB() *statedb.StateDB { func (n *UnitTestIntegrationNetwork) FundAccount(addr sdktypes.AccAddress, coins sdktypes.Coins) error { ctx := n.GetContext() - if err := n.app.BankKeeper.MintCoins(ctx, inflationtypes.ModuleName, coins); err != nil { + if err := n.app.BankKeeper.MintCoins(ctx, banktypes.ModuleName, coins); err != nil { return err } - return n.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, inflationtypes.ModuleName, addr, coins) + return n.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, banktypes.ModuleName, addr, coins) } diff --git a/testutil/integration/exrp/upgrade/unit_network.go b/testutil/integration/exrp/upgrade/unit_network.go index 1f5ee47..d4b432f 100644 --- a/testutil/integration/exrp/upgrade/unit_network.go +++ b/testutil/integration/exrp/upgrade/unit_network.go @@ -4,7 +4,7 @@ package exrpupgrade import ( sdktypes "github.com/cosmos/cosmos-sdk/types" - inflationtypes "github.com/cosmos/evm/x/inflation/v1/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/evm/x/vm/statedb" "github.com/ethereum/go-ethereum/common" "github.com/xrplevm/node/v8/app" @@ -49,9 +49,9 @@ func (n *UnitTestUpgradeNetwork) GetStateDB() *statedb.StateDB { func (n *UnitTestUpgradeNetwork) FundAccount(addr sdktypes.AccAddress, coins sdktypes.Coins) error { ctx := n.GetContext() - if err := n.app.BankKeeper.MintCoins(ctx, inflationtypes.ModuleName, coins); err != nil { + if err := n.app.BankKeeper.MintCoins(ctx, banktypes.ModuleName, coins); err != nil { return err } - return n.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, inflationtypes.ModuleName, addr, coins) + return n.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, banktypes.ModuleName, addr, coins) } diff --git a/testutil/integration/exrp/utils/gov.go b/testutil/integration/exrp/utils/gov.go index 7d2345d..92fb680 100644 --- a/testutil/integration/exrp/utils/gov.go +++ b/testutil/integration/exrp/utils/gov.go @@ -16,18 +16,18 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - commonfactory "github.com/xrplevm/node/v8/testutil/integration/common/factory" - "github.com/xrplevm/node/v8/testutil/integration/common/keyring" - "github.com/xrplevm/node/v8/testutil/integration/common/network" + "github.com/cosmos/evm/testutil/integration/common/factory" + "github.com/cosmos/evm/testutil/integration/os/keyring" + exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" ) // SubmitProposal is a helper function to submit a governance proposal and // return the proposal ID. -func SubmitProposal(tf commonfactory.BaseTxFactory, network network.Network, proposerPriv cryptotypes.PrivKey, title string, msgs ...sdk.Msg) (uint64, error) { +func SubmitProposal(tf factory.BaseTxFactory, network exrpintegration.Network, proposerPriv cryptotypes.PrivKey, title string, msgs ...sdk.Msg) (uint64, error) { proposerAccAddr := sdk.AccAddress(proposerPriv.PubKey().Address()).String() proposal, err := govv1.NewMsgSubmitProposal( msgs, - sdk.NewCoins(sdk.NewCoin(network.GetDenom(), network.GetMinDepositAmt())), + sdk.NewCoins(sdk.NewCoin(network.GetBaseDenom(), network.GetMinDepositAmt())), proposerAccAddr, "", title, @@ -38,7 +38,7 @@ func SubmitProposal(tf commonfactory.BaseTxFactory, network network.Network, pro return 0, err } - txArgs := commonfactory.CosmosTxArgs{ + txArgs := factory.CosmosTxArgs{ Msgs: []sdk.Msg{proposal}, } @@ -47,19 +47,19 @@ func SubmitProposal(tf commonfactory.BaseTxFactory, network network.Network, pro // SubmitLegacyProposal is a helper function to submit a governance proposal and // return the proposal ID. -func SubmitLegacyProposal(tf commonfactory.BaseTxFactory, network network.Network, proposerPriv cryptotypes.PrivKey, proposal govv1beta1.Content) (uint64, error) { +func SubmitLegacyProposal(tf factory.BaseTxFactory, network exrpintegration.Network, proposerPriv cryptotypes.PrivKey, proposal govv1beta1.Content) (uint64, error) { proposerAccAddr := sdk.AccAddress(proposerPriv.PubKey().Address()) msgSubmitProposal, err := govv1beta1.NewMsgSubmitProposal( proposal, - sdk.NewCoins(sdk.NewCoin(network.GetDenom(), math.NewInt(1e18))), + sdk.NewCoins(sdk.NewCoin(network.GetBaseDenom(), math.NewInt(1e18))), proposerAccAddr, ) if err != nil { return 0, err } - txArgs := commonfactory.CosmosTxArgs{ + txArgs := factory.CosmosTxArgs{ Msgs: []sdk.Msg{msgSubmitProposal}, } @@ -68,7 +68,7 @@ func SubmitLegacyProposal(tf commonfactory.BaseTxFactory, network network.Networ // VoteOnProposal is a helper function to vote on a governance proposal given the private key of the voter and // the option to vote. -func VoteOnProposal(tf commonfactory.BaseTxFactory, voterPriv cryptotypes.PrivKey, proposalID uint64, option govv1.VoteOption) (abcitypes.ExecTxResult, error) { +func VoteOnProposal(tf factory.BaseTxFactory, voterPriv cryptotypes.PrivKey, proposalID uint64, option govv1.VoteOption) (abcitypes.ExecTxResult, error) { voterAccAddr := sdk.AccAddress(voterPriv.PubKey().Address()) msgVote := govv1.NewMsgVote( @@ -78,7 +78,7 @@ func VoteOnProposal(tf commonfactory.BaseTxFactory, voterPriv cryptotypes.PrivKe "", ) - res, err := tf.CommitCosmosTx(voterPriv, commonfactory.CosmosTxArgs{ + res, err := tf.CommitCosmosTx(voterPriv, factory.CosmosTxArgs{ Msgs: []sdk.Msg{msgVote}, }) @@ -87,7 +87,7 @@ func VoteOnProposal(tf commonfactory.BaseTxFactory, voterPriv cryptotypes.PrivKe // ApproveProposal is a helper function to vote 'yes' // for it and wait till it passes. -func ApproveProposal(tf commonfactory.BaseTxFactory, network network.Network, proposerPriv cryptotypes.PrivKey, proposalID uint64) error { +func ApproveProposal(tf factory.BaseTxFactory, network exrpintegration.Network, proposerPriv cryptotypes.PrivKey, proposalID uint64) error { // Vote on proposal if _, err := VoteOnProposal(tf, proposerPriv, proposalID, govv1.OptionYes); err != nil { return errorsmod.Wrap(err, "failed to vote on proposal") @@ -100,7 +100,7 @@ func ApproveProposal(tf commonfactory.BaseTxFactory, network network.Network, pr return checkProposalStatus(network, proposalID, govv1.StatusPassed) } -func SubmitAndAwaitProposalResolution(tf commonfactory.BaseTxFactory, network network.Network, keys []keyring.Key, title string, msgs ...sdk.Msg) (*govv1.Proposal, error) { +func SubmitAndAwaitProposalResolution(tf factory.BaseTxFactory, network exrpintegration.Network, keys []keyring.Key, title string, msgs ...sdk.Msg) (*govv1.Proposal, error) { proposalID, err := SubmitProposal(tf, network, keys[0].Priv, title, msgs...) if err != nil { return nil, err @@ -120,7 +120,7 @@ func SubmitAndAwaitProposalResolution(tf commonfactory.BaseTxFactory, network ne return retrieveResolvedProposal(network, proposalID) } -func retrieveResolvedProposal(network network.Network, proposalID uint64) (*govv1.Proposal, error) { +func retrieveResolvedProposal(network exrpintegration.Network, proposalID uint64) (*govv1.Proposal, error) { gq := network.GetGovClient() proposalRes, err := gq.Proposal(network.GetContext(), &govv1.QueryProposalRequest{ProposalId: proposalID}) if err != nil { @@ -169,7 +169,7 @@ func getProposalIDFromEvents(events []abcitypes.Event) (uint64, error) { return proposalID, nil } -func submitProposal(tf commonfactory.BaseTxFactory, network network.Network, proposerPriv cryptotypes.PrivKey, txArgs commonfactory.CosmosTxArgs) (uint64, error) { +func submitProposal(tf factory.BaseTxFactory, network exrpintegration.Network, proposerPriv cryptotypes.PrivKey, txArgs factory.CosmosTxArgs) (uint64, error) { res, err := tf.CommitCosmosTx(proposerPriv, txArgs) if err != nil { return 0, err @@ -194,7 +194,7 @@ func submitProposal(tf commonfactory.BaseTxFactory, network network.Network, pro // waitVotingPeriod is a helper function that waits for the current voting period // defined in the gov module params to pass -func waitVotingPeriod(n network.Network) error { +func waitVotingPeriod(n exrpintegration.Network) error { gq := n.GetGovClient() params, err := gq.Params(n.GetContext(), &govv1.QueryParamsRequest{ParamsType: "voting"}) if err != nil { @@ -210,7 +210,7 @@ func waitVotingPeriod(n network.Network) error { } // checkProposalStatus is a helper function to check for a specific proposal status -func checkProposalStatus(n network.Network, proposalID uint64, expStatus govv1.ProposalStatus) error { +func checkProposalStatus(n exrpintegration.Network, proposalID uint64, expStatus govv1.ProposalStatus) error { gq := n.GetGovClient() proposalRes, err := gq.Proposal(n.GetContext(), &govv1.QueryProposalRequest{ProposalId: proposalID}) if err != nil { From 24fc5c69f7bcaf94e87611bf4c799f0acc60ffa2 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 12 Aug 2025 16:36:12 +0200 Subject: [PATCH 12/66] refactor(app): apply v8-v10 migration changes --- app/app.go | 115 ++++++++++++++++++++------------------------- app/precompiles.go | 4 +- app/upgrades.go | 2 +- 3 files changed, 55 insertions(+), 66 deletions(-) diff --git a/app/app.go b/app/app.go index 2ef59ae..293ab6d 100644 --- a/app/app.go +++ b/app/app.go @@ -11,6 +11,8 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" + ratelimitv2 "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/v2" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -25,18 +27,21 @@ import ( evmante "github.com/cosmos/evm/evmd/ante" etherminttypes "github.com/cosmos/evm/types" cosmosevmutils "github.com/cosmos/evm/utils" + erc20v2 "github.com/cosmos/evm/x/erc20/v2" "github.com/cosmos/gogoproto/proto" - ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v8" - ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" - ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" - ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v8/testing" + ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v10" + ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/types" + ibctransfer "github.com/cosmos/ibc-go/v10/modules/apps/transfer" + ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" + ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types" + ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v10/testing" "github.com/ethereum/go-ethereum/core/vm" "github.com/spf13/cast" + transferv2 "github.com/cosmos/evm/x/ibc/transfer/v2" vmmod "github.com/cosmos/evm/x/vm" + ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" @@ -106,23 +111,20 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" evmostypes "github.com/cosmos/evm/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" - ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/keeper" - ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" - 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" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/keeper" + ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts" + icahost "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v8/modules/core" - ibcporttypes "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" - ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types" + ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v10/modules/core" + ibcporttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" "github.com/xrplevm/node/v8/docs" poaante "github.com/xrplevm/node/v8/x/poa/ante" @@ -229,7 +231,6 @@ type App struct { AccountKeeper authkeeper.AccountKeeper AuthzKeeper authzkeeper.Keeper BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper DistrKeeper distrkeeper.Keeper @@ -245,10 +246,6 @@ type App struct { ConsensusParamsKeeper consensusparamkeeper.Keeper RateLimitKeeper ratelimitkeeper.Keeper - // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper @@ -338,18 +335,6 @@ func New( ) bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore) - // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper( - appCodec, - keys[capabilitytypes.StoreKey], - memKeys[capabilitytypes.MemStoreKey], - ) - - // grant capabilities for the ibc and ibc-transfer modules - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) - // add keepers app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, @@ -498,11 +483,9 @@ func New( // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibcexported.StoreKey], + appCodec, runtime.NewKVStoreService(keys[ibcexported.StoreKey]), app.GetSubspace(ibcexported.ModuleName), - app.StakingKeeper, app.UpgradeKeeper, - scopedIBCKeeper, authAddress, ) // Create the rate limit keeper @@ -513,36 +496,35 @@ func New( authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.BankKeeper, app.IBCKeeper.ChannelKeeper, + app.IBCKeeper.ClientKeeper, app.IBCKeeper.ChannelKeeper, // ICS4Wrapper ) // Create Transfer Keepers // TODO: Update when migrating to v10 app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, - keys[ibctransfertypes.StoreKey], + runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), app.GetSubspace(ibctransfertypes.ModuleName), - app.RateLimitKeeper, app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.PortKeeper, + app.IBCKeeper.ChannelKeeper, + app.MsgServiceRouter(), app.AccountKeeper, app.BankKeeper, - scopedTransferKeeper, app.Erc20Keeper, // Add ERC20 Keeper for ERC20 transfers + authAddress, ) transferModule := transfer.NewAppModule(app.TransferKeeper) // Create the app.ICAHostKeeper app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, app.keys[icahosttypes.StoreKey], + appCodec, runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), app.GetSubspace(icahosttypes.SubModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.PortKeeper, app.AccountKeeper, - scopedICAHostKeeper, bApp.MsgServiceRouter(), + app.GRPCQueryRouter(), authAddress, ) - app.ICAHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter()) // create host IBC module icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) @@ -591,7 +573,7 @@ func New( app.Erc20Keeper, app.AuthzKeeper, app.TransferKeeper, - app.IBCKeeper.ChannelKeeper, + *app.IBCKeeper.ChannelKeeper, app.EvmKeeper, app.GovKeeper, app.AppCodec(), @@ -601,8 +583,6 @@ func New( /**** IBC Routing ****/ // Sealing prevents other modules from creating scoped sub-keepers - app.CapabilityKeeper.Seal() - /* Create Transfer Stack @@ -627,6 +607,8 @@ func New( transferStack = ratelimit.NewIBCMiddleware(app.RateLimitKeeper, transferStack) transferStack = erc20.NewIBCMiddleware(app.Erc20Keeper, transferStack) + /**** IBC V1 ****/ + // Create static IBC router, add transfer route, then set and seal it ibcRouter := ibcporttypes.NewRouter() ibcRouter. @@ -634,6 +616,22 @@ func New( AddRoute(ibctransfertypes.ModuleName, transferStack) app.IBCKeeper.SetRouter(ibcRouter) + /**** IBC V2 ****/ + + var transferStackV2 ibcapi.IBCModule + transferStackV2 = transferv2.NewIBCModule(app.TransferKeeper) + transferStackV2 = ratelimitv2.NewIBCMiddleware(app.RateLimitKeeper, transferStackV2) + transferStackV2 = erc20v2.NewIBCMiddleware(transferStackV2, app.Erc20Keeper) + + ibcRouterV2 := ibcapi.NewRouter() + ibcRouterV2.AddRoute(ibctransfertypes.ModuleName, transferStackV2) + + clientKeeper := app.IBCKeeper.ClientKeeper + storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() + + tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) + clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) + /**** Module Hooks ****/ // register hooks after all modules have been initialized @@ -655,7 +653,6 @@ func New( ), auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)), bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), - capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), @@ -672,7 +669,7 @@ func New( ibc.NewAppModule(app.IBCKeeper), ica.NewAppModule(nil, &app.ICAHostKeeper), transferModule, - ibctm.NewAppModule(), + ibctm.NewAppModule(tmLightClientModule), ratelimit.NewAppModule(appCodec, app.RateLimitKeeper), // Ethermint app modules @@ -840,9 +837,6 @@ func New( } } - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedTransferKeeper = scopedTransferKeeper - return app } @@ -1065,7 +1059,7 @@ func (app *App) GetBaseApp() *baseapp.BaseApp { } // GetStakingKeeper implements the TestingApp interface. -func (app *App) GetStakingKeeper() ibctestingtypes.StakingKeeper { +func (app *App) GetStakingKeeper() *stakingkeeper.Keeper { return app.StakingKeeper } @@ -1079,11 +1073,6 @@ func (app *App) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper } -// GetScopedIBCKeeper implements the TestingApp interface. -func (app *App) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { - return app.ScopedIBCKeeper -} - // GetTxConfig implements the TestingApp interface. func (app *App) GetTxConfig() client.TxConfig { return app.txConfig diff --git a/app/precompiles.go b/app/precompiles.go index 6ce0a30..8d2a7b0 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -20,7 +20,7 @@ import ( erc20Keeper "github.com/cosmos/evm/x/erc20/keeper" transferkeeper "github.com/cosmos/evm/x/ibc/transfer/keeper" evmkeeper "github.com/cosmos/evm/x/vm/keeper" - channelkeeper "github.com/cosmos/ibc-go/v8/modules/core/04-channel/keeper" + channelkeeper "github.com/cosmos/ibc-go/v10/modules/core/04-channel/keeper" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" "golang.org/x/exp/maps" @@ -71,7 +71,7 @@ func NewAvailableStaticPrecompiles( stakingKeeper, transferKeeper, // TODO: Update when migrating to v10 - channelKeeper, + &channelKeeper, evmKeeper, ) if err != nil { diff --git a/app/upgrades.go b/app/upgrades.go index 515604e..3bd8365 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -8,7 +8,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" - icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types" v4 "github.com/xrplevm/node/v8/app/upgrades/v4" v5 "github.com/xrplevm/node/v8/app/upgrades/v5" v6 "github.com/xrplevm/node/v8/app/upgrades/v6" From 02e77e4d46646cf9bdb65e45d1b838c24983f0bb Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 12 Aug 2025 16:36:37 +0200 Subject: [PATCH 13/66] refactor(testutil): update integration testutils with ibc-go v10 --- testutil/integration/exrp/common/network.go | 2 +- testutil/integration/exrp/integration/clients.go | 6 ++++++ testutil/integration/exrp/integration/ibc.go | 4 +--- testutil/integration/exrp/upgrade/ibc.go | 4 +--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/testutil/integration/exrp/common/network.go b/testutil/integration/exrp/common/network.go index 75ad0a3..737696c 100644 --- a/testutil/integration/exrp/common/network.go +++ b/testutil/integration/exrp/common/network.go @@ -5,7 +5,7 @@ import ( "time" sdktypes "github.com/cosmos/cosmos-sdk/types" - ibctesting "github.com/cosmos/ibc-go/v8/testing" + ibctesting "github.com/cosmos/ibc-go/v10/testing" abcitypes "github.com/cometbft/cometbft/abci/types" sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/testutil/integration/exrp/integration/clients.go b/testutil/integration/exrp/integration/clients.go index c4a36c3..c4584da 100644 --- a/testutil/integration/exrp/integration/clients.go +++ b/testutil/integration/exrp/integration/clients.go @@ -12,6 +12,7 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" erc20types "github.com/cosmos/evm/x/erc20/types" @@ -80,3 +81,8 @@ func (n *IntegrationNetwork) GetDistrClient() distrtypes.QueryClient { distrtypes.RegisterQueryServer(queryHelper, distrkeeper.Querier{Keeper: n.app.DistrKeeper}) return distrtypes.NewQueryClient(queryHelper) } + +// NOTE: Not needed +func (n *IntegrationNetwork) GetMintClient() minttypes.QueryClient { + return nil +} \ No newline at end of file diff --git a/testutil/integration/exrp/integration/ibc.go b/testutil/integration/exrp/integration/ibc.go index 7d7a316..e540b3e 100644 --- a/testutil/integration/exrp/integration/ibc.go +++ b/testutil/integration/exrp/integration/ibc.go @@ -5,7 +5,7 @@ package exrpintegration import ( "testing" - ibctesting "github.com/cosmos/ibc-go/v8/testing" + ibctesting "github.com/cosmos/ibc-go/v10/testing" ) // GetIBCChain returns a TestChain instance for the given network. @@ -17,8 +17,6 @@ func (n *IntegrationNetwork) GetIBCChain(t *testing.T, coord *ibctesting.Coordin Coordinator: coord, ChainID: n.GetChainID(), App: n.app, - CurrentHeader: n.ctx.BlockHeader(), - QueryServer: n.app.GetIBCKeeper(), TxConfig: n.app.GetTxConfig(), Codec: n.app.AppCodec(), Vals: n.valSet, diff --git a/testutil/integration/exrp/upgrade/ibc.go b/testutil/integration/exrp/upgrade/ibc.go index 49be088..f42c086 100644 --- a/testutil/integration/exrp/upgrade/ibc.go +++ b/testutil/integration/exrp/upgrade/ibc.go @@ -5,7 +5,7 @@ package exrpupgrade import ( "testing" - ibctesting "github.com/cosmos/ibc-go/v8/testing" + ibctesting "github.com/cosmos/ibc-go/v10/testing" ) // GetIBCChain returns a TestChain instance for the given network. @@ -17,8 +17,6 @@ func (n *UpgradeIntegrationNetwork) GetIBCChain(t *testing.T, coord *ibctesting. Coordinator: coord, ChainID: n.GetChainID(), App: n.app, - CurrentHeader: n.ctx.BlockHeader(), - QueryServer: n.app.GetIBCKeeper(), TxConfig: n.app.GetTxConfig(), Codec: n.app.AppCodec(), Vals: n.valSet, From 1cbec1dbc914b92753a3d18edb064b7bc9f1373a Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 12 Aug 2025 16:36:47 +0200 Subject: [PATCH 14/66] chore: tidy dependencies --- go.mod | 30 +-- go.sum | 807 ++------------------------------------------------------- 2 files changed, 24 insertions(+), 813 deletions(-) diff --git a/go.mod b/go.mod index 60f6b33..989b832 100644 --- a/go.mod +++ b/go.mod @@ -22,9 +22,10 @@ require ( github.com/cosmos/cosmos-sdk v0.53.4 github.com/cosmos/evm v0.3.0 github.com/cosmos/gogoproto v1.7.0 + github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0 github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 - github.com/cosmos/ibc-go/v8 v8.7.0 + github.com/cosmos/ibc-go/v10 v10.3.0 github.com/ethereum/go-ethereum v1.15.11 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 @@ -53,7 +54,6 @@ require ( cosmossdk.io/collections v1.2.1 // indirect cosmossdk.io/depinject v1.2.1 // indirect cosmossdk.io/schema v1.1.0 // indirect - cosmossdk.io/x/circuit v0.1.1 // indirect cosmossdk.io/x/tx v0.14.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -64,11 +64,8 @@ require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // 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/alitto/pond v1.8.3 // indirect github.com/aws/aws-sdk-go v1.49.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect @@ -92,7 +89,6 @@ require ( github.com/cockroachdb/pebble v1.1.5 // indirect github.com/cockroachdb/redact v1.1.6 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect github.com/consensys/bavard v0.1.27 // indirect github.com/consensys/gnark-crypto v0.16.0 // indirect @@ -100,21 +96,15 @@ require ( github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.2 // indirect - github.com/cosmos/ibc-go/v10 v10.2.0 // indirect + github.com/cosmos/ibc-go/v8 v8.7.0 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect - github.com/cosmos/rosetta v0.50.9 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect github.com/creachadair/atomicfile v0.3.7 // indirect github.com/creachadair/tomledit v0.0.28 // indirect - github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20240722062311-8384cad72737 // indirect - github.com/crypto-org-chain/cronos/store v0.0.5-0.20240722062311-8384cad72737 // indirect - github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240722062311-8384cad72737 // indirect github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/deckarep/golang-set v1.8.0 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/desertbit/timer v1.0.1 // indirect @@ -124,7 +114,6 @@ require ( github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect - github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emicklei/dot v1.6.2 // indirect github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect @@ -133,7 +122,6 @@ require ( github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/getsentry/sentry-go v0.32.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-jose/go-jose/v4 v4.0.5 // indirect @@ -144,7 +132,6 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect - github.com/go-stack/stack v1.8.1 // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect @@ -164,7 +151,6 @@ require ( github.com/googleapis/gax-go/v2 v2.14.1 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.3 // 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-cleanhttp v0.5.2 // indirect @@ -193,7 +179,6 @@ require ( github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.8 // indirect github.com/manifoldco/promptui v0.9.0 // indirect @@ -204,7 +189,6 @@ require ( 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/mmcloughlin/addchain v0.4.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -225,11 +209,8 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.63.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/prometheus/tsdb v0.10.0 // indirect - github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rjeczalik/notify v0.9.3 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.11.1 // indirect github.com/rs/zerolog v1.34.0 // indirect @@ -240,7 +221,6 @@ require ( github.com/spf13/afero v1.12.0 // indirect github.com/spf13/viper v1.20.1 // indirect github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect - github.com/status-im/keycard-go v0.2.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.14 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -250,14 +230,11 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.2.5 // indirect - github.com/tidwall/tinylru v1.1.0 // indirect - github.com/tidwall/wal v1.1.7 // 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/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d // indirect github.com/zeebo/errs v1.4.0 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect @@ -287,7 +264,6 @@ require ( google.golang.org/api v0.222.0 // indirect google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.2 // indirect diff --git a/go.sum b/go.sum index 633a2ee..f620952 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,14 @@ -cel.dev/expr v0.20.0 h1:OunBvVCfvpWlt4dN7zg3FM6TDkzOePe1+foGJ9AXeeI= -cel.dev/expr v0.20.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= -cloud.google.com/go v0.0.0-20170206221025-ce650573d812/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -106,12 +101,8 @@ cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVo cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/auth v0.13.0 h1:8Fu8TZy167JkW8Tj3q7dIkr2v4cndv41ouecJx0PAHs= -cloud.google.com/go/auth v0.13.0/go.mod h1:COOjD9gwfKNKz+IIduatIhYJQIc0mG3H102r/EMxX6Q= cloud.google.com/go/auth v0.14.1 h1:AwoJbzUdxA/whv1qj3TLKwh3XX5sikny2fc40wUl+h0= cloud.google.com/go/auth v0.14.1/go.mod h1:4JHUxlGXisL0AW8kXPtUF6ztuOksyfUQNFjfsOCXkPM= -cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= -cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74z6cBk9Rw6M= cloud.google.com/go/auth/oauth2adapt v0.2.7/go.mod h1:NTbTTzfvPl1Y3V1nPpOgl2w6d/FjO7NNUQaWSox6ZMc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= @@ -142,7 +133,6 @@ cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/Zur cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= @@ -194,8 +184,6 @@ cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZ 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/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= -cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= @@ -292,7 +280,6 @@ cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCV cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= @@ -627,11 +614,8 @@ 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= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= cosmossdk.io/api v0.9.2 h1:9i9ptOBdmoIEVEVWLtYYHjxZonlF/aOVODLFaxpmNtg= cosmossdk.io/api v0.9.2/go.mod h1:CWt31nVohvoPMTlPv+mMNCtC0a7BqRdESjCsstHcTkU= -cosmossdk.io/client/v2 v2.0.0-beta.3 h1:+TTuH0DwQYsUq2JFAl3fDZzKq5gQG7nt3dAattkjFDU= -cosmossdk.io/client/v2 v2.0.0-beta.3/go.mod h1:CZcL41HpJPOOayTCO28j8weNBQprG+SRiKX39votypo= cosmossdk.io/client/v2 v2.0.0-beta.7 h1:O0PfZL5kC3Sp54wZASLNihQ612Gd6duMp11aM9wawNg= cosmossdk.io/client/v2 v2.0.0-beta.7/go.mod h1:TzwwrzeK+AfSVSESVEIOYO/9xuCh1fPv0HgeocmfVnM= cosmossdk.io/collections v1.2.1 h1:mAlNMs5vJwkda4TA+k5q/43p24RVAQ/qyDrjANu3BXE= @@ -654,67 +638,30 @@ 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/evidence v0.2.0 h1:o72zbmgCM7U0v7z7b0XnMB+NqX0tFamqb1HHkQbhrZ0= cosmossdk.io/x/evidence v0.2.0/go.mod h1:zx/Xqy+hnGVzkqVuVuvmP9KsO6YCl4SfbAetYi+k+sE= -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/feegrant v0.2.0 h1:oq3WVpoJdxko/XgWmpib63V1mYy9ZQN/1qxDajwGzJ8= cosmossdk.io/x/feegrant v0.2.0/go.mod h1:9CutZbmhulk/Yo6tQSVD5LG8Lk40ZAQ1OX4d1CODWAE= cosmossdk.io/x/tx v0.14.0 h1:hB3O25kIcyDW/7kMTLMaO8Ripj3yqs5imceVd6c/heA= cosmossdk.io/x/tx v0.14.0/go.mod h1:Tn30rSRA1PRfdGB3Yz55W4Sn6EIutr9xtMKSHij+9PM= -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= cosmossdk.io/x/upgrade v0.2.0 h1:ZHy0xny3wBCSLomyhE06+UmQHWO8cYlVYjfFAJxjz5g= cosmossdk.io/x/upgrade v0.2.0/go.mod h1:DXDtkvi//TrFyHWSOaeCZGBoiGAE6Rs8/0ABt2pcDD0= 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.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= -git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0/go.mod h1:ceIuwmxDWptoW3eCqSXlnPsZFKh4X+R38dWPv7GS9Vs= -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 v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= -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-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.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= 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/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -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/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= github.com/DataDog/datadog-go v4.8.3+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= github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190129172621-c8b1d7a94ddf/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 h1:f2Qw/Ehhimh5uO1fayV0QIW7DShEQqhtUfhYc+cBPlw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0/go.mod h1:2bIszWvQRlJVmJLiuLhukLImRjKPcYdzzsx6darK02A= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 h1:UQ0AhxogsIRZDkElkblfnwjc3IaltCm2HUMvezQaL7s= @@ -723,66 +670,44 @@ github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.1/go.mod h1:0wEl7vrAD8mehJyohS9HZy+WyEOaQO2mJx86Cvh93kM= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 h1:8nn+rsCvTq9axyEh382S0PFLBeaFwNsT43IrPWzctRU= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1/go.mod h1:viRWSEhtMZqz1rhwmOVKkWl6SwmVowfL9O2YR5gI2PE= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= 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= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -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.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= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20210923152817-c3b6e2f0c527/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alitto/pond v1.8.3 h1:ydIqygCLVPqIX/USe5EaV/aSRXTRXDEI9JwuDdu+/xs= -github.com/alitto/pond v1.8.3/go.mod h1:CmvIIGd5jKLasGI3D87qDkQxjzChdKMmnXMg3fG6M6Q= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= 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/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -790,34 +715,9 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l 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.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 v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY= github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/config v1.18.45/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/route53 v1.30.2/go.mod h1:TQZBt/WaQy+zTHoW++rnl8JBrmZ0VO6EUbVua1+foCA= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -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= @@ -828,27 +728,17 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4= github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= github.com/btcsuite/btcd v0.24.2 h1:aLmxPguqxza+4ag8R1I2nnJjSu2iFn/kqtHTIImswcY= github.com/btcsuite/btcd v0.24.2/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= 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.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= @@ -861,10 +751,7 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -874,7 +761,6 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= @@ -882,7 +768,6 @@ github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1 github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= 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= @@ -896,11 +781,9 @@ 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/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= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= 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-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= @@ -920,8 +803,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= 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.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/cloudflare/cloudflare-go v0.114.0/go.mod h1:O7fYfFfA6wKqKFn2QIR9lhj7FDw6VQCGOY6hd2TBtd0= github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= @@ -938,67 +819,40 @@ 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-20250121191232-2f005788dc42 h1:Om6kYQYDUk5wWbT0t0q6pvyM49i9XZAv9dDrkDA7gjk= -github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= 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/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= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= github.com/cockroachdb/errors v1.12.0 h1:d7oCs6vuIMUQRVbi6jWWWEJZahLCfJpnJSVobd1/sUo= github.com/cockroachdb/errors v1.12.0/go.mod h1:SvzfYNNBshAVbZ8wzNc/UPK3w1vf0dKDUP41ucAIf7g= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 h1:ASDL+UJcILMqgNeV5jiqR4j+sTuvQNHdf2chuKj1M5k= github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506/go.mod h1:Mw7HqKr2kdtu6aYGn3tPmAftiP3QPX63LdK/zcariIo= -github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/pebble v1.1.5 h1:5AAWCBWbat0uE0blr8qzufZP5tBjkRyy/jWe1QWLnvw= github.com/cockroachdb/pebble v1.1.5/go.mod h1:17wO9el1YEigxkP/YtV8NtCivQDgoCyBg5c4VR/eOWo= -github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/redact v1.1.6 h1:zXJBwDZ84xJNlHl1rMyCojqyIxv+7YUpQiJLQ7n4314= github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -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.38.17 h1:FkrQNbAjiFqXydeAO81FUzriL4Bz0abYxN/eOHrQGOk= github.com/cometbft/cometbft v0.38.17/go.mod h1:5l0SkgeLRXi6bBfQuevXjKqML1jjfJJlvI1Ulp02/o4= 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.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/bavard v0.1.27 h1:j6hKUrGAy/H+gpNrpLU3I26n1yc+VMGmd6ID5+gAhOs= github.com/consensys/bavard v0.1.27/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -github.com/consensys/gnark-crypto v0.13.0/go.mod h1:wKqwsieaKPThcFkHe0d0zMsbHEUWFmZcG7KBCse210o= github.com/consensys/gnark-crypto v0.16.0 h1:8Dl4eYmUWK9WmlP1Bj6je688gBRJCJbT8Mw4KoTAawo= github.com/consensys/gnark-crypto v0.16.0/go.mod h1:Ke3j06ndtPTVvo++PhGNgvm+lgpLvzbcE2MqljY7diU= -github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= -github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -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.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNCM= @@ -1007,8 +861,6 @@ github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+R github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/evm v0.3.0 h1:eXELtkofmbfuDvbUqpZdRYuXRdpn7tZd6EyXQfBTkzU= github.com/cosmos/evm v0.3.0/go.mod h1:5CXFoQfFcu5XfouVLcAm6uJnGg01hmmU20OLJ0gJgLY= -github.com/cosmos/evm v0.3.1 h1:Hj0c3wBZJGCZ8dd/5lVC0FLwooboycN2txeZkY9Zn+Q= -github.com/cosmos/evm v0.3.1/go.mod h1:hWf38CXlH6id8GAECtMo7Sg66q04kBlY5HZlPQ19LI8= 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/go-ethereum v1.15.11-cosmos-0 h1:a8C6CAL2ta06CYpI08a3jM1OdjRquYe4ur6JMjL35lQ= @@ -1020,12 +872,14 @@ github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fr 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-apps/modules/rate-limiting/v10 v10.1.0 h1:Wpa3gDW2tNxxdcUzVL6u34ltPF4tI3SnFP1IIOnlROw= +github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0/go.mod h1:0NWhkh5Ok8t/qHWOn8LUZsG5rTxhwQWyrsI3xu1/PO0= github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 h1:AQO9NIAP3RFqvBCj7IqM/V1LCxmuvcvGUdu0RIEz/c0= github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0/go.mod h1:/ZpKJSW/SKPkFS7jTqkPVn7kOHUUfRNzu+8aS7YOL8o= 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/v10 v10.2.0 h1:wlk/zqz2O0WRyE6UConoR1ci2HSW02P9ywamZCh5/N4= -github.com/cosmos/ibc-go/v10 v10.2.0/go.mod h1:ijeyJ1FDvXoc5w+rlhpMntjhZ558EF02SBFjroW1hPo= +github.com/cosmos/ibc-go/v10 v10.3.0 h1:w5DkHih8qn15deAeFoTk778WJU+xC1krJ5kDnicfUBc= +github.com/cosmos/ibc-go/v10 v10.3.0/go.mod h1:CthaR7n4d23PJJ7wZHegmNgbVcLXCQql7EwHrAXnMtw= github.com/cosmos/ibc-go/v8 v8.7.0 h1:HqhVOkO8bDpClXE81DFQgFjroQcTvtpm0tCS7SQVKVY= github.com/cosmos/ibc-go/v8 v8.7.0/go.mod h1:G2z+Q6ZQSMcyHI2+BVcJdvfOupb09M2h/tgpXOEdY6k= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= @@ -1034,57 +888,29 @@ github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= 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.9 h1:mV09lIDlEnbe8D1yuldY5GBjqk0ggkAbjbRQOrpoOIs= -github.com/cosmos/rosetta v0.50.9/go.mod h1:EYloh7qKmHpqiOB133k2WS6jqZsf3RIPLrVpFz48ZZU= -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 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -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.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI= github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= -github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= +github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= -github.com/creachadair/atomicfile v0.3.3 h1:yJlDq8qk9QmD/6ol+jq1X4bcoLNVdYq95+owOnauziE= -github.com/creachadair/atomicfile v0.3.3/go.mod h1:X1r9P4wigJlGkYJO1HXZREdkVn+b1yHrsBBMLSj7tak= github.com/creachadair/atomicfile v0.3.7 h1:wdg8+Isz07NDMi2yZQAoI1EKB9SxuDhvo5MUii/ZqlM= github.com/creachadair/atomicfile v0.3.7/go.mod h1:lUrZrE/XjMA7rJY/n8dF7/sSpy6KjtPaxPbrDambthA= -github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce h1:BFjvg2Oq88/2DOcUFu1ScIwKUn7KJYYvLr6AeuCJD54= -github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce/go.mod h1:okn1ft6DY+qjPmnvYynyq7ufIQKJ2x2qwOCJZecei1k= -github.com/creachadair/tomledit v0.0.26 h1:MoDdgHIHZ5PctBVsAZDjxdxreWUEa9ObPKTRkk5PPwA= -github.com/creachadair/tomledit v0.0.26/go.mod h1:SJi1OxKpMyR141tq1lzsbPtIg3j8TeVPM/ZftfieD7o= +github.com/creachadair/mds v0.22.1 h1:Wink9jeYR7brBbOkOTVZVrd6vyb5W4ZBRhlZd96TSgU= +github.com/creachadair/mds v0.22.1/go.mod h1:ArfS0vPHoLV/SzuIzoqTEZfoYmac7n9Cj8XPANHocvw= github.com/creachadair/tomledit v0.0.28 h1:aQJVwcNTzx4SZ/tSbkyGE69w4YQ6Gn+xhHHKtqMZwuw= github.com/creachadair/tomledit v0.0.28/go.mod h1:pqb2HRQi0lMu6MBiUmTk/0XQ+SmPtq2QbUrG+eiLP5w= 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/crypto-org-chain/cronos/memiavl v0.0.5-0.20240722062311-8384cad72737 h1:9jyWTnpgelwEvTRFkRxDIn/WBuj8pO4WcWYLbh/fi2k= -github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20240722062311-8384cad72737/go.mod h1:gHpd4PhJt1BpjfN3PfChzv+9olZ2yVKDoyiIhMk9VFQ= -github.com/crypto-org-chain/cronos/store v0.0.5-0.20240722062311-8384cad72737 h1:KcTmL7lmVr306/7QiBFvgy6mVQuRTdYJc9dP21VuT5s= -github.com/crypto-org-chain/cronos/store v0.0.5-0.20240722062311-8384cad72737/go.mod h1:c4IGVc3Cp6ItRsn3JMDaQ6Xs+YiLTwW25V+F+Lr7G8g= -github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240722062311-8384cad72737 h1:JbP8x7qQg4uClGLipVDy+/WczyxZOqgiFMeOTtcQdCM= -github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240722062311-8384cad72737/go.mod h1:Ze4jRQgCqQL5j38T6m42oxjYM0VZ1bLOcjaUx6gxhLc= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= -github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= -github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= 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/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= @@ -1094,44 +920,26 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeC github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= 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/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -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/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo= github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE= -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= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= 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/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 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= 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/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 h1:kgvzE5wLsLa7XKfV85VZl40QXaMCaeFtHpPwJ8fhotY= -github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= -github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= @@ -1140,18 +948,12 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= -github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= -github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -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= @@ -1182,25 +984,12 @@ github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0 github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E= github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= -github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe h1:CKvjP3CcWckOiwffAARb9qe+t0+VWoVDiicYkQMvZfQ= -github.com/evmos/cosmos-sdk/store v0.0.0-20240718141609-414cbd051fbe/go.mod h1:Bm6h8ZkYgVTytHK5vhHOMKw9OHyiumm3b1UbkYIJ/Ug= -github.com/evmos/go-ethereum v1.10.26-evmos-rc4 h1:vwDVMScuB2KSu8ze5oWUuxm6v3bMUp6dL3PWvJNJY+I= -github.com/evmos/go-ethereum v1.10.26-evmos-rc4/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= 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/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= 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= -github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/fjl/gencodec v0.1.0/go.mod h1:Um1dFHPONZGTHog1qD1NaWjXJW/SPB38wPv0O8uZ2fI= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -1211,27 +1000,15 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/getsentry/sentry-go v0.32.0 h1:YKs+//QmwE3DcYtfKRH8/KyOOF/I6Qnx7qYGNHCGmCY= github.com/getsentry/sentry-go v0.32.0/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= @@ -1242,8 +1019,6 @@ github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmn 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-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= -github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE= github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -1262,61 +1037,37 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= 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.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/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= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -1327,26 +1078,13 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= -github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1384,26 +1122,14 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e h1:4bw4WeyTYPp0smaXiJZCNnLrvVBqirQVreixayXezGc= github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= -github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= -github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= -github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= -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.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= -github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -1425,10 +1151,8 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -1453,27 +1177,18 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= -github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= -github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= -github.com/google/safehtml v0.0.2/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1484,7 +1199,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5 github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= -github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1501,34 +1215,23 @@ github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEP 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/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= 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.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= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -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/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= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= 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= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -1538,21 +1241,13 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 h1:dygLcbEBA+t/P7ck6a8AkXv6juQ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2/go.mod h1:Ap9RLCIJVtgQg1/BBgVEfypOAySvvlcpcVQkSzJCH4Y= 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/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= -github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-getter v1.7.8 h1:mshVHx1Fto0/MydBekWan5zUipGq7jO0novchgMmSiY= github.com/hashicorp/go-getter v1.7.8/go.mod h1:2c6CboOEb9jG6YvmC9xdD+tyAFsrUaJPedwXDGr0TM4= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= @@ -1574,9 +1269,8 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX 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/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-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/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/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= @@ -1584,12 +1278,10 @@ github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 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/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/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= @@ -1598,12 +1290,8 @@ github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8 github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4= -github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -1612,44 +1300,22 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.1 h1:dTi93MgjwErA/8idWTzIw4Y1kZsMWx35fmI2c8Rij7w= github.com/huandu/skiplist v1.2.1/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= -github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -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= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= -github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -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.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= @@ -1662,7 +1328,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -1674,49 +1339,28 @@ github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52/go.mod h1:qk1sX/IBgppQNcGCRoj90u6EGC056EBoIc1oEjCWla8= -github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= -github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= -github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= -github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= -github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= -github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= -github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= -github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= 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.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -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/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= 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= @@ -1731,94 +1375,53 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= -github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 h1:LGEzZvf33Y1NhuP5+jI/ni9l1TFS6oYPDilgy74NusM= -github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263/go.mod h1:OXgMDuUo2lZ3NpH29ZvMYbk+LxFd5ffDl2Z2mGMuY/I= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= 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.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= -github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/linxGnu/grocksdb v1.9.8 h1:vOIKv9/+HKiqJAElJIEYv3ZLcihRxyP7Suu/Mu8Dxjs= github.com/linxGnu/grocksdb v1.9.8/go.mod h1:C3CNe9UYc9hlEM2pC82AqiGS3LRW537u9LFV4wIZuHk= -github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= 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/mdp/qrterminal/v3 v3.2.1 h1:6+yQjiiOsSuXT5n9/m60E54vdgFsw0zhADHhHLrFet4= github.com/mdp/qrterminal/v3 v3.2.1/go.mod h1:jOTmXvnBsMy5xqLniO0R++Jmjs2sTm9dFSuQ5kpz/SU= -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/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/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= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1826,18 +1429,10 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= @@ -1846,10 +1441,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= 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= @@ -1858,26 +1449,15 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW 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= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.19.0/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA= -github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= @@ -1886,58 +1466,33 @@ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtb 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= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= -github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= -github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= -github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= -github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= -github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= -github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= -github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= +github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= -github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= -github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= -github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= -github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= -github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= -github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= +github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= +github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= -github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= -github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +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= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= @@ -1949,20 +1504,13 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= 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/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= 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= @@ -1975,17 +1523,12 @@ github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= -github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg= github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= -github.com/pion/transport v0.13.1 h1:/UH5yLeQtwm2VZIPjxwnNFxjS4DFhyLfS4GlfuKUzfA= github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1994,26 +1537,19 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= 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.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -2022,62 +1558,40 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 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.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= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 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.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= 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= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 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.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/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= -github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -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= -github.com/protolambda/zrnt v0.34.1/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= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= -github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -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.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -2086,10 +1600,7 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -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= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= @@ -2097,76 +1608,44 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo= github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k= 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.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/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= 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= -github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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/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= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= 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.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= github.com/spf13/pflag v1.0.7/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.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -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= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -2176,9 +1655,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -2192,109 +1668,46 @@ 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/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.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= 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.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8= -github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= -github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= -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.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -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= -github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94= -github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I= -github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= -github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= -github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/cli/v2 v2.10.2 h1:x3p8awjp/2arX+Nl/G2040AZpOCHS/eMJJ1/a+mye4Y= -github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= -github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= -github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 h1:D94e6BQmJlnS51qQqrMcpbJ32PdVkipH1hK7m2bMQAo= github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1/go.mod h1:7U3+WHZtI44dEOnU46+lDzBb2tFh1QlMvi8Z5JugopI= -github.com/xrplevm/evmos/v20 v20.0.0-exrp.7 h1:LhaLbm3HoDWxjeblfbFnWvkIdZpcf3ULhaj9tRsetiA= -github.com/xrplevm/evmos/v20 v20.0.0-exrp.7/go.mod h1:QslHUHSn613wH4l2axRfoyUxBu+OjyqwbNUM3XW8QsM= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -2302,9 +1715,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d h1:XQyeLr7N9iY9mi+TGgsBFkj54+j3fdoo8e2u6zrGP5A= -github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d/go.mod h1:hoMeDjlNXTNqVwrCk8YDyaBS2g5vFfEX2ezMi4vb6CY= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= @@ -2313,18 +1723,10 @@ github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= -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.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/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -2338,38 +1740,22 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/detectors/gcp v1.34.0 h1:JRxssobiPg23otYU5SbWtQC//snGVIM3Tx6QRzlQBao= -go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQmF0PRsq8w/lMGzdbCSveBHo= go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -2379,8 +1765,6 @@ 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.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/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -2392,10 +1776,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i 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.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= @@ -2408,48 +1790,25 @@ golang.org/x/arch v0.15.0/go.mod h1:JmwW7aLIoRUKgaTzhkiEFxvcEiQGyOg9BMonBJUS7EE= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -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= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= 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.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= 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.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= -golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= -golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2467,9 +1826,7 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 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-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= @@ -2510,19 +1867,13 @@ 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= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2535,11 +1886,9 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2563,25 +1912,19 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -2594,9 +1937,7 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -2604,19 +1945,13 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= 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.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= 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.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -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= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2628,7 +1963,6 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -2643,16 +1977,12 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= 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.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= -golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= -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= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2673,24 +2003,17 @@ 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.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= golang.org/x/sync v0.16.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= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -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= @@ -2698,9 +2021,7 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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= @@ -2712,7 +2033,6 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2732,16 +2052,11 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2749,12 +2064,8 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2762,7 +2073,6 @@ golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2774,20 +2084,16 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc 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= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2795,13 +2101,10 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc 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= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2811,28 +2114,18 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.15.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.20.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.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= -golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= -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= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= @@ -2840,18 +2133,11 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -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.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= 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.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= -golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2870,31 +2156,20 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -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.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= -golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2922,17 +2197,14 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn 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-20191112195655-aa38f8e97acc/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= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191126055441-b0650ceb63d9/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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= @@ -2957,8 +2229,6 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2968,22 +2238,15 @@ 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= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= 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.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= -golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= -golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= 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= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2993,18 +2256,13 @@ golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNq golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= 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= gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= -gonum.org/v1/plot v0.10.0/go.mod h1:JWIHJ7U20drSQb/aDpTetJzfC1KlAPldJLpkSy88dvQ= gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= -google.golang.org/api v0.0.0-20170206182103-3d017632ea10/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -3027,7 +2285,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= @@ -3064,8 +2321,6 @@ 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.215.0 h1:jdYF4qnyczlEz2ReWIsosNLDuzXyvFHJtI5gcr0J7t0= -google.golang.org/api v0.215.0/go.mod h1:fta3CVtuJYOEdugLNWm6WodzOS8KdFckABwN4I40hzY= google.golang.org/api v0.222.0 h1:Aiewy7BKLCuq6cUCeOUrsAlzjXPqBkEeQ/iwGHVQa/4= google.golang.org/api v0.222.0/go.mod h1:efZia3nXpWELrwMlN5vyQrD4GmJN1Vw0x68Et3r+a9c= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -3076,7 +2331,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/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= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -3084,7 +2338,6 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -3092,7 +2345,6 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -3189,7 +2441,6 @@ google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= @@ -3223,8 +2474,6 @@ google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1: google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -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= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -3272,8 +2521,6 @@ 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.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= -google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -3292,18 +2539,15 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 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/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 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= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -3312,11 +2556,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -3333,7 +2572,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -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/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= @@ -3381,10 +2619,7 @@ modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= 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/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= -nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= From d638f561e75819238c2272c38f27f0382263dd58 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 13 Aug 2025 13:38:15 +0200 Subject: [PATCH 15/66] fix: imports + root command wiring --- Makefile | 4 +- app/ante.go | 10 +- app/app.go | 26 ++-- app/precompiles.go | 2 - app/upgrades.go | 28 ---- app/upgrades/v4/constants.go | 6 - app/upgrades/v4/upgrades.go | 161 ---------------------- cmd/exrpd/cmd/root.go | 4 + go.mod | 6 +- go.sum | 10 -- testutil/integration/exrp/common/setup.go | 21 ++- 11 files changed, 46 insertions(+), 232 deletions(-) delete mode 100644 app/upgrades/v4/constants.go delete mode 100644 app/upgrades/v4/upgrades.go diff --git a/Makefile b/Makefile index 5af857e..c0d074c 100644 --- a/Makefile +++ b/Makefile @@ -144,11 +144,11 @@ test: test-poa test-integration test-upgrade test-sim-benchmark-simulation test- test-upgrade: @echo "--> Running upgrade testsuite" - @go test -mod=readonly -v ./tests/upgrade + @go test -mod=readonly -tags=test -v ./tests/upgrade test-integration: @echo "--> Running integration testsuite" - @go test -mod=readonly -v ./tests/integration + @go test -mod=readonly -tags=test -v ./tests/integration test-poa: @echo "--> Running POA tests" diff --git a/app/ante.go b/app/ante.go index 0c53a50..128e6cc 100644 --- a/app/ante.go +++ b/app/ante.go @@ -9,10 +9,10 @@ import ( type HandlerOptions struct { evmante.HandlerOptions - StakingKeeper StakingKeeper - DistributionKeeper DistributionKeeper - ExtraDecorator sdk.AnteDecorator - AuthzDisabledMsgTypes []string + StakingKeeper StakingKeeper + DistributionKeeper DistributionKeeper + ExtraDecorator sdk.AnteDecorator + AuthzDisabledMsgTypes []string } // Validate checks if the keepers are defined @@ -28,4 +28,4 @@ func (options *HandlerOptions) Validate() error { func NewAnteHandler(options HandlerOptions) sdk.AnteHandler { return evmante.NewAnteHandler(options.HandlerOptions) -} \ No newline at end of file +} diff --git a/app/app.go b/app/app.go index 293ab6d..85b163d 100644 --- a/app/app.go +++ b/app/app.go @@ -110,7 +110,6 @@ 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" - evmostypes "github.com/cosmos/evm/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/keeper" @@ -340,7 +339,7 @@ func New( appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), // TODO: Update when replacing with forked cosmos/evm version is installed - evmostypes.ProtoAccount, + etherminttypes.ProtoAccount, maccPerms, authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), sdk.Bech32PrefixAccAddr, @@ -571,7 +570,6 @@ func New( app.DistrKeeper, app.BankKeeper, app.Erc20Keeper, - app.AuthzKeeper, app.TransferKeeper, *app.IBCKeeper.ChannelKeeper, app.EvmKeeper, @@ -851,16 +849,16 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { EvmKeeper: app.EvmKeeper, FeegrantKeeper: app.FeeGrantKeeper, // TODO: Update when migrating to v10 - IBCKeeper: app.IBCKeeper, - FeeMarketKeeper: app.FeeMarketKeeper, - SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: maxGasWanted, - TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), + IBCKeeper: app.IBCKeeper, + FeeMarketKeeper: app.FeeMarketKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: maxGasWanted, + TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), }, - StakingKeeper: app.StakingKeeper, - DistributionKeeper: app.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + StakingKeeper: app.StakingKeeper, + DistributionKeeper: app.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), @@ -947,7 +945,7 @@ func (app *App) BlockedModuleAccountAddrs() map[string]bool { } blockedPrecompilesHex := evmtypes.AvailableStaticPrecompiles - for _, addr := range vm.PrecompiledAddressesPrague{ + for _, addr := range vm.PrecompiledAddressesPrague { blockedPrecompilesHex = append(blockedPrecompilesHex, addr.Hex()) } @@ -975,7 +973,7 @@ func (app *App) AppCodec() codec.Codec { } // DefaultGenesis returns a default genesis from the registered AppModuleBasic's. -func (app *App) DefaultGenesis() evmostypes.GenesisState { +func (app *App) DefaultGenesis() etherminttypes.GenesisState { return app.BasicModuleManager.DefaultGenesis(app.appCodec) } diff --git a/app/precompiles.go b/app/precompiles.go index 8d2a7b0..551ec24 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -6,7 +6,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -35,7 +34,6 @@ func NewAvailableStaticPrecompiles( distributionKeeper distributionkeeper.Keeper, bankKeeper bankkeeper.Keeper, erc20Keeper erc20Keeper.Keeper, - authzKeeper authzkeeper.Keeper, transferKeeper transferkeeper.Keeper, channelKeeper channelkeeper.Keeper, evmKeeper *evmkeeper.Keeper, diff --git a/app/upgrades.go b/app/upgrades.go index 3bd8365..364e58f 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -5,11 +5,6 @@ import ( storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" - icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types" - v4 "github.com/xrplevm/node/v8/app/upgrades/v4" v5 "github.com/xrplevm/node/v8/app/upgrades/v5" v6 "github.com/xrplevm/node/v8/app/upgrades/v6" v7 "github.com/xrplevm/node/v8/app/upgrades/v7" @@ -17,21 +12,6 @@ import ( ) func (app *App) setupUpgradeHandlers() { - authAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - app.UpgradeKeeper.SetUpgradeHandler( - v4.UpgradeName, - v4.CreateUpgradeHandler( - app.mm, - app.configurator, - app.appCodec, - app.GetKey("upgrade"), - app.ConsensusParamsKeeper, - authAddr, - app.EvmKeeper, - app.Erc20Keeper, - app.GovKeeper, - ), - ) app.UpgradeKeeper.SetUpgradeHandler( v5.UpgradeName, v5.CreateUpgradeHandler( @@ -76,14 +56,6 @@ func (app *App) setupUpgradeHandlers() { var storeUpgrades *storetypes.StoreUpgrades switch upgradeInfo.Name { - case v4.UpgradeName: - storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{ - icahosttypes.StoreKey, - ratelimittypes.ModuleName, - }, - Deleted: []string{}, - } case v5.UpgradeName, v6.UpgradeName: // No store upgrades for v5 storeUpgrades = &storetypes.StoreUpgrades{} diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go deleted file mode 100644 index e3606de..0000000 --- a/app/upgrades/v4/constants.go +++ /dev/null @@ -1,6 +0,0 @@ -package v4 - -const ( - // UpgradeName is the shared upgrade plan name for mainnet - UpgradeName = "v4.0.0" -) diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go deleted file mode 100644 index d838d73..0000000 --- a/app/upgrades/v4/upgrades.go +++ /dev/null @@ -1,161 +0,0 @@ -package v4 - -import ( - "context" - "errors" - - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - upgradetypes "cosmossdk.io/x/upgrade/types" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/runtime" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - consensusparamskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - erc20keeper "github.com/cosmos/evm/x/erc20/keeper" - erc20types "github.com/cosmos/evm/x/erc20/types" - evmkeeper "github.com/cosmos/evm/x/vm/keeper" - "github.com/cosmos/evm/x/vm/types" -) - -const ( - XrpAddress = "0xD4949664cD82660AaE99bEdc034a0deA8A0bd517" - XrpOwnerAddress = "ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2" -) - -// CreateUpgradeHandler creates an SDK upgrade handler for v13 -func CreateUpgradeHandler( - mm *module.Manager, - configurator module.Configurator, - cdc codec.Codec, - upgradeKey *storetypes.KVStoreKey, - consensusParamsKeeper consensusparamskeeper.Keeper, - authAddr string, - ek *evmkeeper.Keeper, - erc20k erc20keeper.Keeper, - gk govkeeper.Keeper, -) upgradetypes.UpgradeHandler { - return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - ctx := sdk.UnwrapSDKContext(c) - logger := ctx.Logger().With("upgrade", UpgradeName) - - // Fix previous consensusparams upgrade - logger.Info("Fixing previous consensusparams upgrade...") - storesvc := runtime.NewKVStoreService(upgradeKey) - consensuskeeper := consensusparamskeeper.NewKeeper( - cdc, - storesvc, - authAddr, - runtime.EventService{}, - ) - consensusParams, err := consensuskeeper.ParamsStore.Get(ctx) - if err != nil { - return nil, err - } - err = consensusParamsKeeper.ParamsStore.Set(ctx, consensusParams) - if err != nil { - return nil, err - } - - logger.Debug("Enabling gov precompile...") - if err := EnableGovPrecompile(ctx, ek); err != nil { - logger.Error("error while enabling gov precompile", "error", err.Error()) - } - - // run the sdk v0.50 migrations - logger.Debug("Running module migrations...") - vm, err = mm.RunMigrations(ctx, configurator, vm) - if err != nil { - return vm, err - } - - logger.Debug("Updating expedited prop params...") - if err := UpdateExpeditedPropsParams(ctx, gk); err != nil { - logger.Error("error while updating gov params", "error", err.Error()) - } - - logger.Debug("Assigning XRP owner address...") - err = AssignXrpOwnerAddress(ctx, erc20k, sdk.MustAccAddressFromBech32(XrpOwnerAddress)) - if err != nil { - logger.Error("error while assigning XRP owner address", "error", err.Error()) - return vm, err - } - - err = AddCodeToERC20Extensions(ctx, logger, erc20k) - if err != nil { - logger.Error("error while adding code hashes", "error", err.Error()) - return vm, err - } - return vm, nil - } -} - -func EnableGovPrecompile(ctx sdk.Context, ek *evmkeeper.Keeper) error { - // Enable gov precompile - params := ek.GetParams(ctx) - params.ActiveStaticPrecompiles = append(params.ActiveStaticPrecompiles, types.GovPrecompileAddress) - if err := params.Validate(); err != nil { - return err - } - return ek.SetParams(ctx, params) -} - -func UpdateExpeditedPropsParams(ctx sdk.Context, gk govkeeper.Keeper) error { - params, err := gk.Params.Get(ctx) - if err != nil { - return err - } - - // use the same denom as the min deposit denom - // also amount must be greater than MinDeposit amount - denom := params.MinDeposit[0].Denom - expDepAmt := params.ExpeditedMinDeposit[0].Amount - if expDepAmt.LTE(params.MinDeposit[0].Amount) { - expDepAmt = params.MinDeposit[0].Amount.MulRaw(govv1.DefaultMinExpeditedDepositTokensRatio) - } - params.ExpeditedMinDeposit = sdk.NewCoins(sdk.NewCoin(denom, expDepAmt)) - - // if expedited voting period > voting period - // set expedited voting period to be half the voting period - if params.ExpeditedVotingPeriod != nil && params.VotingPeriod != nil && *params.ExpeditedVotingPeriod > *params.VotingPeriod { - expPeriod := *params.VotingPeriod / 2 - params.ExpeditedVotingPeriod = &expPeriod - } - - if err := params.ValidateBasic(); err != nil { - return err - } - return gk.Params.Set(ctx, params) -} - -func AssignXrpOwnerAddress(ctx sdk.Context, ek erc20keeper.Keeper, address sdk.AccAddress) error { - tokenPairID := ek.GetTokenPairID(ctx, XrpAddress) - tokenPair, found := ek.GetTokenPair(ctx, tokenPairID) - if !found { - return errors.New("token pair not found") - } - // TODO: Should autofix when replacing with forked cosmos/evm version is installed - ek.SetTokenPairOwnerAddress(ctx, tokenPair, address.String()) - return nil -} - -// AddCodeToERC20Extensions adds code and code hash to the ERC20 precompiles with the EVM. -func AddCodeToERC20Extensions( - ctx sdk.Context, - logger log.Logger, - erc20Keeper erc20keeper.Keeper, -) (err error) { - logger.Info("Adding code to erc20 extensions...") - - erc20Keeper.IterateTokenPairs(ctx, func(tokenPair erc20types.TokenPair) bool { - logger.Info("Adding code to erc20 extensions", "tokenPair", tokenPair) - err = erc20Keeper.RegisterERC20CodeHash(ctx, tokenPair.GetERC20Contract()) - return err != nil - }) - - logger.Info("Done with erc20 extensions") - return err -} diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 8aa44a5..11e2356 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -168,6 +168,10 @@ func initRootCmd( a := appCreator{encodingConfig} rootCmd.AddCommand( + genutilcli.InitCmd( + tempApp.BasicModuleManager, + app.DefaultNodeHome, + ), genutilcli.CollectGenTxsCmd( banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, diff --git a/go.mod b/go.mod index 989b832..023b9d2 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,6 @@ require ( github.com/cosmos/evm v0.3.0 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0 - github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/v10 v10.3.0 github.com/ethereum/go-ethereum v1.15.11 @@ -96,7 +95,6 @@ require ( github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.2 // indirect - github.com/cosmos/ibc-go/v8 v8.7.0 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect @@ -280,10 +278,12 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // use Cosmos-SDK fork to enable Ledger functionality - github.com/cosmos/cosmos-sdk => github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 + github.com/cosmos/cosmos-sdk => ../cosmos-sdk // map cosmos/evm to evmos // fix cosmos-sdk store path mismatch github.com/cosmos/cosmos-sdk/store => cosmossdk.io/store v1.1.2 + // TODO: remove this once we have a proper fork of cosmos/evm + github.com/cosmos/evm => ../evm // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v1.15.11-cosmos-0 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq diff --git a/go.sum b/go.sum index f620952..e6c1db1 100644 --- a/go.sum +++ b/go.sum @@ -636,8 +636,6 @@ cosmossdk.io/store v1.1.2 h1:3HOZG8+CuThREKv6cn3WSohAc6yccxO3hLzwK6rBC7o= cosmossdk.io/store v1.1.2/go.mod h1:60rAGzTHevGm592kFhiUVkNC9w7gooSEn5iUBPzHQ6A= 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.2.0 h1:o72zbmgCM7U0v7z7b0XnMB+NqX0tFamqb1HHkQbhrZ0= cosmossdk.io/x/evidence v0.2.0/go.mod h1:zx/Xqy+hnGVzkqVuVuvmP9KsO6YCl4SfbAetYi+k+sE= cosmossdk.io/x/feegrant v0.2.0 h1:oq3WVpoJdxko/XgWmpib63V1mYy9ZQN/1qxDajwGzJ8= @@ -859,8 +857,6 @@ github.com/cosmos/cosmos-db v1.1.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNC 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/evm v0.3.0 h1:eXELtkofmbfuDvbUqpZdRYuXRdpn7tZd6EyXQfBTkzU= -github.com/cosmos/evm v0.3.0/go.mod h1:5CXFoQfFcu5XfouVLcAm6uJnGg01hmmU20OLJ0gJgLY= 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/go-ethereum v1.15.11-cosmos-0 h1:a8C6CAL2ta06CYpI08a3jM1OdjRquYe4ur6JMjL35lQ= @@ -874,14 +870,10 @@ 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-apps/modules/rate-limiting/v10 v10.1.0 h1:Wpa3gDW2tNxxdcUzVL6u34ltPF4tI3SnFP1IIOnlROw= github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0/go.mod h1:0NWhkh5Ok8t/qHWOn8LUZsG5rTxhwQWyrsI3xu1/PO0= -github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 h1:AQO9NIAP3RFqvBCj7IqM/V1LCxmuvcvGUdu0RIEz/c0= -github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0/go.mod h1:/ZpKJSW/SKPkFS7jTqkPVn7kOHUUfRNzu+8aS7YOL8o= 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/v10 v10.3.0 h1:w5DkHih8qn15deAeFoTk778WJU+xC1krJ5kDnicfUBc= github.com/cosmos/ibc-go/v10 v10.3.0/go.mod h1:CthaR7n4d23PJJ7wZHegmNgbVcLXCQql7EwHrAXnMtw= -github.com/cosmos/ibc-go/v8 v8.7.0 h1:HqhVOkO8bDpClXE81DFQgFjroQcTvtpm0tCS7SQVKVY= -github.com/cosmos/ibc-go/v8 v8.7.0/go.mod h1:G2z+Q6ZQSMcyHI2+BVcJdvfOupb09M2h/tgpXOEdY6k= 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/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= @@ -1706,8 +1698,6 @@ github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1 h1:D94e6BQmJlnS51qQqrMcpbJ32PdVkipH1hK7m2bMQAo= -github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.1/go.mod h1:7U3+WHZtI44dEOnU46+lDzBb2tFh1QlMvi8Z5JugopI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index 2afe7fc..c2ca2c0 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -110,7 +110,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp appOptions := simutils.NewAppOptionsWithFlagHome(homePath) baseAppOptions := append(customBaseAppOptions, baseapp.SetChainID(chainID)) //nolint:gocritic - return app.New( + exrpApp := app.New( logger, db, nil, @@ -122,4 +122,23 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp appOptions, baseAppOptions..., ) + + // Initialize EVM chain configuration for integration tests + evmConfigurator := evmtypes.NewEVMConfigurator() + // Reset configuration for test environments to allow multiple app instances + evmConfigurator.ResetTestConfig() + + // Configure EVM coin info with the proper denom + coinInfo := evmtypes.EvmCoinInfo{ + Denom: app.BaseDenom, + ExtendedDenom: app.BaseDenom, + DisplayDenom: app.DisplayDenom, + Decimals: evmtypes.EighteenDecimals, + } + err := evmConfigurator.WithEVMCoinInfo(coinInfo).Configure() + if err != nil { + panic(fmt.Sprintf("failed to configure EVM: %v", err)) + } + + return exrpApp } From cd56e8ac49adbad3a4bf9e18410296aadce391f7 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 14 Aug 2025 17:55:27 +0200 Subject: [PATCH 16/66] feat(app): setup ante handler with cosmos + evm extensions --- app/ante.go | 30 --------- app/ante/ante.go | 51 ++++++++++++++ app/ante/ante_cosmos.go | 35 ++++++++++ app/ante/ante_evm.go | 18 +++++ app/ante/handler_options.go | 65 ++++++++++++++++++ .../interfaces.go} | 2 +- app/app.go | 62 ++++++++++------- app/config.go | 66 +++++++++++++++++++ app/precompiles.go | 1 - 9 files changed, 275 insertions(+), 55 deletions(-) create mode 100644 app/ante/ante.go create mode 100644 app/ante/ante_cosmos.go create mode 100644 app/ante/ante_evm.go create mode 100644 app/ante/handler_options.go rename app/{ante_interfaces.go => ante/interfaces.go} (98%) create mode 100644 app/config.go diff --git a/app/ante.go b/app/ante.go index 128e6cc..4879f7a 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,31 +1 @@ package app - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - evmante "github.com/cosmos/evm/evmd/ante" -) - -type HandlerOptions struct { - evmante.HandlerOptions - StakingKeeper StakingKeeper - DistributionKeeper DistributionKeeper - ExtraDecorator sdk.AnteDecorator - AuthzDisabledMsgTypes []string -} - -// Validate checks if the keepers are defined -func (options *HandlerOptions) Validate() error { - if options.StakingKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "staking keeper is required for AnteHandler") - } - if options.DistributionKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "distribution keeper is required for AnteHandler") - } - return options.HandlerOptions.Validate() -} - -func NewAnteHandler(options HandlerOptions) sdk.AnteHandler { - return evmante.NewAnteHandler(options.HandlerOptions) -} diff --git a/app/ante/ante.go b/app/ante/ante.go new file mode 100644 index 0000000..a2c3916 --- /dev/null +++ b/app/ante/ante.go @@ -0,0 +1,51 @@ +package ante + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" +) + +// NewAnteHandler routes Ethereum or SDK transactions to the appropriate handler +func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { + if err := options.Validate(); err != nil { + return nil, err + } + + return func(ctx sdk.Context, tx sdk.Tx, sim bool) (newCtx sdk.Context, err error) { + var anteHandler sdk.AnteHandler + + txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx) + if ok { + opts := txWithExtensions.GetExtensionOptions() + if len(opts) > 0 { + switch typeURL := opts[0].GetTypeUrl(); typeURL { + case "/cosmos.evm.vm.v1.ExtensionOptionsEthereumTx": + // handle as *evmtypes.MsgEthereumTx + anteHandler = newMonoEVMAnteHandler(options) + case "/cosmos.evm.types.v1.ExtensionOptionDynamicFeeTx": + // cosmos-sdk tx with dynamic fee extension + anteHandler = newCosmosAnteHandler(options) + default: + return ctx, errorsmod.Wrapf( + errortypes.ErrUnknownExtensionOptions, + "rejecting tx with unsupported extension option: %s", typeURL, + ) + } + + return anteHandler(ctx, tx, sim) + } + } + + // handle as totally normal Cosmos SDK tx + switch tx.(type) { + case sdk.Tx: + anteHandler = newCosmosAnteHandler(options) + default: + return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid transaction type: %T", tx) + } + + return anteHandler(ctx, tx, sim) + }, nil +} diff --git a/app/ante/ante_cosmos.go b/app/ante/ante_cosmos.go new file mode 100644 index 0000000..9baf6fe --- /dev/null +++ b/app/ante/ante_cosmos.go @@ -0,0 +1,35 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante" + + cosmosante "github.com/cosmos/cosmos-sdk/x/auth/ante" + evmante "github.com/cosmos/evm/ante/evm" +) + +// newCosmosAnteHandler creates the default SDK ante handler for Cosmos transactions +func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { + return sdk.ChainAnteDecorators( + ante.NewSetUpContextDecorator(), + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), + cosmosante.NewValidateBasicDecorator(), + ante.NewTxTimeoutHeightDecorator(), + ante.NewValidateMemoDecorator(options.AccountKeeper), + ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + cosmosante.NewDeductFeeDecorator( + options.AccountKeeper, + options.BankKeeper, + options.FeegrantKeeper, + options.TxFeeChecker, + ), + ante.NewSetPubKeyDecorator(options.AccountKeeper), + ante.NewValidateSigCountDecorator(options.AccountKeeper), + ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), + ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + ante.NewIncrementSequenceDecorator(options.AccountKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), + evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), + ) +} diff --git a/app/ante/ante_evm.go b/app/ante/ante_evm.go new file mode 100644 index 0000000..9fd759a --- /dev/null +++ b/app/ante/ante_evm.go @@ -0,0 +1,18 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + evmante "github.com/cosmos/evm/ante/evm" +) + +// newMonoEVMAnteHandler creates the sdk.AnteHandler for EVM transactions +func newMonoEVMAnteHandler(options HandlerOptions) sdk.AnteHandler { + return sdk.ChainAnteDecorators( + evmante.NewEVMMonoDecorator( + options.AccountKeeper, + options.FeeMarketKeeper, + options.EvmKeeper, + options.MaxTxGasWanted, + ), + ) +} diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go new file mode 100644 index 0000000..92c7558 --- /dev/null +++ b/app/ante/handler_options.go @@ -0,0 +1,65 @@ +package ante + +import ( + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" + + txsigning "cosmossdk.io/x/tx/signing" + + anteinterfaces "github.com/cosmos/evm/ante/interfaces" +) + +type HandlerOptions struct { + Cdc codec.BinaryCodec + AccountKeeper anteinterfaces.AccountKeeper + BankKeeper anteinterfaces.BankKeeper + IBCKeeper *ibckeeper.Keeper + FeeMarketKeeper anteinterfaces.FeeMarketKeeper + EvmKeeper anteinterfaces.EVMKeeper + FeegrantKeeper ante.FeegrantKeeper + ExtensionOptionChecker ante.ExtensionOptionChecker + SignModeHandler *txsigning.HandlerMap + SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error + MaxTxGasWanted uint64 + TxFeeChecker ante.TxFeeChecker + StakingKeeper StakingKeeper + DistributionKeeper DistributionKeeper + ExtraDecorator sdk.AnteDecorator + AuthzDisabledMsgTypes []string +} + +// Validate checks if the keepers are defined +func (options *HandlerOptions) Validate() error { + if options.Cdc == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "codec is required for ante builder") + } + if options.AccountKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "account keeper is required for ante builder") + } + if options.BankKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "bank keeper is required for ante builder") + } + if options.SignModeHandler == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "sign mode handler is required for ante builder") + } + if options.EvmKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "evm keeper is required for ante builder") + } + if options.FeeMarketKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "feemarket keeper is required for ante builder") + } + if options.StakingKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "staking keeper is required for AnteHandler") + } + if options.DistributionKeeper == nil { + return errorsmod.Wrap(errortypes.ErrLogic, "distribution keeper is required for AnteHandler") + } + return nil +} diff --git a/app/ante_interfaces.go b/app/ante/interfaces.go similarity index 98% rename from app/ante_interfaces.go rename to app/ante/interfaces.go index 3b91604..07aed38 100644 --- a/app/ante_interfaces.go +++ b/app/ante/interfaces.go @@ -1,4 +1,4 @@ -package app +package ante import ( "context" diff --git a/app/app.go b/app/app.go index 85b163d..03cddba 100644 --- a/app/app.go +++ b/app/app.go @@ -21,10 +21,11 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/evm/ante" ethante "github.com/cosmos/evm/ante/evm" "github.com/cosmos/evm/encoding" - evmante "github.com/cosmos/evm/evmd/ante" + "github.com/xrplevm/node/v8/app/ante" + + evmante "github.com/cosmos/evm/ante" etherminttypes "github.com/cosmos/evm/types" cosmosevmutils "github.com/cosmos/evm/utils" erc20v2 "github.com/cosmos/evm/x/erc20/v2" @@ -274,6 +275,7 @@ func New( evmChainID uint64, invCheckPeriod uint, appOpts servertypes.AppOptions, + evmAppOptions EVMOptionsFn, baseAppOptions ...func(*baseapp.BaseApp), ) *App { encodingConfig := encoding.MakeConfig(evmChainID) @@ -713,6 +715,7 @@ func New( app.mm.SetOrderBeginBlockers( // upgrades should be run first capabilitytypes.ModuleName, + erc20types.ModuleName, feemarkettypes.ModuleName, evmtypes.ModuleName, distrtypes.ModuleName, @@ -732,6 +735,7 @@ func New( poatypes.ModuleName, evmtypes.ModuleName, feemarkettypes.ModuleName, + erc20types.ModuleName, feegrant.ModuleName, ) @@ -749,6 +753,7 @@ func New( // NOTE: feemarket need to be initialized before genutil module: // gentx transactions use MinGasPriceDecorator.AnteHandle feemarkettypes.ModuleName, + erc20types.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName, @@ -840,25 +845,22 @@ func New( // use Ethermint's custom AnteHandler func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { - handlerOpts := &HandlerOptions{ - HandlerOptions: evmante.HandlerOptions{ - Cdc: app.appCodec, - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, - EvmKeeper: app.EvmKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - // TODO: Update when migrating to v10 - IBCKeeper: app.IBCKeeper, - FeeMarketKeeper: app.FeeMarketKeeper, - SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: maxGasWanted, - TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), - }, - StakingKeeper: app.StakingKeeper, - DistributionKeeper: app.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + handlerOpts := &ante.HandlerOptions{ + Cdc: app.appCodec, + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, + EvmKeeper: app.EvmKeeper, + FeegrantKeeper: app.FeeGrantKeeper, + IBCKeeper: app.IBCKeeper, + FeeMarketKeeper: app.FeeMarketKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: evmante.SigVerificationGasConsumer, + MaxTxGasWanted: maxGasWanted, + TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), + StakingKeeper: app.StakingKeeper, + DistributionKeeper: app.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), @@ -871,7 +873,12 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { panic(err) } - app.SetAnteHandler(NewAnteHandler(*handlerOpts)) + handler, err := ante.NewAnteHandler(*handlerOpts) + if err != nil { + panic(err) + } + + app.SetAnteHandler(handler) } func (app *App) setPostHandler() { @@ -974,7 +981,16 @@ func (app *App) AppCodec() codec.Codec { // DefaultGenesis returns a default genesis from the registered AppModuleBasic's. func (app *App) DefaultGenesis() etherminttypes.GenesisState { - return app.BasicModuleManager.DefaultGenesis(app.appCodec) + genesis := app.BasicModuleManager.DefaultGenesis(app.appCodec) + + evmGenState := evmtypes.DefaultGenesisState() + evmGenState.Params.ActiveStaticPrecompiles = evmtypes.AvailableStaticPrecompiles + genesis[evmtypes.ModuleName] = app.AppCodec().MustMarshalJSON(evmGenState) + + erc20GenState := erc20types.DefaultGenesisState() + genesis[erc20types.ModuleName] = app.AppCodec().MustMarshalJSON(erc20GenState) + + return genesis } // InterfaceRegistry returns an InterfaceRegistry diff --git a/app/config.go b/app/config.go new file mode 100644 index 0000000..8dd99ac --- /dev/null +++ b/app/config.go @@ -0,0 +1,66 @@ +package app + +import ( + "fmt" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/cosmos/evm/x/vm/types" +) + +type EVMOptionsFn func(string) error + +func NoOpEVMOptions(_ string) error { + return nil +} + +var sealed = false + +// ChainsCoinInfo maps EVM chain IDs to coin configuration +// IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings +var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ + 1440002: { // Your numeric EVM chain ID (e.g., 9000) + Denom: BaseDenom, + DisplayDenom: DisplayDenom, + Decimals: evmtypes.EighteenDecimals, + }, +} + +// EVMAppOptions sets up global configuration +func EVMAppOptions(chainID uint64) error { + if sealed { + return nil + } + + // IMPORTANT: Lookup uses numeric EVMChainID, not Cosmos chainID string + coinInfo, found := ChainsCoinInfo[chainID] + if !found { + return fmt.Errorf("unknown EVM chain id: %d", chainID) + } + + // Set denom info for the chain + if err := setBaseDenom(coinInfo); err != nil { + return err + } + + ethCfg := evmtypes.DefaultChainConfig(chainID) + + err := evmtypes.NewEVMConfigurator(). + WithChainConfig(ethCfg). + WithEVMCoinInfo(coinInfo). + Configure() + if err != nil { + return err + } + + sealed = true + return nil +} + +// setBaseDenom registers display and base denoms +func setBaseDenom(ci evmtypes.EvmCoinInfo) error { + if err := sdk.RegisterDenom(ci.DisplayDenom, math.LegacyOneDec()); err != nil { + return err + } + return sdk.RegisterDenom(ci.Denom, math.LegacyNewDecWithPrec(1, int64(ci.Decimals))) +} diff --git a/app/precompiles.go b/app/precompiles.go index 551ec24..f7e7979 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -68,7 +68,6 @@ func NewAvailableStaticPrecompiles( ibcTransferPrecompile, err := ics20precompile.NewPrecompile( stakingKeeper, transferKeeper, - // TODO: Update when migrating to v10 &channelKeeper, evmKeeper, ) From e087526c59768ae0d9eed7239e9e39c162005392 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 14 Aug 2025 18:29:55 +0200 Subject: [PATCH 17/66] feat(cmd): update newApp creator --- app/app.go | 4 ++++ app/config.go | 4 ++-- cmd/exrpd/cmd/root.go | 41 ++++++++++++++++++++++++++++++----------- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/app/app.go b/app/app.go index 03cddba..8436087 100644 --- a/app/app.go +++ b/app/app.go @@ -294,6 +294,10 @@ func New( bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) + if err := evmAppOptions(evmChainID); err != nil { + panic(err) + } + keys := storetypes.NewKVStoreKeys( authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, diff --git a/app/config.go b/app/config.go index 8dd99ac..edf352a 100644 --- a/app/config.go +++ b/app/config.go @@ -8,9 +8,9 @@ import ( evmtypes "github.com/cosmos/evm/x/vm/types" ) -type EVMOptionsFn func(string) error +type EVMOptionsFn func(uint64) error -func NoOpEVMOptions(_ string) error { +func NoOpEVMOptions(_ uint64) error { return nil } diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 11e2356..d0c55a7 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/snapshot" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/tx" txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" @@ -68,6 +69,7 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { 0, 0, emptyAppOptions{}, + app.NoOpEVMOptions, ) encodingConfig := sdktestutil.TestEncodingConfig{ InterfaceRegistry: tempApp.InterfaceRegistry(), @@ -346,17 +348,7 @@ func (a appCreator) newApp( cast.ToUint32(appOpts.Get(sdkserver.FlagStateSyncSnapshotKeepRecent)), ) - return app.New( - logger, - db, - traceStore, - true, - skipUpgradeHeights, - cast.ToString(appOpts.Get(flags.FlagHome)), - // TODO: Review this - cast.ToUint64(appOpts.Get(flags.FlagChainID)), - cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), - appOpts, + baseappOptions := []func(*baseapp.BaseApp){ baseapp.SetPruning(pruningOpts), baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(sdkserver.FlagMinGasPrices))), baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(sdkserver.FlagHaltHeight))), @@ -369,6 +361,32 @@ func (a appCreator) newApp( baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(sdkserver.FlagIAVLCacheSize))), baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(sdkserver.FlagDisableIAVLFastNode))), baseapp.SetChainID(chainID), + } + + baseappOptions = append(baseappOptions, func(app *baseapp.BaseApp) { + mempool := sdkmempool.NoOpMempool{} + app.SetMempool(mempool) + + handler := baseapp.NewDefaultProposalHandler(mempool, app) + app.SetPrepareProposal(handler.PrepareProposalHandler()) + app.SetProcessProposal(handler.ProcessProposalHandler()) + }) + + evmChainId := cast.ToUint64(appOpts.Get(flags.FlagChainID)) + + return app.New( + logger, + db, + traceStore, + true, + skipUpgradeHeights, + cast.ToString(appOpts.Get(flags.FlagHome)), + // TODO: Review this + evmChainId, + cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), + appOpts, + app.EVMAppOptions, + baseappOptions..., ) } @@ -398,6 +416,7 @@ func (a appCreator) appExport( 0, uint(1), appOpts, + app.EVMAppOptions, ) if height != -1 { From 954778a8d3b3d37526b93c919bc4d2dbb7497786 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 15 Aug 2025 10:31:36 +0200 Subject: [PATCH 18/66] feat: working local-node.sh --- app/config.go | 15 ++++++++------- cmd/exrpd/cmd/root.go | 7 +++++-- local-node.sh | 9 +++++++-- testutil/integration/exrp/common/setup.go | 5 +++-- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/app/config.go b/app/config.go index edf352a..bfe687f 100644 --- a/app/config.go +++ b/app/config.go @@ -20,9 +20,10 @@ var sealed = false // IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ 1440002: { // Your numeric EVM chain ID (e.g., 9000) - Denom: BaseDenom, - DisplayDenom: DisplayDenom, - Decimals: evmtypes.EighteenDecimals, + Denom: BaseDenom, + DisplayDenom: DisplayDenom, + ExtendedDenom: BaseDenom, + Decimals: evmtypes.EighteenDecimals, }, } @@ -38,10 +39,10 @@ func EVMAppOptions(chainID uint64) error { return fmt.Errorf("unknown EVM chain id: %d", chainID) } - // Set denom info for the chain - if err := setBaseDenom(coinInfo); err != nil { - return err - } + //// Set denom info for the chain + //if err := setBaseDenom(coinInfo); err != nil { + // return err + //} ethCfg := evmtypes.DefaultChainConfig(chainID) diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index d0c55a7..0953f59 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -2,6 +2,7 @@ package cmd import ( "errors" + "fmt" "io" "os" "path/filepath" @@ -372,7 +373,9 @@ func (a appCreator) newApp( app.SetProcessProposal(handler.ProcessProposalHandler()) }) - evmChainId := cast.ToUint64(appOpts.Get(flags.FlagChainID)) + fmt.Println(appOpts.Get(flags.FlagChainID)) + + _ = cast.ToUint64(appOpts.Get(flags.FlagChainID)) return app.New( logger, @@ -382,7 +385,7 @@ func (a appCreator) newApp( skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), // TODO: Review this - evmChainId, + 1440002, cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), appOpts, app.EVMAppOptions, diff --git a/local-node.sh b/local-node.sh index 3144a7b..8af8208 100755 --- a/local-node.sh +++ b/local-node.sh @@ -47,8 +47,13 @@ jq '.app_state["gov"]["params"]["expedited_voting_period"]="5s"' "$GENESIS" >"$T jq '.app_state["staking"]["params"]["bond_denom"]="apoa"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["staking"]["params"]["unbonding_time"]="60s"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["feemarket"]["params"]["base_fee"]="'${BASEFEE}'"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" -jq '.app_state["erc20"]["token_pairs"][0]["denom"]="token"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" -jq '.app_state["erc20"]["token_pairs"][0]["owner_address"]="ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" + +#jq '.app_state["erc20"]["token_pairs"][0]["denom"]="token"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" +#jq '.app_state["erc20"]["token_pairs"][0]["owner_address"]="ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" +jq '.app_state.erc20.native_precompiles=["0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" +jq '.app_state.erc20.token_pairs=[{contract_owner:1,erc20_address:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",denom:"token",enabled:true, "owner_address":"ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2"}]' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" + + jq '.app_state["slashing"]["params"]["slash_fraction_double_sign"]="0"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["slashing"]["params"]["slash_fraction_downtime"]="0"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index c2ca2c0..3393c03 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -105,7 +105,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp loadLatest := true skipUpgradeHeights := map[int64]bool{} homePath := testNodeHome - evmChainID := uint64(1) + evmChainID := uint64(1440002) invCheckPeriod := uint(5) appOptions := simutils.NewAppOptionsWithFlagHome(homePath) baseAppOptions := append(customBaseAppOptions, baseapp.SetChainID(chainID)) //nolint:gocritic @@ -120,6 +120,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp evmChainID, invCheckPeriod, appOptions, + app.EVMAppOptions, baseAppOptions..., ) @@ -127,7 +128,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp evmConfigurator := evmtypes.NewEVMConfigurator() // Reset configuration for test environments to allow multiple app instances evmConfigurator.ResetTestConfig() - + // Configure EVM coin info with the proper denom coinInfo := evmtypes.EvmCoinInfo{ Denom: app.BaseDenom, From 1ea85c552f110583c83cfad8375190a75c43ded3 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 11:02:42 +0200 Subject: [PATCH 19/66] fix(app): adapt app chain id config + remove unused ante file --- app/ante.go | 1 - app/app.go | 3 +-- app/config.go | 20 +++++++++++++------- cmd/exrpd/cmd/root.go | 8 +++++--- 4 files changed, 19 insertions(+), 13 deletions(-) delete mode 100644 app/ante.go diff --git a/app/ante.go b/app/ante.go deleted file mode 100644 index 4879f7a..0000000 --- a/app/ante.go +++ /dev/null @@ -1 +0,0 @@ -package app diff --git a/app/app.go b/app/app.go index 8436087..874703e 100644 --- a/app/app.go +++ b/app/app.go @@ -79,7 +79,6 @@ import ( testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" @@ -369,7 +368,7 @@ func New( ) // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) - enabledSignModes := append(authtx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) //nolint:gocritic + enabledSignModes := append(authtx.DefaultSignModes) //nolint:gocritic txConfigOpts := authtx.ConfigOptions{ EnabledSignModes: enabledSignModes, TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), diff --git a/app/config.go b/app/config.go index bfe687f..6c00c24 100644 --- a/app/config.go +++ b/app/config.go @@ -14,17 +14,23 @@ func NoOpEVMOptions(_ uint64) error { return nil } -var sealed = false - -// ChainsCoinInfo maps EVM chain IDs to coin configuration -// IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings -var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ - 1440002: { // Your numeric EVM chain ID (e.g., 9000) +var ( + sealed = false + DefaultEvmCoinInfo = evmtypes.EvmCoinInfo{ Denom: BaseDenom, DisplayDenom: DisplayDenom, ExtendedDenom: BaseDenom, Decimals: evmtypes.EighteenDecimals, - }, + } + DefaultLocalnetChainID uint64 = 1440002 + DefaultSimulationChainID uint64 = 777 +) + +// ChainsCoinInfo maps EVM chain IDs to coin configuration +// IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings +var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ + DefaultLocalnetChainID: DefaultEvmCoinInfo, + DefaultSimulationChainID: DefaultEvmCoinInfo, } // EVMAppOptions sets up global configuration diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 0953f59..7496b46 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -10,6 +10,8 @@ import ( "cosmossdk.io/store" storetypes "cosmossdk.io/store/types" + evmkeyring "github.com/cosmos/evm/crypto/keyring" + "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/snapshot" sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" @@ -42,7 +44,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/evm/crypto/hd" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -85,9 +86,10 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastSync). + WithBroadcastMode(flags.FlagBroadcastMode). WithHomeDir(app.DefaultNodeHome). - WithKeyringOptions(hd.EthSecp256k1Option()). + WithKeyringOptions(evmkeyring.Option()). + WithLedgerHasProtobuf(true). WithViper("exrp") rootCmd := &cobra.Command{ From b1646ebe8746304dd8a4043abef71060823f70ce Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 11:03:11 +0200 Subject: [PATCH 20/66] fix(app): simulation_test.go breaking changes --- app/simulation_test.go | 49 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/app/simulation_test.go b/app/simulation_test.go index fc034e8..4d341d1 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -15,6 +15,7 @@ import ( "github.com/cosmos/evm/crypto/ethsecp256k1" etherminttypes "github.com/cosmos/evm/types" "github.com/xrplevm/node/v8/app" + xrplevmante "github.com/xrplevm/node/v8/app/ante" poaante "github.com/xrplevm/node/v8/x/poa/ante" dbm "github.com/cosmos/cosmos-db" @@ -26,7 +27,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - evmante "github.com/cosmos/evm/evmd/ante" + "github.com/stretchr/testify/require" ) @@ -35,7 +36,7 @@ func init() { } const ( - SimAppChainID = "simulation_777-1" + SimAppChainID = "simulation_777-1" SimAppEVMChainID = 777 ) @@ -55,28 +56,26 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap SimAppEVMChainID, simcli.FlagPeriodValue, appOptions, - + app.EVMAppOptions, baseapp.SetChainID(config.ChainID), ) - handlerOpts := &app.HandlerOptions{ - HandlerOptions: evmante.HandlerOptions{ - Cdc: bApp.AppCodec(), - AccountKeeper: bApp.AccountKeeper, - BankKeeper: bApp.BankKeeper, - ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, - EvmKeeper: bApp.EvmKeeper, - FeegrantKeeper: bApp.FeeGrantKeeper, - // TODO: Update when migrating to v10 - IBCKeeper: bApp.IBCKeeper, - FeeMarketKeeper: bApp.FeeMarketKeeper, - SignModeHandler: bApp.GetTxConfig().SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: 0, - TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), - }, - StakingKeeper: bApp.StakingKeeper, - DistributionKeeper: bApp.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + handlerOpts := &xrplevmante.HandlerOptions{ + Cdc: bApp.AppCodec(), + AccountKeeper: bApp.AccountKeeper, + BankKeeper: bApp.BankKeeper, + ExtensionOptionChecker: etherminttypes.HasDynamicFeeExtensionOption, + EvmKeeper: bApp.EvmKeeper, + FeegrantKeeper: bApp.FeeGrantKeeper, + // TODO: Update when migrating to v10 + IBCKeeper: bApp.IBCKeeper, + FeeMarketKeeper: bApp.FeeMarketKeeper, + SignModeHandler: bApp.GetTxConfig().SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: 0, + TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), + StakingKeeper: bApp.StakingKeeper, + DistributionKeeper: bApp.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), @@ -87,7 +86,11 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap if err := handlerOpts.Validate(); err != nil { panic(err) } - bApp.SetAnteHandler(app.NewAnteHandler(*handlerOpts)) + handler, err := xrplevmante.NewAnteHandler(*handlerOpts) + if err != nil { + panic(err) + } + bApp.SetAnteHandler(handler) if err := bApp.LoadLatestVersion(); err != nil { return nil, err From 3a0a48da3509315766b261d2518995a624656067 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 16:23:09 +0200 Subject: [PATCH 21/66] chore: upgrade linter version and rules --- .golangci.yml | 181 +++++++++++++++++++++++++++++++++++--------------- Makefile | 6 +- 2 files changed, 129 insertions(+), 58 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 210f452..e1b0b76 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,59 +1,130 @@ +version: "2" run: - tests: true - timeout: 5m - concurrency: 4 - + tests: true linters: - enable: - - dogsled - - dupl - - errcheck - - goconst - - gocritic - - gofumpt - - revive - - gosec - - gosimple - - govet - - ineffassign - - misspell - - nakedret - - prealloc - - exportloopref - - staticcheck - - stylecheck - - typecheck - - unconvert - - unparam - - unused - - nolintlint - - asciicheck - - exportloopref - - gofumpt - - gomodguard - -linters-settings: + default: none + enable: + - copyloopvar + - dogsled + - errcheck + - goconst + - gocritic + - gosec + - govet + - ineffassign + - misspell + - nakedret + - nolintlint + - revive + - staticcheck + - thelper + - unconvert + - unparam + - unused + settings: dogsled: - max-blank-identifiers: 3 - golint: - min-confidence: 0 - maligned: - suggest-new: true - misspell: - locale: US + max-blank-identifiers: 3 nolintlint: - allow-unused: false - allow-leading-space: true - require-explanation: false - require-specific: false - gofumpt: - lang-version: "1.22" - gomodguard: - blocked: - versions: # List of blocked module version constraints - - https://github.com/etcd-io/etcd: # Blocked module with version constraint - version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons - reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional) - - https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint - version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons - reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional) + require-explanation: false + require-specific: false + allow-unused: false + revive: + severity: warning + rules: + - name: unused-parameter + disabled: true + - name: blank-imports + - name: context-as-argument + - name: context-keys-type + - name: dot-imports + - name: error-return + - name: error-strings + - name: error-naming + - name: exported + - name: if-return + - name: increment-decrement + - name: var-naming + - name: var-declaration + - name: range + - name: receiver-naming + - name: time-naming + - name: unexported-return + - name: indent-error-flow + - name: errorf + - name: empty-block + - name: superfluous-else + - name: unreachable-code + - name: redefines-builtin-id + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - revive + text: avoid meaningless package names + - linters: + - gosec + text: Use of weak random number generator + - linters: + - golint + text: comment on exported var + - linters: + - golint + text: don't use an underscore in package name + - linters: + - staticcheck + text: 'ST1003:' + - linters: + - staticcheck + text: 'ST1016:' + - linters: + - staticcheck + path: migrations + text: 'SA1019:' + - linters: + - staticcheck + path: ^tests/integration/ + - linters: + - stylecheck + text: 'ST1001:' + paths: + - x/vm/core + - mempool/txpool + - mempool/miner + - third_party$ + - builtin$ + - examples$ +issues: + max-issues-per-linter: 10000 + max-same-issues: 10000 +formatters: + enable: + - gci + - gofumpt + settings: + gci: + sections: + - standard + - default + - blank + - dot + - prefix(github.com/cometbft/cometbft) + - prefix(github.com/cosmos) + - prefix(cosmossdk.io) + - prefix(github.com/cosmos/cosmos-sdk) + - prefix(github.com/CosmWasm/wasmd) + - prefix(github.com/cosmos/gaia) + custom-order: true + exclusions: + generated: lax + paths: + - x/vm/core + - mempool/txpool + - mempool/miner + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index c0d074c..2011698 100644 --- a/Makefile +++ b/Makefile @@ -116,12 +116,12 @@ build-rocksdb: ### Linting ### ############################################################################### golangci_lint_cmd=golangci-lint -golangci_version=v1.62.0 +golangci_version=v2.2.2 lint: @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --timeout=10m + @go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version) + @$(golangci_lint_cmd) run --timeout=15m lint-fix: @echo "--> Running linter" From 0d10955d8425ea0fd75a741d3c80ae06df7a572d Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 18 Aug 2025 16:23:41 +0200 Subject: [PATCH 22/66] chore: bump cosmos/evm to v0.4.0 --- app/app.go | 65 +++++++++ app/precompiles.go | 48 ++++++- cmd/exrpd/cmd/root.go | 20 ++- go.mod | 45 +++--- go.sum | 132 +++++++++++------- .../integration/exrp/integration/network.go | 2 +- testutil/integration/exrp/utils/gov.go | 4 +- 7 files changed, 235 insertions(+), 81 deletions(-) diff --git a/app/app.go b/app/app.go index 874703e..fbbcc0c 100644 --- a/app/app.go +++ b/app/app.go @@ -10,6 +10,8 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/ethereum/go-ethereum/common" ratelimitv2 "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/v2" @@ -52,6 +54,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + evmmempool "github.com/cosmos/evm/mempool" "github.com/xrplevm/node/v8/x/poa" "cosmossdk.io/log" @@ -218,6 +221,7 @@ type App struct { appCodec codec.Codec interfaceRegistry types.InterfaceRegistry txConfig client.TxConfig + clientCtx client.Context invCheckPeriod uint @@ -249,6 +253,7 @@ type App struct { EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper Erc20Keeper erc20keeper.Keeper + EVMMempool *evmmempool.ExperimentalEVMMempool // exrp keepers PoaKeeper poakeeper.Keeper @@ -261,6 +266,9 @@ type App struct { sm *module.SimulationManager configurator module.Configurator + + // Add pending transaction listeners + pendingTxListeners []evmante.PendingTxListener } // New returns a reference to an initialized blockchain app @@ -820,6 +828,46 @@ func New( app.SetBeginBlocker(app.BeginBlocker) app.setAnteHandler(app.txConfig, cast.ToUint64(appOpts.Get(srvflags.EVMMaxTxGasWanted))) + + if evmtypes.GetChainConfig() != nil { + mempoolConfig := &evmmempool.EVMMempoolConfig{ + AnteHandler: app.GetAnteHandler(), + BlockGasLimit: 100_000_000, + } + + evmMempool := evmmempool.NewExperimentalEVMMempool( + app.CreateQueryContext, + logger, + app.EvmKeeper, + app.FeeMarketKeeper, + app.txConfig, + app.clientCtx, + mempoolConfig, + ) + app.EVMMempool = evmMempool + + // Set the global mempool for RPC access + if err := evmmempool.SetGlobalEVMMempool(evmMempool); err != nil { + panic(err) + } + + // Replace BaseApp mempool + app.SetMempool(evmMempool) + + // Set custom CheckTx handler for nonce gap support + checkTxHandler := evmmempool.NewCheckTxHandler(evmMempool) + app.SetCheckTxHandler(checkTxHandler) + + // Set custom PrepareProposal handler + abciProposalHandler := baseapp.NewDefaultProposalHandler(evmMempool, app) + abciProposalHandler.SetSignerExtractionAdapter( + evmmempool.NewEthSignerExtractionAdapter( + sdkmempool.NewDefaultSignerExtractionAdapter(), + ), + ) + app.SetPrepareProposal(abciProposalHandler.PrepareProposalHandler()) + } + app.setPostHandler() app.SetEndBlocker(app.EndBlocker) app.setupUpgradeHandlers() @@ -1085,6 +1133,14 @@ func (app *App) GetStakingKeeperSDK() *stakingkeeper.Keeper { return app.StakingKeeper } +func (app *App) GetMempool() sdkmempool.ExtMempool { + return app.EVMMempool +} + +func (app *App) GetAnteHandler() sdk.AnteHandler { + return app.BaseApp.AnteHandler() +} + // GetIBCKeeper implements the TestingApp interface. func (app *App) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper @@ -1100,6 +1156,10 @@ func (app *App) TxConfig() client.TxConfig { return app.txConfig } +func (app *App) SetClientCtx(clientCtx client.Context) { + app.clientCtx = clientCtx +} + // AutoCliOpts returns the autocli options for the app. func (app *App) AutoCliOpts() autocli.AppOptions { modules := make(map[string]appmodule.AppModule, 0) @@ -1131,6 +1191,11 @@ func (app *App) ModuleManager() *module.Manager { return app.mm } +// RegisterPendingTxListener registers a pending tx listener +func (app *App) RegisterPendingTxListener(listener func(common.Hash)) { + app.pendingTxListeners = append(app.pendingTxListeners, listener) +} + // initParamsKeeper init params keeper and its subspaces func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) diff --git a/app/precompiles.go b/app/precompiles.go index f7e7979..219cc46 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -3,9 +3,12 @@ package app import ( "fmt" + "cosmossdk.io/core/address" "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -25,6 +28,40 @@ import ( "golang.org/x/exp/maps" ) +type Optionals struct { + AddressCodec address.Codec // for gov/staking + ValidatorAddrCodec address.Codec // for slashing + ConsensusAddrCodec address.Codec // for slashing +} + +func defaultOptionals() Optionals { + return Optionals{ + AddressCodec: addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddrCodec: addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + ConsensusAddrCodec: addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), + } +} + +type Option func(opts *Optionals) + +func WithAddressCodec(codec address.Codec) Option { + return func(opts *Optionals) { + opts.AddressCodec = codec + } +} + +func WithValidatorAddrCodec(codec address.Codec) Option { + return func(opts *Optionals) { + opts.ValidatorAddrCodec = codec + } +} + +func WithConsensusAddrCodec(codec address.Codec) Option { + return func(opts *Optionals) { + opts.ConsensusAddrCodec = codec + } +} + const bech32PrecompileBaseGas = 6_000 // AvailableStaticPrecompiles returns the list of all available static precompiled contracts. @@ -39,7 +76,12 @@ func NewAvailableStaticPrecompiles( evmKeeper *evmkeeper.Keeper, govKeeper govkeeper.Keeper, codec codec.Codec, + opts ...Option, ) map[common.Address]vm.PrecompiledContract { + options := defaultOptionals() + for _, opt := range opts { + opt(&options) + } // Clone the mapping from the latest EVM fork. precompiles := maps.Clone(vm.PrecompiledContractsBerlin) @@ -51,7 +93,7 @@ func NewAvailableStaticPrecompiles( panic(fmt.Errorf("failed to instantiate bech32 precompile: %w", err)) } - stakingPrecompile, err := stakingprecompile.NewPrecompile(stakingKeeper) + stakingPrecompile, err := stakingprecompile.NewPrecompile(stakingKeeper, options.AddressCodec) if err != nil { panic(fmt.Errorf("failed to instantiate staking precompile: %w", err)) } @@ -60,12 +102,14 @@ func NewAvailableStaticPrecompiles( distributionKeeper, stakingKeeper, evmKeeper, + options.AddressCodec, ) if err != nil { panic(fmt.Errorf("failed to instantiate distribution precompile: %w", err)) } ibcTransferPrecompile, err := ics20precompile.NewPrecompile( + bankKeeper, stakingKeeper, transferKeeper, &channelKeeper, @@ -80,7 +124,7 @@ func NewAvailableStaticPrecompiles( panic(fmt.Errorf("failed to instantiate bank precompile: %w", err)) } - govPrecompile, err := govprecompile.NewPrecompile(govKeeper, codec) + govPrecompile, err := govprecompile.NewPrecompile(govKeeper, codec, options.AddressCodec) if err != nil { panic(fmt.Errorf("failed to instantiate gov precompile: %w", err)) } diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 7496b46..8854b15 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -11,6 +11,7 @@ import ( storetypes "cosmossdk.io/store/types" evmkeyring "github.com/cosmos/evm/crypto/keyring" + evmserver "github.com/cosmos/evm/server" "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/snapshot" @@ -48,7 +49,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - evmserver "github.com/cosmos/evm/client" + evmclient "github.com/cosmos/evm/client" ethermintserver "github.com/cosmos/evm/server" ethermintservercfg "github.com/cosmos/evm/server/config" "github.com/xrplevm/node/v8/app" @@ -172,6 +173,15 @@ func initRootCmd( ) { a := appCreator{encodingConfig} + sdkAppCreatorWrapper := func( + l log.Logger, + d dbm.DB, + w io.Writer, + ao servertypes.AppOptions, + ) servertypes.Application { + return a.newApp(l, d, w, ao) + } + rootCmd.AddCommand( genutilcli.InitCmd( tempApp.BasicModuleManager, @@ -193,9 +203,9 @@ func initRootCmd( AddGenesisAccountCmd(app.DefaultNodeHome), cmtcli.NewCompletionCmd(rootCmd, true), debug.Cmd(), - pruning.Cmd(a.newApp, app.DefaultNodeHome), + pruning.Cmd(sdkAppCreatorWrapper, app.DefaultNodeHome), confixcmd.ConfigCommand(), - snapshot.Cmd(a.newApp), + snapshot.Cmd(sdkAppCreatorWrapper), ) // add server commands @@ -211,7 +221,7 @@ func initRootCmd( sdkserver.StatusCommand(), queryCommand(), txCommand(), - evmserver.KeyCommands(app.DefaultNodeHome, true), + evmclient.KeyCommands(app.DefaultNodeHome, true), ) _, err := srvflags.AddTxFlags(rootCmd) @@ -307,7 +317,7 @@ func (a appCreator) newApp( db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions, -) servertypes.Application { +) evmserver.Application { var cache storetypes.MultiStorePersistentCache if cast.ToBool(appOpts.Get(sdkserver.FlagInterBlockCache)) { diff --git a/go.mod b/go.mod index 023b9d2..a120fb0 100644 --- a/go.mod +++ b/go.mod @@ -2,25 +2,25 @@ module github.com/xrplevm/node/v8 go 1.23.8 -toolchain go1.24.5 - require ( cosmossdk.io/api v0.9.2 cosmossdk.io/client/v2 v2.0.0-beta.7 cosmossdk.io/core v0.12.0 cosmossdk.io/errors v1.0.2 - cosmossdk.io/log v1.6.0 + cosmossdk.io/log v1.6.1 cosmossdk.io/math v1.5.3 cosmossdk.io/store v1.1.2 cosmossdk.io/tools/confix v0.1.2 cosmossdk.io/x/evidence v0.2.0 cosmossdk.io/x/feegrant v0.2.0 + cosmossdk.io/x/tx v0.14.0 cosmossdk.io/x/upgrade v0.2.0 - github.com/cometbft/cometbft v0.38.17 - github.com/cosmos/cosmos-db v1.1.1 + github.com/cometbft/cometbft v0.38.18 + github.com/cosmos/cosmos-db v1.1.3 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.53.4 - github.com/cosmos/evm v0.3.0 + github.com/cosmos/evm v0.4.0 + github.com/cosmos/evm/evmd v0.0.0-20250817201932-204ff4ea8df2 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 @@ -38,7 +38,7 @@ require ( golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + google.golang.org/protobuf v1.36.7 ) require ( @@ -53,7 +53,6 @@ require ( cosmossdk.io/collections v1.2.1 // indirect cosmossdk.io/depinject v1.2.1 // indirect cosmossdk.io/schema v1.1.0 // indirect - cosmossdk.io/x/tx v0.14.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -74,8 +73,8 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/btcutil v1.1.6 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect - github.com/bytedance/sonic v1.13.2 // indirect - github.com/bytedance/sonic/loader v0.2.4 // indirect + github.com/bytedance/sonic v1.14.0 // indirect + github.com/bytedance/sonic/loader v0.3.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect @@ -89,8 +88,7 @@ require ( github.com/cockroachdb/redact v1.1.6 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect - github.com/consensys/bavard v0.1.27 // indirect - github.com/consensys/gnark-crypto v0.16.0 // indirect + github.com/consensys/gnark-crypto v0.18.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -119,6 +117,7 @@ require ( github.com/ethereum/go-verkle v0.2.2 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/ferranbt/fastssz v0.1.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/getsentry/sentry-go v0.32.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -132,7 +131,7 @@ require ( github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.5 // indirect @@ -142,7 +141,7 @@ require ( github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect + github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect @@ -185,9 +184,10 @@ require ( github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mdp/qrterminal/v3 v3.2.1 // indirect github.com/minio/highwayhash v1.0.3 // indirect + github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/mitchellh/mapstructure v1.5.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 @@ -250,14 +250,14 @@ require ( go.uber.org/mock v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.15.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/net v0.42.0 // indirect + golang.org/x/arch v0.17.0 // indirect + golang.org/x/crypto v0.41.0 // indirect + golang.org/x/net v0.43.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/term v0.33.0 // indirect - golang.org/x/text v0.27.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/term v0.34.0 // indirect + golang.org/x/text v0.28.0 // indirect golang.org/x/time v0.10.0 // indirect google.golang.org/api v0.222.0 // indirect google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect @@ -268,7 +268,6 @@ require ( nhooyr.io/websocket v1.8.11 // indirect pgregory.net/rapid v1.2.0 // indirect rsc.io/qr v0.2.0 // indirect - rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) @@ -285,7 +284,7 @@ replace ( // TODO: remove this once we have a proper fork of cosmos/evm github.com/cosmos/evm => ../evm // use Evmos geth fork - github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v1.15.11-cosmos-0 + github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb diff --git a/go.sum b/go.sum index e6c1db1..b8d6e0c 100644 --- a/go.sum +++ b/go.sum @@ -626,8 +626,8 @@ cosmossdk.io/depinject v1.2.1 h1:eD6FxkIjlVaNZT+dXTQuwQTKZrFZ4UrfCq1RKgzyhMw= cosmossdk.io/depinject v1.2.1/go.mod h1:lqQEycz0H2JXqvOgVwTsjEdMI0plswI7p6KX+MVqFOM= cosmossdk.io/errors v1.0.2 h1:wcYiJz08HThbWxd/L4jObeLaLySopyyuUFB5w4AGpCo= cosmossdk.io/errors v1.0.2/go.mod h1:0rjgiHkftRYPj//3DrD6y8hcm40HcPv/dR4R/4efr0k= -cosmossdk.io/log v1.6.0 h1:SJIOmJ059wi1piyRgNRXKXhlDXGqnB5eQwhcZKv2tOk= -cosmossdk.io/log v1.6.0/go.mod h1:5cXXBvfBkR2/BcXmosdCSLXllvgSjphrrDVdfVRmBGM= +cosmossdk.io/log v1.6.1 h1:YXNwAgbDwMEKwDlCdH8vPcoggma48MgZrTQXCfmMBeI= +cosmossdk.io/log v1.6.1/go.mod h1:gMwsWyyDBjpdG9u2avCFdysXqxq28WJapJvu+vF1y+E= cosmossdk.io/math v1.5.3 h1:WH6tu6Z3AUCeHbeOSHg2mt9rnoiUWVWaQ2t6Gkll96U= cosmossdk.io/math v1.5.3/go.mod h1:uqcZv7vexnhMFJF+6zh9EWdm/+Ylyln34IvPnBauPCQ= cosmossdk.io/schema v1.1.0 h1:mmpuz3dzouCoyjjcMcA/xHBEmMChN+EHh8EHxHRHhzE= @@ -761,11 +761,11 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/ github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= -github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= +github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= +github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= -github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= +github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= 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= @@ -837,14 +837,12 @@ github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.17 h1:FkrQNbAjiFqXydeAO81FUzriL4Bz0abYxN/eOHrQGOk= -github.com/cometbft/cometbft v0.38.17/go.mod h1:5l0SkgeLRXi6bBfQuevXjKqML1jjfJJlvI1Ulp02/o4= +github.com/cometbft/cometbft v0.38.18 h1:1ZHYMdu0S75YxFM13LlPXnOwiIpUW5z9TKMQtTIALpw= +github.com/cometbft/cometbft v0.38.18/go.mod h1:PlOQgf3jQorep+g6oVnJgtP65TJvBJoLiXjGaMdNxBE= 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.27 h1:j6hKUrGAy/H+gpNrpLU3I26n1yc+VMGmd6ID5+gAhOs= -github.com/consensys/bavard v0.1.27/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= -github.com/consensys/gnark-crypto v0.16.0 h1:8Dl4eYmUWK9WmlP1Bj6je688gBRJCJbT8Mw4KoTAawo= -github.com/consensys/gnark-crypto v0.16.0/go.mod h1:Ke3j06ndtPTVvo++PhGNgvm+lgpLvzbcE2MqljY7diU= +github.com/consensys/gnark-crypto v0.18.0 h1:vIye/FqI50VeAr0B3dx+YjeIvmc3LWz4yEfbWBpTUf0= +github.com/consensys/gnark-crypto v0.18.0/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -853,14 +851,16 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/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.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNCM= -github.com/cosmos/cosmos-db v1.1.1/go.mod h1:AghjcIPqdhSLP/2Z0yha5xPH3nLnskz81pBx3tcVSAw= +github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOPY= +github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U= 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/evm/evmd v0.0.0-20250817201932-204ff4ea8df2 h1:WY9KEng/qUD5G8IFjyYKUJdr3sF3grU7zaYmw1nFAHg= +github.com/cosmos/evm/evmd v0.0.0-20250817201932-204ff4ea8df2/go.mod h1:afe8FBtwa3BqBa7nfnxl43XN8NTFx8e0mQ1wcbD5vec= 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/go-ethereum v1.15.11-cosmos-0 h1:a8C6CAL2ta06CYpI08a3jM1OdjRquYe4ur6JMjL35lQ= -github.com/cosmos/go-ethereum v1.15.11-cosmos-0/go.mod h1:mf8YiHIb0GR4x4TipcvBUPxJLw1mFdmxzoDi11sDRoI= +github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 h1:kgu2NkKzSeJJlVsKeS+KbdzfUeaFqrqmmhwixd/PNH4= +github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91/go.mod h1:X5CIOyo8SuK1Q5GnaEizQVLHT/DfsiGWuNeVdQcEMNA= 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= @@ -881,13 +881,12 @@ github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStK 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/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.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI= github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= -github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= -github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= github.com/creachadair/atomicfile v0.3.7 h1:wdg8+Isz07NDMi2yZQAoI1EKB9SxuDhvo5MUii/ZqlM= github.com/creachadair/atomicfile v0.3.7/go.mod h1:lUrZrE/XjMA7rJY/n8dF7/sSpy6KjtPaxPbrDambthA= github.com/creachadair/mds v0.22.1 h1:Wink9jeYR7brBbOkOTVZVrd6vyb5W4ZBRhlZd96TSgU= @@ -912,6 +911,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeC github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo= github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE= @@ -982,6 +983,8 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= 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.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY= +github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -995,6 +998,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.32.0 h1:YKs+//QmwE3DcYtfKRH8/KyOOF/I6Qnx7qYGNHCGmCY= github.com/getsentry/sentry-go v0.32.0/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -1058,8 +1063,8 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -1070,6 +1075,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo= +github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -1173,12 +1180,11 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= -github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1219,6 +1225,8 @@ github.com/gorilla/websocket v1.4.1/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/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= 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.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -1236,6 +1244,8 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM 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= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= @@ -1282,6 +1292,8 @@ github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8 github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= @@ -1305,7 +1317,13 @@ github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPt github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -1349,6 +1367,7 @@ github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHU github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +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/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= @@ -1414,6 +1433,8 @@ github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcs github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= 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 v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1425,9 +1446,10 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -1467,14 +1489,14 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= -github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= -github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= +github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= +github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1486,6 +1508,8 @@ github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= @@ -1501,6 +1525,8 @@ github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNc github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= 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= @@ -1571,6 +1597,8 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 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/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= +github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= 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= @@ -1593,6 +1621,7 @@ github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= 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= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= @@ -1696,8 +1725,13 @@ github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0o github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= +github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1755,6 +1789,8 @@ 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.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1775,8 +1811,8 @@ go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.15.0 h1:QtOrQd0bTUnhNVNndMpLHNWrDmYzZ2KDqSrEymqInZw= -golang.org/x/arch v0.15.0/go.mod h1:JmwW7aLIoRUKgaTzhkiEFxvcEiQGyOg9BMonBJUS7EE= +golang.org/x/arch v0.17.0 h1:4O3dfLzd+lQewptAHqjewQZQDyEdejz3VwgeYwkZneU= +golang.org/x/arch v0.17.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1799,8 +1835,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= 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= @@ -1940,8 +1976,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= 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= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2111,8 +2147,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.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.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.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-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2128,8 +2164,8 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg= -golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= 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= @@ -2151,8 +2187,8 @@ 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.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= 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= @@ -2235,8 +2271,8 @@ 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.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= -golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= 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= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2532,8 +2568,8 @@ google.golang.org/protobuf v1.28.1/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.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 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= @@ -2546,6 +2582,8 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -2621,8 +2659,6 @@ rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 6996d28..a505c7e 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -14,7 +14,7 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" "github.com/xrplevm/node/v8/app" - "github.com/cosmos/evm/testutil/integration/common/network" + "github.com/cosmos/evm/testutil/integration/base/network" "github.com/cosmos/evm/types" abcitypes "github.com/cometbft/cometbft/abci/types" diff --git a/testutil/integration/exrp/utils/gov.go b/testutil/integration/exrp/utils/gov.go index 92fb680..c3692cd 100644 --- a/testutil/integration/exrp/utils/gov.go +++ b/testutil/integration/exrp/utils/gov.go @@ -16,8 +16,8 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/evm/testutil/integration/common/factory" - "github.com/cosmos/evm/testutil/integration/os/keyring" + "github.com/cosmos/evm/testutil/integration/base/factory" + "github.com/cosmos/evm/testutil/keyring" exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" ) From 248398c5599fee150a5bfcbc88f5cada55d8f294 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 19 Aug 2025 15:22:11 +0200 Subject: [PATCH 23/66] refactor(testutil/integration): add ChainsCoins to integration network --- tests/integration/suite.go | 8 +- testutil/constants/constants.go | 30 ++++++++ testutil/integration/exrp/common/coins.go | 77 +++++++++++++++++++ testutil/integration/exrp/common/config.go | 2 + .../integration/exrp/integration/network.go | 20 ++++- 5 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 testutil/constants/constants.go create mode 100644 testutil/integration/exrp/common/coins.go diff --git a/tests/integration/suite.go b/tests/integration/suite.go index bb8fe7c..4366acc 100644 --- a/tests/integration/suite.go +++ b/tests/integration/suite.go @@ -3,9 +3,9 @@ package integration import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/evm/testutil/integration/common/factory" - "github.com/cosmos/evm/testutil/integration/os/grpc" - "github.com/cosmos/evm/testutil/integration/os/keyring" + "github.com/cosmos/evm/testutil/integration/evm/factory" + "github.com/cosmos/evm/testutil/integration/evm/grpc" + "github.com/cosmos/evm/testutil/keyring" evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/stretchr/testify/suite" "github.com/xrplevm/node/v8/app" @@ -17,7 +17,7 @@ type TestSuite struct { network *Network keyring keyring.Keyring - factory factory.CoreTxFactory + factory factory.TxFactory grpcHandler grpc.Handler } diff --git a/testutil/constants/constants.go b/testutil/constants/constants.go new file mode 100644 index 0000000..a05bd2c --- /dev/null +++ b/testutil/constants/constants.go @@ -0,0 +1,30 @@ +package constants + +import ( + testconstants "github.com/cosmos/evm/testutil/constants" + evmtypes "github.com/cosmos/evm/x/vm/types" +) + +const ( + DisplayDenom = "xrp" + // BaseDenom defines to the default denomination used in EVM + BaseDenom = "axrp" + // BaseDenomUnit defines the unit of the base denomination + BaseDenomUnit = 18 +) + +var ( + LocalnetChainID = testconstants.ChainID{ + ChainID: "exrp_1440002-1", + EVMChainID: 1440002, + } + + ExampleChainCoinInfo = map[testconstants.ChainID]evmtypes.EvmCoinInfo{ + LocalnetChainID: { + Denom: BaseDenom, + ExtendedDenom: BaseDenom, + DisplayDenom: DisplayDenom, + Decimals: BaseDenomUnit, + }, + } +) diff --git a/testutil/integration/exrp/common/coins.go b/testutil/integration/exrp/common/coins.go new file mode 100644 index 0000000..e4f15fa --- /dev/null +++ b/testutil/integration/exrp/common/coins.go @@ -0,0 +1,77 @@ +package exrpcommon + +import ( + "github.com/cosmos/evm/testutil/integration/evm/network" + evmtypes "github.com/cosmos/evm/x/vm/types" + testconstants "github.com/xrplevm/node/v8/testutil/constants" +) + +var defaultChain = testconstants.LocalnetChainID + +type ChainCoins struct { + + // decimals of the base denom? Maybe not.. + baseCoin *network.CoinInfo + evmCoin *network.CoinInfo +} + +func DefaultChainCoins() ChainCoins { + baseCoinInfo := testconstants.ExampleChainCoinInfo[defaultChain] + + baseCoin := getCoinInfo(baseCoinInfo) + evmCoin := getCoinInfo(baseCoinInfo) + + return ChainCoins{ + baseCoin: &baseCoin, + evmCoin: &evmCoin, + } +} + +func getCoinInfo(coinInfo evmtypes.EvmCoinInfo) network.CoinInfo { + return network.CoinInfo{ + Denom: coinInfo.Denom, + Decimals: coinInfo.Decimals, + } +} + +func (cc ChainCoins) BaseCoin() network.CoinInfo { + return *cc.baseCoin +} + +func (cc ChainCoins) EVMCoin() network.CoinInfo { + return *cc.evmCoin +} + +func (cc ChainCoins) BaseDenom() string { + return cc.baseCoin.Denom +} + +func (cc ChainCoins) EVMDenom() string { + return cc.evmCoin.Denom +} + +func (cc ChainCoins) BaseDecimals() evmtypes.Decimals { + return cc.baseCoin.Decimals +} + +func (cc ChainCoins) EVMDecimals() evmtypes.Decimals { + return cc.evmCoin.Decimals +} + +func (cc ChainCoins) IsBaseEqualToEVM() bool { + return cc.BaseDenom() == cc.EVMDenom() +} + +// DenomDecimalsMap returns a map of unique Denom -> Decimals for the chain +// coins. +func (cc ChainCoins) DenomDecimalsMap() map[string]evmtypes.Decimals { + chainDenomDecimals := map[string]evmtypes.Decimals{ + cc.BaseDenom(): cc.BaseDecimals(), + } + + // Insert the evm denom if base and evm denom are different. + if !cc.IsBaseEqualToEVM() { + chainDenomDecimals[cc.EVMDenom()] = cc.EVMDecimals() + } + return chainDenomDecimals +} diff --git a/testutil/integration/exrp/common/config.go b/testutil/integration/exrp/common/config.go index f3d45a7..276b110 100644 --- a/testutil/integration/exrp/common/config.go +++ b/testutil/integration/exrp/common/config.go @@ -34,6 +34,7 @@ type Config struct { CustomBaseAppOpts []func(*baseapp.BaseApp) MinDepositAmt sdkmath.Int Quorum string + ChainCoins ChainCoins } type CustomGenesisState map[string]interface{} @@ -45,6 +46,7 @@ func DefaultConfig() Config { EIP155ChainID: big.NewInt(1440002), Balances: nil, Denom: app.BaseDenom, + ChainCoins: DefaultChainCoins(), } } diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index a505c7e..376f4fa 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -10,6 +10,7 @@ import ( "time" sdkmath "cosmossdk.io/math" + evmtypes "github.com/cosmos/evm/x/vm/types" gethparams "github.com/ethereum/go-ethereum/params" "github.com/xrplevm/node/v8/app" @@ -29,6 +30,7 @@ import ( consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" ) @@ -52,10 +54,11 @@ var _ Network = (*IntegrationNetwork)(nil) // IntegrationNetwork is the implementation of the Network interface for integration tests. type IntegrationNetwork struct { - cfg exrpcommon.Config - ctx sdktypes.Context - validators []stakingtypes.Validator - app *app.App + cfg exrpcommon.Config + ctx sdktypes.Context + validators []stakingtypes.Validator + app *app.App + baseDecimal evmtypes.Decimals // This is only needed for IBC chain testing setup valSet *cmttypes.ValidatorSet @@ -99,6 +102,11 @@ var ( // configureAndInitChain initializes the network with the given configuration. // It creates the genesis state and starts the network. func (n *IntegrationNetwork) configureAndInitChain() error { + + // The bonded amount should be updated to reflect the actual base denom + baseDecimals := n.cfg.ChainCoins.BaseDecimals() + n.baseDecimal = baseDecimals + // Create validator set with the amount of validators specified in the config // with the default power of 1. valSet, valSigners := createValidatorSetAndSigners(n.cfg.AmountOfValidators) @@ -291,6 +299,10 @@ func (n *IntegrationNetwork) GetBaseDenom() string { return n.cfg.Denom } +func (n *IntegrationNetwork) GetBaseDecimal() evmtypes.Decimals { + return n.baseDecimal +} + // GetBondDenom returns the network's bond denom func (n *IntegrationNetwork) GetBondDenom() string { return n.cfg.BondDenom From 08ba502dde7b2af67c79de7026c1c8c74ced1973 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 19 Aug 2025 15:40:49 +0200 Subject: [PATCH 24/66] chore: restore linter --- .golangci.yml | 153 ++++++++++++++------------------------------------ Makefile | 6 +- 2 files changed, 44 insertions(+), 115 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index e1b0b76..f83aaa0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,130 +1,59 @@ -version: "2" run: tests: true + timeout: 5m + concurrency: 4 + linters: - default: none enable: - - copyloopvar - dogsled + - dupl - errcheck - goconst - gocritic + - gofumpt + - revive - gosec + - gosimple - govet - ineffassign - misspell - nakedret - - nolintlint - - revive + - prealloc + - exportloopref - staticcheck - - thelper + - stylecheck + - typecheck - unconvert - unparam - unused - settings: - dogsled: - max-blank-identifiers: 3 - nolintlint: - require-explanation: false - require-specific: false - allow-unused: false - revive: - severity: warning - rules: - - name: unused-parameter - disabled: true - - name: blank-imports - - name: context-as-argument - - name: context-keys-type - - name: dot-imports - - name: error-return - - name: error-strings - - name: error-naming - - name: exported - - name: if-return - - name: increment-decrement - - name: var-naming - - name: var-declaration - - name: range - - name: receiver-naming - - name: time-naming - - name: unexported-return - - name: indent-error-flow - - name: errorf - - name: empty-block - - name: superfluous-else - - name: unreachable-code - - name: redefines-builtin-id - exclusions: - generated: lax - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - rules: - - linters: - - revive - text: avoid meaningless package names - - linters: - - gosec - text: Use of weak random number generator - - linters: - - golint - text: comment on exported var - - linters: - - golint - text: don't use an underscore in package name - - linters: - - staticcheck - text: 'ST1003:' - - linters: - - staticcheck - text: 'ST1016:' - - linters: - - staticcheck - path: migrations - text: 'SA1019:' - - linters: - - staticcheck - path: ^tests/integration/ - - linters: - - stylecheck - text: 'ST1001:' - paths: - - x/vm/core - - mempool/txpool - - mempool/miner - - third_party$ - - builtin$ - - examples$ -issues: - max-issues-per-linter: 10000 - max-same-issues: 10000 -formatters: - enable: - - gci + - nolintlint + - asciicheck + - exportloopref - gofumpt - settings: - gci: - sections: - - standard - - default - - blank - - dot - - prefix(github.com/cometbft/cometbft) - - prefix(github.com/cosmos) - - prefix(cosmossdk.io) - - prefix(github.com/cosmos/cosmos-sdk) - - prefix(github.com/CosmWasm/wasmd) - - prefix(github.com/cosmos/gaia) - custom-order: true - exclusions: - generated: lax - paths: - - x/vm/core - - mempool/txpool - - mempool/miner - - third_party$ - - builtin$ - - examples$ + - gomodguard + +linters-settings: + dogsled: + max-blank-identifiers: 3 + golint: + min-confidence: 0 + maligned: + suggest-new: true + misspell: + locale: US + nolintlint: + allow-unused: false + allow-leading-space: true + require-explanation: false + require-specific: false + gofumpt: + lang-version: "1.22" + gomodguard: + blocked: + versions: # List of blocked module version constraints + - https://github.com/etcd-io/etcd: # Blocked module with version constraint + version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons + reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional) + - https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint + version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons + reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional) diff --git a/Makefile b/Makefile index 2011698..c0d074c 100644 --- a/Makefile +++ b/Makefile @@ -116,12 +116,12 @@ build-rocksdb: ### Linting ### ############################################################################### golangci_lint_cmd=golangci-lint -golangci_version=v2.2.2 +golangci_version=v1.62.0 lint: @echo "--> Running linter" - @go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version) - @$(golangci_lint_cmd) run --timeout=15m + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + @$(golangci_lint_cmd) run --timeout=10m lint-fix: @echo "--> Running linter" From 719071ff1141d8463c2711523067d7bf901476fb Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 19 Aug 2025 15:41:22 +0200 Subject: [PATCH 25/66] fix: linting --- app/app.go | 3 +-- app/config.go | 12 +----------- app/simulation_test.go | 2 +- cmd/exrpd/cmd/root.go | 5 ++--- testutil/integration/exrp/common/coins.go | 1 - .../integration/exrp/integration/clients.go | 2 +- testutil/integration/exrp/integration/ibc.go | 18 +++++++++--------- .../integration/exrp/integration/network.go | 4 +--- testutil/integration/exrp/integration/setup.go | 2 +- testutil/integration/exrp/upgrade/ibc.go | 18 +++++++++--------- 10 files changed, 26 insertions(+), 41 deletions(-) diff --git a/app/app.go b/app/app.go index fbbcc0c..14a69e9 100644 --- a/app/app.go +++ b/app/app.go @@ -376,9 +376,8 @@ func New( ) // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) - enabledSignModes := append(authtx.DefaultSignModes) //nolint:gocritic txConfigOpts := authtx.ConfigOptions{ - EnabledSignModes: enabledSignModes, + EnabledSignModes: authtx.DefaultSignModes, TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), } txConfig, err := authtx.NewTxConfigWithOptions( diff --git a/app/config.go b/app/config.go index 6c00c24..259442a 100644 --- a/app/config.go +++ b/app/config.go @@ -3,8 +3,6 @@ package app import ( "fmt" - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" evmtypes "github.com/cosmos/evm/x/vm/types" ) @@ -46,7 +44,7 @@ func EVMAppOptions(chainID uint64) error { } //// Set denom info for the chain - //if err := setBaseDenom(coinInfo); err != nil { + // if err := setBaseDenom(coinInfo); err != nil { // return err //} @@ -63,11 +61,3 @@ func EVMAppOptions(chainID uint64) error { sealed = true return nil } - -// setBaseDenom registers display and base denoms -func setBaseDenom(ci evmtypes.EvmCoinInfo) error { - if err := sdk.RegisterDenom(ci.DisplayDenom, math.LegacyOneDec()); err != nil { - return err - } - return sdk.RegisterDenom(ci.Denom, math.LegacyNewDecWithPrec(1, int64(ci.Decimals))) -} diff --git a/app/simulation_test.go b/app/simulation_test.go index 4d341d1..8e0a337 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -44,7 +44,7 @@ const ( func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*app.App, error) { appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue //nolint:staticcheck bApp := app.New( logger, diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 8854b15..193a194 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -50,7 +50,6 @@ import ( "github.com/spf13/pflag" evmclient "github.com/cosmos/evm/client" - ethermintserver "github.com/cosmos/evm/server" ethermintservercfg "github.com/cosmos/evm/server/config" "github.com/xrplevm/node/v8/app" ) @@ -209,9 +208,9 @@ func initRootCmd( ) // add server commands - ethermintserver.AddCommands( + evmserver.AddCommands( rootCmd, - ethermintserver.NewDefaultStartOptions(a.newApp, app.DefaultNodeHome), + evmserver.NewDefaultStartOptions(a.newApp, app.DefaultNodeHome), a.appExport, addModuleInitFlags, ) diff --git a/testutil/integration/exrp/common/coins.go b/testutil/integration/exrp/common/coins.go index e4f15fa..81236da 100644 --- a/testutil/integration/exrp/common/coins.go +++ b/testutil/integration/exrp/common/coins.go @@ -9,7 +9,6 @@ import ( var defaultChain = testconstants.LocalnetChainID type ChainCoins struct { - // decimals of the base denom? Maybe not.. baseCoin *network.CoinInfo evmCoin *network.CoinInfo diff --git a/testutil/integration/exrp/integration/clients.go b/testutil/integration/exrp/integration/clients.go index c4584da..34bccf4 100644 --- a/testutil/integration/exrp/integration/clients.go +++ b/testutil/integration/exrp/integration/clients.go @@ -85,4 +85,4 @@ func (n *IntegrationNetwork) GetDistrClient() distrtypes.QueryClient { // NOTE: Not needed func (n *IntegrationNetwork) GetMintClient() minttypes.QueryClient { return nil -} \ No newline at end of file +} diff --git a/testutil/integration/exrp/integration/ibc.go b/testutil/integration/exrp/integration/ibc.go index e540b3e..3914261 100644 --- a/testutil/integration/exrp/integration/ibc.go +++ b/testutil/integration/exrp/integration/ibc.go @@ -13,14 +13,14 @@ import ( // The keyring should be used instead. func (n *IntegrationNetwork) GetIBCChain(t *testing.T, coord *ibctesting.Coordinator) *ibctesting.TestChain { return &ibctesting.TestChain{ - TB: t, - Coordinator: coord, - ChainID: n.GetChainID(), - App: n.app, - TxConfig: n.app.GetTxConfig(), - Codec: n.app.AppCodec(), - Vals: n.valSet, - NextVals: n.valSet, - Signers: n.valSigners, + TB: t, + Coordinator: coord, + ChainID: n.GetChainID(), + App: n.app, + TxConfig: n.app.GetTxConfig(), + Codec: n.app.AppCodec(), + Vals: n.valSet, + NextVals: n.valSet, + Signers: n.valSigners, } } diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 376f4fa..7451526 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -102,7 +102,6 @@ var ( // configureAndInitChain initializes the network with the given configuration. // It creates the genesis state and starts the network. func (n *IntegrationNetwork) configureAndInitChain() error { - // The bonded amount should be updated to reflect the actual base denom baseDecimals := n.cfg.ChainCoins.BaseDecimals() n.baseDecimal = baseDecimals @@ -110,7 +109,6 @@ func (n *IntegrationNetwork) configureAndInitChain() error { // Create validator set with the amount of validators specified in the config // with the default power of 1. valSet, valSigners := createValidatorSetAndSigners(n.cfg.AmountOfValidators) - totalBonded := DefaultBondedAmount.Mul(sdkmath.NewInt(int64(n.cfg.AmountOfValidators))) valFlags := make([]cmtproto.BlockIDFlag, len(valSet.Validators)) for i := range valSet.Validators { @@ -128,7 +126,7 @@ func (n *IntegrationNetwork) configureAndInitChain() error { fundedAccountBalances = addBondedModuleAccountToFundedBalances( fundedAccountBalances, - sdktypes.NewCoin(n.cfg.BondDenom, totalBonded), + sdktypes.NewCoin(n.cfg.BondDenom, DefaultBondedAmount.Mul(sdkmath.NewInt(int64(n.cfg.AmountOfValidators)))), ) delegations := createDelegations(validators) diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index a41a197..d8141d5 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -110,7 +110,7 @@ func createGenesisAccounts(accounts []sdktypes.AccAddress) []authtypes.GenesisAc emptyCodeHash := crypto.Keccak256Hash(nil).String() for _, acc := range accounts { baseAcc := authtypes.NewBaseAccount(acc, nil, 0, 0) - // TODO: Update when replacing with forked cosmos/evm version is installed + // TODO: Update when replacing with forked cosmos/evm version is installed ethAcc := &evmostypes.EthAccount{ BaseAccount: baseAcc, CodeHash: emptyCodeHash, diff --git a/testutil/integration/exrp/upgrade/ibc.go b/testutil/integration/exrp/upgrade/ibc.go index f42c086..38b174c 100644 --- a/testutil/integration/exrp/upgrade/ibc.go +++ b/testutil/integration/exrp/upgrade/ibc.go @@ -13,14 +13,14 @@ import ( // The keyring should be used instead. func (n *UpgradeIntegrationNetwork) GetIBCChain(t *testing.T, coord *ibctesting.Coordinator) *ibctesting.TestChain { return &ibctesting.TestChain{ - TB: t, - Coordinator: coord, - ChainID: n.GetChainID(), - App: n.app, - TxConfig: n.app.GetTxConfig(), - Codec: n.app.AppCodec(), - Vals: n.valSet, - NextVals: n.valSet, - Signers: n.valSigners, + TB: t, + Coordinator: coord, + ChainID: n.GetChainID(), + App: n.app, + TxConfig: n.app.GetTxConfig(), + Codec: n.app.AppCodec(), + Vals: n.valSet, + NextVals: n.valSet, + Signers: n.valSigners, } } From f6fcfa96374da2c21118197db4559e70c74da9ca Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 20 Aug 2025 10:31:37 +0200 Subject: [PATCH 26/66] chore: upgrade package version to v9 --- app/ante.go | 2 +- app/app.go | 10 +++++----- app/simulation_test.go | 2 +- app/upgrades.go | 10 +++++----- cmd/exrpd/cmd/root.go | 2 +- cmd/exrpd/main.go | 4 ++-- go.mod | 2 +- proto/poa/genesis.proto | 2 +- proto/poa/params.proto | 2 +- proto/poa/query.proto | 2 +- proto/poa/tx.proto | 2 +- tests/integration/network.go | 8 ++++---- tests/integration/poa_test.go | 4 ++-- tests/integration/slashing_test.go | 2 +- tests/integration/suite.go | 10 +++++----- tests/upgrade/network.go | 8 ++++---- tests/upgrade/suite.go | 2 +- tests/upgrade/suite_test.go | 2 +- testutil/integration/common/factory/base.go | 4 ++-- testutil/integration/common/factory/factory.go | 4 ++-- testutil/integration/common/factory/fund.go | 2 +- testutil/integration/common/grpc/grpc.go | 2 +- testutil/integration/exrp/common/clients.go | 4 ++-- testutil/integration/exrp/common/config.go | 2 +- testutil/integration/exrp/common/setup.go | 2 +- testutil/integration/exrp/integration/config.go | 2 +- testutil/integration/exrp/integration/keepers.go | 2 +- testutil/integration/exrp/integration/network.go | 4 ++-- testutil/integration/exrp/integration/setup.go | 4 ++-- testutil/integration/exrp/integration/unit_network.go | 4 ++-- testutil/integration/exrp/upgrade/config.go | 2 +- testutil/integration/exrp/upgrade/keepers.go | 2 +- testutil/integration/exrp/upgrade/network.go | 4 ++-- testutil/integration/exrp/upgrade/unit_network.go | 4 ++-- testutil/integration/exrp/utils/gov.go | 6 +++--- x/poa/ante/poa_test.go | 4 ++-- x/poa/keeper/common_test.go | 4 ++-- x/poa/keeper/genesis.go | 2 +- x/poa/keeper/keeper.go | 2 +- x/poa/keeper/keeper_test.go | 4 ++-- x/poa/keeper/msg_server.go | 2 +- x/poa/keeper/msg_server_add_validator.go | 2 +- x/poa/keeper/msg_server_add_validator_test.go | 4 ++-- x/poa/keeper/msg_server_remove_validator.go | 2 +- x/poa/keeper/msg_server_remove_validator_test.go | 2 +- x/poa/keeper/params.go | 2 +- x/poa/keeper/query.go | 2 +- x/poa/keeper/query_params.go | 2 +- x/poa/module.go | 4 ++-- x/poa/module_simulation.go | 6 +++--- x/poa/simulation/proposals.go | 2 +- x/poa/simulation/proposals_test.go | 2 +- 52 files changed, 89 insertions(+), 89 deletions(-) diff --git a/app/ante.go b/app/ante.go index 078083b..e88ee2a 100644 --- a/app/ante.go +++ b/app/ante.go @@ -8,7 +8,7 @@ import ( "github.com/evmos/evmos/v20/app/ante" ethante "github.com/evmos/evmos/v20/app/ante/evm" etherminttypes "github.com/evmos/evmos/v20/types" - poaante "github.com/xrplevm/node/v8/x/poa/ante" + poaante "github.com/xrplevm/node/v9/x/poa/ante" ) type AnteHandlerOptions ante.HandlerOptions diff --git a/app/app.go b/app/app.go index 5f2a73e..d5d5db8 100644 --- a/app/app.go +++ b/app/app.go @@ -42,7 +42,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - "github.com/xrplevm/node/v8/x/poa" + "github.com/xrplevm/node/v9/x/poa" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -120,11 +120,11 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types" - "github.com/xrplevm/node/v8/docs" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/docs" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" + poatypes "github.com/xrplevm/node/v9/x/poa/types" - // "github.com/xrplevm/node/v8/app/ante" + // "github.com/xrplevm/node/v9/app/ante" "github.com/evmos/evmos/v20/app/ante" srvflags "github.com/evmos/evmos/v20/server/flags" diff --git a/app/simulation_test.go b/app/simulation_test.go index 86c03f4..f8e9bd1 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -22,7 +22,7 @@ import ( simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" "github.com/evmos/evmos/v20/app/ante" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) func init() { diff --git a/app/upgrades.go b/app/upgrades.go index 515604e..361b00a 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -9,11 +9,11 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" - v4 "github.com/xrplevm/node/v8/app/upgrades/v4" - v5 "github.com/xrplevm/node/v8/app/upgrades/v5" - v6 "github.com/xrplevm/node/v8/app/upgrades/v6" - v7 "github.com/xrplevm/node/v8/app/upgrades/v7" - v8 "github.com/xrplevm/node/v8/app/upgrades/v8" + v4 "github.com/xrplevm/node/v9/app/upgrades/v4" + v5 "github.com/xrplevm/node/v9/app/upgrades/v5" + v6 "github.com/xrplevm/node/v9/app/upgrades/v6" + v7 "github.com/xrplevm/node/v9/app/upgrades/v7" + v8 "github.com/xrplevm/node/v9/app/upgrades/v8" ) func (app *App) setupUpgradeHandlers() { diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 6f65a53..e2fcebc 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -47,7 +47,7 @@ import ( ethermintserver "github.com/evmos/evmos/v20/server" ethermintservercfg "github.com/evmos/evmos/v20/server/config" ethermintserverflags "github.com/evmos/evmos/v20/server/flags" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) type emptyAppOptions struct{} diff --git a/cmd/exrpd/main.go b/cmd/exrpd/main.go index 3523312..a001d0c 100644 --- a/cmd/exrpd/main.go +++ b/cmd/exrpd/main.go @@ -11,8 +11,8 @@ import ( svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/xrplevm/node/v8/app" - "github.com/xrplevm/node/v8/cmd/exrpd/cmd" + "github.com/xrplevm/node/v9/app" + "github.com/xrplevm/node/v9/cmd/exrpd/cmd" ) func main() { diff --git a/go.mod b/go.mod index 75459b5..a08c347 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/xrplevm/node/v8 +module github.com/xrplevm/node/v9 go 1.22.11 diff --git a/proto/poa/genesis.proto b/proto/poa/genesis.proto index f8f3945..aec5c85 100644 --- a/proto/poa/genesis.proto +++ b/proto/poa/genesis.proto @@ -4,7 +4,7 @@ package poa; import "gogoproto/gogo.proto"; import "poa/params.proto"; -option go_package = "github.com/xrplevm/node/v8/x/poa/types"; +option go_package = "github.com/xrplevm/node/v9/x/poa/types"; // GenesisState defines the poa module's genesis state. message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/poa/params.proto b/proto/poa/params.proto index ac4ea3f..90e8ded 100644 --- a/proto/poa/params.proto +++ b/proto/poa/params.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package poa; -option go_package = "github.com/xrplevm/node/v8/x/poa/types"; +option go_package = "github.com/xrplevm/node/v9/x/poa/types"; // Params defines the parameters for the module. message Params {} diff --git a/proto/poa/query.proto b/proto/poa/query.proto index e4e4743..9004e15 100644 --- a/proto/poa/query.proto +++ b/proto/poa/query.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "poa/params.proto"; -option go_package = "github.com/xrplevm/node/v8/x/poa/types"; +option go_package = "github.com/xrplevm/node/v9/x/poa/types"; // Query defines the gRPC querier service. service Query { diff --git a/proto/poa/tx.proto b/proto/poa/tx.proto index 12dd03c..845cde2 100644 --- a/proto/poa/tx.proto +++ b/proto/poa/tx.proto @@ -8,7 +8,7 @@ import "cosmos/staking/v1beta1/staking.proto"; import "google/protobuf/any.proto"; import "amino/amino.proto"; -option go_package = "github.com/xrplevm/node/v8/x/poa/types"; +option go_package = "github.com/xrplevm/node/v9/x/poa/types"; // Msg defines the Msg service. service Msg { diff --git a/tests/integration/network.go b/tests/integration/network.go index 9c912c9..88cbcce 100644 --- a/tests/integration/network.go +++ b/tests/integration/network.go @@ -11,10 +11,10 @@ import ( erc20types "github.com/evmos/evmos/v20/x/erc20/types" evmtypes "github.com/evmos/evmos/v20/x/evm/types" feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" - commonnetwork "github.com/xrplevm/node/v8/testutil/integration/common/network" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" - exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + commonnetwork "github.com/xrplevm/node/v9/testutil/integration/common/network" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" + exrpintegration "github.com/xrplevm/node/v9/testutil/integration/exrp/integration" + poatypes "github.com/xrplevm/node/v9/x/poa/types" ) var _ commonnetwork.Network = (*Network)(nil) diff --git a/tests/integration/poa_test.go b/tests/integration/poa_test.go index b1aafeb..24b755a 100644 --- a/tests/integration/poa_test.go +++ b/tests/integration/poa_test.go @@ -15,8 +15,8 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/testutil/integration/exrp/utils" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/testutil/integration/exrp/utils" + poatypes "github.com/xrplevm/node/v9/x/poa/types" ) // AddValidator tests diff --git a/tests/integration/slashing_test.go b/tests/integration/slashing_test.go index e22f09b..663bfe0 100644 --- a/tests/integration/slashing_test.go +++ b/tests/integration/slashing_test.go @@ -9,7 +9,7 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/testutil/integration/exrp/utils" + "github.com/xrplevm/node/v9/testutil/integration/exrp/utils" ) // Slashing tests diff --git a/tests/integration/suite.go b/tests/integration/suite.go index ab42b6c..9d7c360 100644 --- a/tests/integration/suite.go +++ b/tests/integration/suite.go @@ -5,11 +5,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" evmtypes "github.com/evmos/evmos/v20/x/evm/types" "github.com/stretchr/testify/suite" - "github.com/xrplevm/node/v8/app" - factory "github.com/xrplevm/node/v8/testutil/integration/common/factory" - "github.com/xrplevm/node/v8/testutil/integration/common/grpc" - "github.com/xrplevm/node/v8/testutil/integration/common/keyring" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + "github.com/xrplevm/node/v9/app" + factory "github.com/xrplevm/node/v9/testutil/integration/common/factory" + "github.com/xrplevm/node/v9/testutil/integration/common/grpc" + "github.com/xrplevm/node/v9/testutil/integration/common/keyring" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) type TestSuite struct { diff --git a/tests/upgrade/network.go b/tests/upgrade/network.go index 1632a9b..38eb662 100644 --- a/tests/upgrade/network.go +++ b/tests/upgrade/network.go @@ -10,10 +10,10 @@ import ( erc20types "github.com/evmos/evmos/v20/x/erc20/types" evmtypes "github.com/evmos/evmos/v20/x/evm/types" feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" - commonnetwork "github.com/xrplevm/node/v8/testutil/integration/common/network" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" - upgradenetwork "github.com/xrplevm/node/v8/testutil/integration/exrp/upgrade" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + commonnetwork "github.com/xrplevm/node/v9/testutil/integration/common/network" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" + upgradenetwork "github.com/xrplevm/node/v9/testutil/integration/exrp/upgrade" + poatypes "github.com/xrplevm/node/v9/x/poa/types" ) var _ commonnetwork.Network = (*UpgradeTestNetwork)(nil) diff --git a/tests/upgrade/suite.go b/tests/upgrade/suite.go index e4b77e2..13ce43e 100644 --- a/tests/upgrade/suite.go +++ b/tests/upgrade/suite.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - exrpupgrade "github.com/xrplevm/node/v8/testutil/integration/exrp/upgrade" + exrpupgrade "github.com/xrplevm/node/v9/testutil/integration/exrp/upgrade" ) const defaultStateFile = "upgrade-state.json" diff --git a/tests/upgrade/suite_test.go b/tests/upgrade/suite_test.go index ff51ba5..7ab0c83 100644 --- a/tests/upgrade/suite_test.go +++ b/tests/upgrade/suite_test.go @@ -6,7 +6,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/suite" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) func TestUpgradeTestSuite(t *testing.T) { diff --git a/testutil/integration/common/factory/base.go b/testutil/integration/common/factory/base.go index f1832a2..0cb8cec 100644 --- a/testutil/integration/common/factory/base.go +++ b/testutil/integration/common/factory/base.go @@ -12,8 +12,8 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" testutiltypes "github.com/cosmos/cosmos-sdk/types/module/testutil" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - "github.com/xrplevm/node/v8/testutil/integration/common/grpc" - "github.com/xrplevm/node/v8/testutil/integration/common/network" + "github.com/xrplevm/node/v9/testutil/integration/common/grpc" + "github.com/xrplevm/node/v9/testutil/integration/common/network" ) // BaseTxFactory is the interface that wraps the common methods to build and broadcast transactions diff --git a/testutil/integration/common/factory/factory.go b/testutil/integration/common/factory/factory.go index 84b4b37..d82fbb3 100644 --- a/testutil/integration/common/factory/factory.go +++ b/testutil/integration/common/factory/factory.go @@ -4,8 +4,8 @@ package factory import ( - "github.com/xrplevm/node/v8/testutil/integration/common/grpc" - "github.com/xrplevm/node/v8/testutil/integration/common/network" + "github.com/xrplevm/node/v9/testutil/integration/common/grpc" + "github.com/xrplevm/node/v9/testutil/integration/common/network" ) const ( diff --git a/testutil/integration/common/factory/fund.go b/testutil/integration/common/factory/fund.go index 448a724..4e2e81f 100644 --- a/testutil/integration/common/factory/fund.go +++ b/testutil/integration/common/factory/fund.go @@ -8,7 +8,7 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/xrplevm/node/v8/testutil/integration/common/keyring" + "github.com/xrplevm/node/v9/testutil/integration/common/keyring" ) // FundTxFactory is the interface that wraps the common methods to fund accounts diff --git a/testutil/integration/common/grpc/grpc.go b/testutil/integration/common/grpc/grpc.go index 4b37af2..2f8c8de 100644 --- a/testutil/integration/common/grpc/grpc.go +++ b/testutil/integration/common/grpc/grpc.go @@ -10,7 +10,7 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" - network "github.com/xrplevm/node/v8/testutil/integration/common/network" + network "github.com/xrplevm/node/v9/testutil/integration/common/network" ) // Handler is an interface that defines the common methods that are used to query diff --git a/testutil/integration/exrp/common/clients.go b/testutil/integration/exrp/common/clients.go index f6f5614..4213eef 100644 --- a/testutil/integration/exrp/common/clients.go +++ b/testutil/integration/exrp/common/clients.go @@ -27,8 +27,8 @@ import ( evmtypes "github.com/evmos/evmos/v20/x/evm/types" feemarketkeeper "github.com/evmos/evmos/v20/x/feemarket/keeper" feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" + poatypes "github.com/xrplevm/node/v9/x/poa/types" ) type NetworkKeepers interface { diff --git a/testutil/integration/exrp/common/config.go b/testutil/integration/exrp/common/config.go index 2ac26f5..2c69266 100644 --- a/testutil/integration/exrp/common/config.go +++ b/testutil/integration/exrp/common/config.go @@ -8,7 +8,7 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" evmostypes "github.com/evmos/evmos/v20/types" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) const ( diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index a27ca6f..f969e2a 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -11,7 +11,7 @@ import ( dbm "github.com/cosmos/cosmos-db" simutils "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/gogoproto/proto" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/testutil/integration/exrp/integration/config.go b/testutil/integration/exrp/integration/config.go index 2b2666d..78b947d 100644 --- a/testutil/integration/exrp/integration/config.go +++ b/testutil/integration/exrp/integration/config.go @@ -11,7 +11,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" testtx "github.com/evmos/evmos/v20/testutil/tx" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) // DefaultIntegrationConfig returns the default configuration for a chain. diff --git a/testutil/integration/exrp/integration/keepers.go b/testutil/integration/exrp/integration/keepers.go index e7ffa89..8cd0504 100644 --- a/testutil/integration/exrp/integration/keepers.go +++ b/testutil/integration/exrp/integration/keepers.go @@ -12,7 +12,7 @@ import ( erc20keeper "github.com/evmos/evmos/v20/x/erc20/keeper" evmkeeper "github.com/evmos/evmos/v20/x/evm/keeper" feemarketkeeper "github.com/evmos/evmos/v20/x/feemarket/keeper" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" ) func (n *IntegrationNetwork) BankKeeper() bankkeeper.Keeper { diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 7df2118..e909ca1 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -12,7 +12,7 @@ import ( sdkmath "cosmossdk.io/math" gethparams "github.com/ethereum/go-ethereum/params" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" "github.com/evmos/evmos/v20/types" @@ -27,7 +27,7 @@ import ( txtypes "github.com/cosmos/cosmos-sdk/types/tx" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) // Network is the interface that wraps the methods to interact with integration test network. diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index 1afb8b6..4b9411a 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -35,9 +35,9 @@ import ( infltypes "github.com/evmos/evmos/v20/x/inflation/v1/types" evmtypes "github.com/evmos/evmos/v20/x/evm/types" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) // genSetupFn is the type for the module genesis setup functions diff --git a/testutil/integration/exrp/integration/unit_network.go b/testutil/integration/exrp/integration/unit_network.go index a860e26..6c575ea 100644 --- a/testutil/integration/exrp/integration/unit_network.go +++ b/testutil/integration/exrp/integration/unit_network.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/evmos/evmos/v20/x/evm/statedb" inflationtypes "github.com/evmos/evmos/v20/x/inflation/v1/types" - "github.com/xrplevm/node/v8/app" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + "github.com/xrplevm/node/v9/app" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) // UnitTestIntegrationNetwork is the implementation of the Network interface for unit tests. diff --git a/testutil/integration/exrp/upgrade/config.go b/testutil/integration/exrp/upgrade/config.go index 267349f..c0d2705 100644 --- a/testutil/integration/exrp/upgrade/config.go +++ b/testutil/integration/exrp/upgrade/config.go @@ -6,7 +6,7 @@ package exrpupgrade import ( "os" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) func DefaultUpgradeConfig() exrpcommon.Config { diff --git a/testutil/integration/exrp/upgrade/keepers.go b/testutil/integration/exrp/upgrade/keepers.go index f5018e8..7d8c795 100644 --- a/testutil/integration/exrp/upgrade/keepers.go +++ b/testutil/integration/exrp/upgrade/keepers.go @@ -12,7 +12,7 @@ import ( erc20keeper "github.com/evmos/evmos/v20/x/erc20/keeper" evmkeeper "github.com/evmos/evmos/v20/x/evm/keeper" feemarketkeeper "github.com/evmos/evmos/v20/x/feemarket/keeper" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" ) func (n *UpgradeIntegrationNetwork) BankKeeper() bankkeeper.Keeper { diff --git a/testutil/integration/exrp/upgrade/network.go b/testutil/integration/exrp/upgrade/network.go index f5fe1d7..1bd4628 100644 --- a/testutil/integration/exrp/upgrade/network.go +++ b/testutil/integration/exrp/upgrade/network.go @@ -11,8 +11,8 @@ import ( "time" sdkmath "cosmossdk.io/math" - "github.com/xrplevm/node/v8/app" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + "github.com/xrplevm/node/v9/app" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" abcitypes "github.com/cometbft/cometbft/abci/types" ed25519 "github.com/cometbft/cometbft/crypto/ed25519" diff --git a/testutil/integration/exrp/upgrade/unit_network.go b/testutil/integration/exrp/upgrade/unit_network.go index 02fdbf0..cac7731 100644 --- a/testutil/integration/exrp/upgrade/unit_network.go +++ b/testutil/integration/exrp/upgrade/unit_network.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/evmos/evmos/v20/x/evm/statedb" inflationtypes "github.com/evmos/evmos/v20/x/inflation/v1/types" - "github.com/xrplevm/node/v8/app" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + "github.com/xrplevm/node/v9/app" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) // UnitTestUpgradeNetwork is the implementation of the Network interface for unit tests. diff --git a/testutil/integration/exrp/utils/gov.go b/testutil/integration/exrp/utils/gov.go index 7d2345d..8173e70 100644 --- a/testutil/integration/exrp/utils/gov.go +++ b/testutil/integration/exrp/utils/gov.go @@ -16,9 +16,9 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - commonfactory "github.com/xrplevm/node/v8/testutil/integration/common/factory" - "github.com/xrplevm/node/v8/testutil/integration/common/keyring" - "github.com/xrplevm/node/v8/testutil/integration/common/network" + commonfactory "github.com/xrplevm/node/v9/testutil/integration/common/factory" + "github.com/xrplevm/node/v9/testutil/integration/common/keyring" + "github.com/xrplevm/node/v9/testutil/integration/common/network" ) // SubmitProposal is a helper function to submit a governance proposal and diff --git a/x/poa/ante/poa_test.go b/x/poa/ante/poa_test.go index 82a300f..0e1657e 100644 --- a/x/poa/ante/poa_test.go +++ b/x/poa/ante/poa_test.go @@ -13,8 +13,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/x/poa/testutil" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/testutil" + "github.com/xrplevm/node/v9/x/poa/types" ) func setupPoaDecorator(t *testing.T) ( diff --git a/x/poa/keeper/common_test.go b/x/poa/keeper/common_test.go index 80d2f4b..321ed2c 100644 --- a/x/poa/keeper/common_test.go +++ b/x/poa/keeper/common_test.go @@ -13,8 +13,8 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/golang/mock/gomock" - "github.com/xrplevm/node/v8/x/poa/testutil" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/testutil" + "github.com/xrplevm/node/v9/x/poa/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) diff --git a/x/poa/keeper/genesis.go b/x/poa/keeper/genesis.go index e8ccf73..5006261 100644 --- a/x/poa/keeper/genesis.go +++ b/x/poa/keeper/genesis.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) // InitGenesis initializes the module's state from a provided genesis state. diff --git a/x/poa/keeper/keeper.go b/x/poa/keeper/keeper.go index 88f8e3b..8511438 100644 --- a/x/poa/keeper/keeper.go +++ b/x/poa/keeper/keeper.go @@ -17,7 +17,7 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) var _ types.QueryServer = Querier{} diff --git a/x/poa/keeper/keeper_test.go b/x/poa/keeper/keeper_test.go index ae40546..4fa4c10 100644 --- a/x/poa/keeper/keeper_test.go +++ b/x/poa/keeper/keeper_test.go @@ -10,8 +10,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/x/poa/testutil" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/testutil" + "github.com/xrplevm/node/v9/x/poa/types" ) func poaKeeperTestSetup(t *testing.T) (*Keeper, sdk.Context) { diff --git a/x/poa/keeper/msg_server.go b/x/poa/keeper/msg_server.go index 92689ee..d903e17 100644 --- a/x/poa/keeper/msg_server.go +++ b/x/poa/keeper/msg_server.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) type msgServer struct { diff --git a/x/poa/keeper/msg_server_add_validator.go b/x/poa/keeper/msg_server_add_validator.go index d435419..e436d87 100644 --- a/x/poa/keeper/msg_server_add_validator.go +++ b/x/poa/keeper/msg_server_add_validator.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" gov "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) func (k msgServer) AddValidator(goCtx context.Context, msg *types.MsgAddValidator) (*types.MsgAddValidatorResponse, error) { diff --git a/x/poa/keeper/msg_server_add_validator_test.go b/x/poa/keeper/msg_server_add_validator_test.go index e5126c7..0c4dc50 100644 --- a/x/poa/keeper/msg_server_add_validator_test.go +++ b/x/poa/keeper/msg_server_add_validator_test.go @@ -9,8 +9,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/x/poa/testutil" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/testutil" + "github.com/xrplevm/node/v9/x/poa/types" ) func TestMsgServer_AddValidator(t *testing.T) { diff --git a/x/poa/keeper/msg_server_remove_validator.go b/x/poa/keeper/msg_server_remove_validator.go index 2c72bf2..f6da45d 100644 --- a/x/poa/keeper/msg_server_remove_validator.go +++ b/x/poa/keeper/msg_server_remove_validator.go @@ -8,7 +8,7 @@ import ( gov "github.com/cosmos/cosmos-sdk/x/gov/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) func (k msgServer) RemoveValidator(goCtx context.Context, msg *types.MsgRemoveValidator) (*types.MsgRemoveValidatorResponse, error) { diff --git a/x/poa/keeper/msg_server_remove_validator_test.go b/x/poa/keeper/msg_server_remove_validator_test.go index 1dfc89f..c79da52 100644 --- a/x/poa/keeper/msg_server_remove_validator_test.go +++ b/x/poa/keeper/msg_server_remove_validator_test.go @@ -6,7 +6,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) func TestMsgServer_RemoveValidator(t *testing.T) { diff --git a/x/poa/keeper/params.go b/x/poa/keeper/params.go index 487c167..ab6a855 100644 --- a/x/poa/keeper/params.go +++ b/x/poa/keeper/params.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) // GetParams get all parameters as types.Params diff --git a/x/poa/keeper/query.go b/x/poa/keeper/query.go index 5378320..f58a50d 100644 --- a/x/poa/keeper/query.go +++ b/x/poa/keeper/query.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/poa/keeper/query_params.go b/x/poa/keeper/query_params.go index 0bbe00f..a15efaa 100644 --- a/x/poa/keeper/query_params.go +++ b/x/poa/keeper/query_params.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/poa/module.go b/x/poa/module.go index 1d91c2b..268b327 100644 --- a/x/poa/module.go +++ b/x/poa/module.go @@ -15,8 +15,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/xrplevm/node/v8/x/poa/keeper" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/keeper" + "github.com/xrplevm/node/v9/x/poa/types" ) var ( diff --git a/x/poa/module_simulation.go b/x/poa/module_simulation.go index f06e751..70b4f5c 100644 --- a/x/poa/module_simulation.go +++ b/x/poa/module_simulation.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/xrplevm/node/v8/testutil/sample" - poasimulation "github.com/xrplevm/node/v8/x/poa/simulation" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/testutil/sample" + poasimulation "github.com/xrplevm/node/v9/x/poa/simulation" + "github.com/xrplevm/node/v9/x/poa/types" ) // avoid unused import issue diff --git a/x/poa/simulation/proposals.go b/x/poa/simulation/proposals.go index 3974a09..518b7be 100644 --- a/x/poa/simulation/proposals.go +++ b/x/poa/simulation/proposals.go @@ -9,7 +9,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" ) const ( diff --git a/x/poa/simulation/proposals_test.go b/x/poa/simulation/proposals_test.go index 3bfcb8c..5278431 100644 --- a/x/poa/simulation/proposals_test.go +++ b/x/poa/simulation/proposals_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/stretchr/testify/require" - "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/x/poa/types" sdk "github.com/cosmos/cosmos-sdk/types" ) From 28e467011d173f4703581246407d34f26faac831 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 20 Aug 2025 11:49:35 +0200 Subject: [PATCH 27/66] chore: upgrade package version to v9 --- app/app.go | 30 +++++++++---------- app/simulation_test.go | 24 +++++++-------- cmd/exrpd/cmd/root.go | 2 +- tests/integration/network.go | 6 ++-- tests/integration/suite.go | 4 +-- tests/upgrade/network.go | 6 ++-- testutil/integration/exrp/common/clients.go | 4 +-- testutil/integration/exrp/common/config.go | 2 +- .../integration/exrp/integration/config.go | 2 +- .../integration/exrp/integration/keepers.go | 2 +- .../integration/exrp/integration/setup.go | 6 ++-- .../exrp/integration/unit_network.go | 4 +-- testutil/integration/exrp/upgrade/keepers.go | 2 +- .../integration/exrp/upgrade/unit_network.go | 4 +-- testutil/integration/exrp/utils/gov.go | 2 +- 15 files changed, 50 insertions(+), 50 deletions(-) diff --git a/app/app.go b/app/app.go index 2ef59ae..f750c56 100644 --- a/app/app.go +++ b/app/app.go @@ -46,7 +46,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - "github.com/xrplevm/node/v8/x/poa" + "github.com/xrplevm/node/v9/x/poa" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -124,10 +124,10 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types" - "github.com/xrplevm/node/v8/docs" - poaante "github.com/xrplevm/node/v8/x/poa/ante" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + "github.com/xrplevm/node/v9/docs" + poaante "github.com/xrplevm/node/v9/x/poa/ante" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" + poatypes "github.com/xrplevm/node/v9/x/poa/types" srvflags "github.com/cosmos/evm/server/flags" @@ -857,16 +857,16 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { EvmKeeper: app.EvmKeeper, FeegrantKeeper: app.FeeGrantKeeper, // TODO: Update when migrating to v10 - IBCKeeper: app.IBCKeeper, - FeeMarketKeeper: app.FeeMarketKeeper, - SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: maxGasWanted, - TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), + IBCKeeper: app.IBCKeeper, + FeeMarketKeeper: app.FeeMarketKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: maxGasWanted, + TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), }, - StakingKeeper: app.StakingKeeper, - DistributionKeeper: app.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + StakingKeeper: app.StakingKeeper, + DistributionKeeper: app.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), @@ -953,7 +953,7 @@ func (app *App) BlockedModuleAccountAddrs() map[string]bool { } blockedPrecompilesHex := evmtypes.AvailableStaticPrecompiles - for _, addr := range vm.PrecompiledAddressesPrague{ + for _, addr := range vm.PrecompiledAddressesPrague { blockedPrecompilesHex = append(blockedPrecompilesHex, addr.Hex()) } diff --git a/app/simulation_test.go b/app/simulation_test.go index fc034e8..d792ebf 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -14,8 +14,8 @@ import ( ethante "github.com/cosmos/evm/ante/evm" "github.com/cosmos/evm/crypto/ethsecp256k1" etherminttypes "github.com/cosmos/evm/types" - "github.com/xrplevm/node/v8/app" - poaante "github.com/xrplevm/node/v8/x/poa/ante" + "github.com/xrplevm/node/v9/app" + poaante "github.com/xrplevm/node/v9/x/poa/ante" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" @@ -35,7 +35,7 @@ func init() { } const ( - SimAppChainID = "simulation_777-1" + SimAppChainID = "simulation_777-1" SimAppEVMChainID = 777 ) @@ -67,16 +67,16 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap EvmKeeper: bApp.EvmKeeper, FeegrantKeeper: bApp.FeeGrantKeeper, // TODO: Update when migrating to v10 - IBCKeeper: bApp.IBCKeeper, - FeeMarketKeeper: bApp.FeeMarketKeeper, - SignModeHandler: bApp.GetTxConfig().SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: 0, - TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), + IBCKeeper: bApp.IBCKeeper, + FeeMarketKeeper: bApp.FeeMarketKeeper, + SignModeHandler: bApp.GetTxConfig().SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: 0, + TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), }, - StakingKeeper: bApp.StakingKeeper, - DistributionKeeper: bApp.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + StakingKeeper: bApp.StakingKeeper, + DistributionKeeper: bApp.DistrKeeper, + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 8aa44a5..ca800cd 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -48,7 +48,7 @@ import ( evmserver "github.com/cosmos/evm/client" ethermintserver "github.com/cosmos/evm/server" ethermintservercfg "github.com/cosmos/evm/server/config" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) type emptyAppOptions struct{} diff --git a/tests/integration/network.go b/tests/integration/network.go index 401aea3..ce1d959 100644 --- a/tests/integration/network.go +++ b/tests/integration/network.go @@ -11,9 +11,9 @@ import ( erc20types "github.com/cosmos/evm/x/erc20/types" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmtypes "github.com/cosmos/evm/x/vm/types" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" - exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" + exrpintegration "github.com/xrplevm/node/v9/testutil/integration/exrp/integration" + poatypes "github.com/xrplevm/node/v9/x/poa/types" ) // TODO: Update when migrating to v10 diff --git a/tests/integration/suite.go b/tests/integration/suite.go index bb8fe7c..79c0729 100644 --- a/tests/integration/suite.go +++ b/tests/integration/suite.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/evm/testutil/integration/os/keyring" evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/stretchr/testify/suite" - "github.com/xrplevm/node/v8/app" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + "github.com/xrplevm/node/v9/app" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) type TestSuite struct { diff --git a/tests/upgrade/network.go b/tests/upgrade/network.go index 5f8590f..d50a714 100644 --- a/tests/upgrade/network.go +++ b/tests/upgrade/network.go @@ -10,9 +10,9 @@ import ( erc20types "github.com/cosmos/evm/x/erc20/types" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmtypes "github.com/cosmos/evm/x/vm/types" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" - upgradenetwork "github.com/xrplevm/node/v8/testutil/integration/exrp/upgrade" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" + upgradenetwork "github.com/xrplevm/node/v9/testutil/integration/exrp/upgrade" + poatypes "github.com/xrplevm/node/v9/x/poa/types" ) var _ exrpcommon.Network = (*UpgradeTestNetwork)(nil) diff --git a/testutil/integration/exrp/common/clients.go b/testutil/integration/exrp/common/clients.go index 652d524..dfa8149 100644 --- a/testutil/integration/exrp/common/clients.go +++ b/testutil/integration/exrp/common/clients.go @@ -27,8 +27,8 @@ import ( feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmkeeper "github.com/cosmos/evm/x/vm/keeper" evmtypes "github.com/cosmos/evm/x/vm/types" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" - poatypes "github.com/xrplevm/node/v8/x/poa/types" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" + poatypes "github.com/xrplevm/node/v9/x/poa/types" ) type NetworkKeepers interface { diff --git a/testutil/integration/exrp/common/config.go b/testutil/integration/exrp/common/config.go index f3d45a7..51efbb3 100644 --- a/testutil/integration/exrp/common/config.go +++ b/testutil/integration/exrp/common/config.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" sdktypes "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) const ( diff --git a/testutil/integration/exrp/integration/config.go b/testutil/integration/exrp/integration/config.go index 2ca4a9e..92d6f74 100644 --- a/testutil/integration/exrp/integration/config.go +++ b/testutil/integration/exrp/integration/config.go @@ -11,7 +11,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" testtx "github.com/cosmos/evm/testutil/tx" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) // DefaultIntegrationConfig returns the default configuration for a chain. diff --git a/testutil/integration/exrp/integration/keepers.go b/testutil/integration/exrp/integration/keepers.go index 543b030..64c4a9c 100644 --- a/testutil/integration/exrp/integration/keepers.go +++ b/testutil/integration/exrp/integration/keepers.go @@ -12,7 +12,7 @@ import ( erc20keeper "github.com/cosmos/evm/x/erc20/keeper" feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" evmkeeper "github.com/cosmos/evm/x/vm/keeper" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" ) func (n *IntegrationNetwork) BankKeeper() bankkeeper.Keeper { diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index a41a197..93c9a2b 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -33,9 +33,9 @@ import ( feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmtypes "github.com/cosmos/evm/x/vm/types" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" - "github.com/xrplevm/node/v8/app" + "github.com/xrplevm/node/v9/app" ) // genSetupFn is the type for the module genesis setup functions @@ -110,7 +110,7 @@ func createGenesisAccounts(accounts []sdktypes.AccAddress) []authtypes.GenesisAc emptyCodeHash := crypto.Keccak256Hash(nil).String() for _, acc := range accounts { baseAcc := authtypes.NewBaseAccount(acc, nil, 0, 0) - // TODO: Update when replacing with forked cosmos/evm version is installed + // TODO: Update when replacing with forked cosmos/evm version is installed ethAcc := &evmostypes.EthAccount{ BaseAccount: baseAcc, CodeHash: emptyCodeHash, diff --git a/testutil/integration/exrp/integration/unit_network.go b/testutil/integration/exrp/integration/unit_network.go index 234df0c..54cb8af 100644 --- a/testutil/integration/exrp/integration/unit_network.go +++ b/testutil/integration/exrp/integration/unit_network.go @@ -7,8 +7,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/evm/x/vm/statedb" "github.com/ethereum/go-ethereum/common" - "github.com/xrplevm/node/v8/app" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + "github.com/xrplevm/node/v9/app" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) // UnitTestIntegrationNetwork is the implementation of the Network interface for unit tests. diff --git a/testutil/integration/exrp/upgrade/keepers.go b/testutil/integration/exrp/upgrade/keepers.go index 7224f3b..13383f8 100644 --- a/testutil/integration/exrp/upgrade/keepers.go +++ b/testutil/integration/exrp/upgrade/keepers.go @@ -12,7 +12,7 @@ import ( erc20keeper "github.com/cosmos/evm/x/erc20/keeper" feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" evmkeeper "github.com/cosmos/evm/x/vm/keeper" - poakeeper "github.com/xrplevm/node/v8/x/poa/keeper" + poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" ) func (n *UpgradeIntegrationNetwork) BankKeeper() bankkeeper.Keeper { diff --git a/testutil/integration/exrp/upgrade/unit_network.go b/testutil/integration/exrp/upgrade/unit_network.go index d4b432f..2a5b6d0 100644 --- a/testutil/integration/exrp/upgrade/unit_network.go +++ b/testutil/integration/exrp/upgrade/unit_network.go @@ -7,8 +7,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/evm/x/vm/statedb" "github.com/ethereum/go-ethereum/common" - "github.com/xrplevm/node/v8/app" - exrpcommon "github.com/xrplevm/node/v8/testutil/integration/exrp/common" + "github.com/xrplevm/node/v9/app" + exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" ) // UnitTestUpgradeNetwork is the implementation of the Network interface for unit tests. diff --git a/testutil/integration/exrp/utils/gov.go b/testutil/integration/exrp/utils/gov.go index 92fb680..4a5affc 100644 --- a/testutil/integration/exrp/utils/gov.go +++ b/testutil/integration/exrp/utils/gov.go @@ -18,7 +18,7 @@ import ( govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/evm/testutil/integration/common/factory" "github.com/cosmos/evm/testutil/integration/os/keyring" - exrpintegration "github.com/xrplevm/node/v8/testutil/integration/exrp/integration" + exrpintegration "github.com/xrplevm/node/v9/testutil/integration/exrp/integration" ) // SubmitProposal is a helper function to submit a governance proposal and From bd19f9a003c7b704a61364498d50c9a382da394a Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 20 Aug 2025 12:25:11 +0200 Subject: [PATCH 28/66] fix(testutil): node version import --- testutil/integration/exrp/common/coins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testutil/integration/exrp/common/coins.go b/testutil/integration/exrp/common/coins.go index 81236da..8697187 100644 --- a/testutil/integration/exrp/common/coins.go +++ b/testutil/integration/exrp/common/coins.go @@ -3,7 +3,7 @@ package exrpcommon import ( "github.com/cosmos/evm/testutil/integration/evm/network" evmtypes "github.com/cosmos/evm/x/vm/types" - testconstants "github.com/xrplevm/node/v8/testutil/constants" + testconstants "github.com/xrplevm/node/v9/testutil/constants" ) var defaultChain = testconstants.LocalnetChainID From 3ad6ae32c711a95f9fa0e2a96ef04ca0b9e276dc Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 20 Aug 2025 12:54:57 +0200 Subject: [PATCH 29/66] feat(app): add v9 upgrade handler --- app/upgrades.go | 10 +++++++ app/upgrades/v9/constants.go | 5 ++++ app/upgrades/v9/keepers.go | 11 ++++++++ app/upgrades/v9/upgrades.go | 52 ++++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 app/upgrades/v9/constants.go create mode 100644 app/upgrades/v9/keepers.go create mode 100644 app/upgrades/v9/upgrades.go diff --git a/app/upgrades.go b/app/upgrades.go index 3b7c401..eac62d4 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -5,6 +5,7 @@ import ( storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" + v9 "github.com/xrplevm/node/v9/app/upgrades/v9" v5 "github.com/xrplevm/node/v9/app/upgrades/v5" v6 "github.com/xrplevm/node/v9/app/upgrades/v6" @@ -41,6 +42,15 @@ func (app *App) setupUpgradeHandlers() { app.configurator, ), ) + app.UpgradeKeeper.SetUpgradeHandler( + v9.UpgradeName, + v9.CreateUpgradeHandler( + app.mm, + app.configurator, + app.keys, + app.Erc20Keeper, + ), + ) // When a planned update height is reached, the old binary will panic // writing on disk the height and name of the update that triggered it diff --git a/app/upgrades/v9/constants.go b/app/upgrades/v9/constants.go new file mode 100644 index 0000000..f09e952 --- /dev/null +++ b/app/upgrades/v9/constants.go @@ -0,0 +1,5 @@ +package v9 + +const ( + UpgradeName = "v9.0.0" +) diff --git a/app/upgrades/v9/keepers.go b/app/upgrades/v9/keepers.go new file mode 100644 index 0000000..dc9b6ef --- /dev/null +++ b/app/upgrades/v9/keepers.go @@ -0,0 +1,11 @@ +package v9 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" +) + +type ERC20Keeper interface { + SetDynamicPrecompile(ctx sdk.Context, precompile common.Address) + SetNativePrecompile(ctx sdk.Context, precompile common.Address) +} diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go new file mode 100644 index 0000000..f96b242 --- /dev/null +++ b/app/upgrades/v9/upgrades.go @@ -0,0 +1,52 @@ +package v9 + +import ( + "context" + + storetypes "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + + erc20types "github.com/cosmos/evm/x/erc20/types" + "github.com/ethereum/go-ethereum/common" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + storeKeys map[string]*storetypes.KVStoreKey, + erc20Keeper ERC20Keeper, +) upgradetypes.UpgradeHandler { + return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + ctx := sdk.UnwrapSDKContext(c) + logger := ctx.Logger().With("upgrade", UpgradeName) + logger.Info("Running v9 upgrade handler...") + + // In your upgrade handler + store := ctx.KVStore(storeKeys[erc20types.StoreKey]) + const addressLength = 42 // "0x" + 40 hex characters + + // Migrate dynamic precompiles (IBC tokens, token factory) + if oldData := store.Get([]byte("DynamicPrecompiles")); len(oldData) > 0 { + for i := 0; i < len(oldData); i += addressLength { + address := common.HexToAddress(string(oldData[i : i+addressLength])) + erc20Keeper.SetDynamicPrecompile(ctx, address) + } + store.Delete([]byte("DynamicPrecompiles")) + } + + // Migrate native precompiles + if oldData := store.Get([]byte("NativePrecompiles")); len(oldData) > 0 { + for i := 0; i < len(oldData); i += addressLength { + address := common.HexToAddress(string(oldData[i : i+addressLength])) + erc20Keeper.SetNativePrecompile(ctx, address) + } + store.Delete([]byte("NativePrecompiles")) + } + + logger.Info("Finished v9 upgrade handler") + + return mm.RunMigrations(ctx, configurator, vm) + } +} From 21d77dff9b21a1012f9715155e6ef475cdb81a94 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 21 Aug 2025 13:05:49 +0200 Subject: [PATCH 30/66] tmp(legacy): bring evmos legacy types to register implementations to codec --- app/encoding.go | 14 + go.mod | 5 + go.sum | 13 +- legacy/types/account.go | 85 ++++++ legacy/types/account.pb.go | 377 ++++++++++++++++++++++++ legacy/types/account_test.go | 58 ++++ legacy/types/benchmark_test.go | 17 ++ legacy/types/block.go | 41 +++ legacy/types/chain_id.go | 57 ++++ legacy/types/chain_id_test.go | 87 ++++++ legacy/types/codec.go | 28 ++ legacy/types/coin.go | 50 ++++ legacy/types/dynamic_fee.go | 13 + legacy/types/dynamic_fee.pb.go | 324 ++++++++++++++++++++ legacy/types/errors.go | 14 + legacy/types/gasmeter.go | 108 +++++++ legacy/types/genesis.go | 14 + legacy/types/hdpath.go | 34 +++ legacy/types/indexer.go | 21 ++ legacy/types/indexer.pb.go | 487 +++++++++++++++++++++++++++++++ legacy/types/int.go | 38 +++ legacy/types/protocol.go | 11 + legacy/types/tests/test_utils.go | 40 +++ legacy/types/validation.go | 44 +++ legacy/types/validation_test.go | 144 +++++++++ legacy/types/web3.pb.go | 400 +++++++++++++++++++++++++ 26 files changed, 2518 insertions(+), 6 deletions(-) create mode 100644 legacy/types/account.go create mode 100644 legacy/types/account.pb.go create mode 100644 legacy/types/account_test.go create mode 100644 legacy/types/benchmark_test.go create mode 100644 legacy/types/block.go create mode 100644 legacy/types/chain_id.go create mode 100644 legacy/types/chain_id_test.go create mode 100644 legacy/types/codec.go create mode 100644 legacy/types/coin.go create mode 100644 legacy/types/dynamic_fee.go create mode 100644 legacy/types/dynamic_fee.pb.go create mode 100644 legacy/types/errors.go create mode 100644 legacy/types/gasmeter.go create mode 100644 legacy/types/genesis.go create mode 100644 legacy/types/hdpath.go create mode 100644 legacy/types/indexer.go create mode 100644 legacy/types/indexer.pb.go create mode 100644 legacy/types/int.go create mode 100644 legacy/types/protocol.go create mode 100644 legacy/types/tests/test_utils.go create mode 100644 legacy/types/validation.go create mode 100644 legacy/types/validation_test.go create mode 100644 legacy/types/web3.pb.go diff --git a/app/encoding.go b/app/encoding.go index f5108e4..ce78965 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -1,6 +1,20 @@ package app +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/evm/types" + legacytypes "github.com/xrplevm/node/v9/legacy/types" +) + // MakeEncodingConfig creates an EncodingConfig for testing // func MakeEncodingConfig() params.EncodingConfig { // return evmenc.MakeConfig(ModuleBasics) // } + +func (app *App) RegisterLegacyInterfaces(reg codectypes.InterfaceRegistry) { + reg.RegisterImplementations((*authtypes.AccountI)(nil), + &types.EthAccount{}, // cosmos/evm + &legacytypes.EthAccount{}, // evmos + ) +} diff --git a/go.mod b/go.mod index a65b031..91cb15a 100644 --- a/go.mod +++ b/go.mod @@ -89,6 +89,7 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect github.com/consensys/gnark-crypto v0.18.0 // indirect + github.com/containerd/continuity v0.4.3 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -193,6 +194,8 @@ require ( 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/image-spec v1.1.0 // indirect + github.com/opencontainers/runc v1.1.13 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pion/dtls/v2 v2.2.7 // indirect @@ -285,6 +288,8 @@ replace ( github.com/cosmos/evm => ../evm // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 + // use exrp Evmos fork + github.com/evmos/evmos/v20 => github.com/xrplevm/evmos/v20 v20.0.0-exrp.7 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb diff --git a/go.sum b/go.sum index b8d6e0c..3974c17 100644 --- a/go.sum +++ b/go.sum @@ -843,8 +843,8 @@ github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= github.com/consensys/gnark-crypto v0.18.0 h1:vIye/FqI50VeAr0B3dx+YjeIvmc3LWz4yEfbWBpTUf0= github.com/consensys/gnark-crypto v0.18.0/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= +github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -1500,10 +1500,10 @@ github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJ github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -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/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= +github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= 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= @@ -1620,6 +1620,7 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= +github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= 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= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= diff --git a/legacy/types/account.go b/legacy/types/account.go new file mode 100644 index 0000000..3f7f418 --- /dev/null +++ b/legacy/types/account.go @@ -0,0 +1,85 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "bytes" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +var ( + _ sdk.AccountI = (*EthAccount)(nil) + _ EthAccountI = (*EthAccount)(nil) + _ authtypes.GenesisAccount = (*EthAccount)(nil) + _ codectypes.UnpackInterfacesMessage = (*EthAccount)(nil) +) + +var emptyCodeHash = crypto.Keccak256(nil) + +const ( + // AccountTypeEOA defines the type for externally owned accounts (EOAs) + AccountTypeEOA = int8(iota + 1) + // AccountTypeContract defines the type for contract accounts + AccountTypeContract +) + +// EthAccountI represents the interface of an EVM compatible account +type EthAccountI interface { + sdk.AccountI + // EthAddress returns the ethereum Address representation of the AccAddress + EthAddress() common.Address + // CodeHash is the keccak256 hash of the contract code (if any) + GetCodeHash() common.Hash + // SetCodeHash sets the code hash to the account fields + SetCodeHash(code common.Hash) error + // Type returns the type of Ethereum Account (EOA or Contract) + Type() int8 +} + +// ---------------------------------------------------------------------------- +// Main Evmos account +// ---------------------------------------------------------------------------- + +// ProtoAccount defines the prototype function for BaseAccount used for an +// AccountKeeper. +func ProtoAccount() sdk.AccountI { + return &EthAccount{ + BaseAccount: &authtypes.BaseAccount{}, + CodeHash: common.BytesToHash(emptyCodeHash).String(), + } +} + +// GetBaseAccount returns base account. +func (acc EthAccount) GetBaseAccount() *authtypes.BaseAccount { + return acc.BaseAccount +} + +// EthAddress returns the account address ethereum format. +func (acc EthAccount) EthAddress() common.Address { + return common.BytesToAddress(acc.GetAddress().Bytes()) +} + +// GetCodeHash returns the account code hash in byte format +func (acc EthAccount) GetCodeHash() common.Hash { + return common.HexToHash(acc.CodeHash) +} + +// SetCodeHash sets the account code hash to the EthAccount fields +func (acc *EthAccount) SetCodeHash(codeHash common.Hash) error { + acc.CodeHash = codeHash.Hex() + return nil +} + +// Type returns the type of Ethereum Account (EOA or Contract) +func (acc EthAccount) Type() int8 { + if bytes.Equal(emptyCodeHash, common.HexToHash(acc.CodeHash).Bytes()) { + return AccountTypeEOA + } + return AccountTypeContract +} diff --git a/legacy/types/account.pb.go b/legacy/types/account.pb.go new file mode 100644 index 0000000..a2614cb --- /dev/null +++ b/legacy/types/account.pb.go @@ -0,0 +1,377 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/account.proto + +package types + +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" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EthAccount implements the authtypes.AccountI interface and embeds an +// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. +type EthAccount struct { + // base_account is an authtypes.BaseAccount + *types.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty" yaml:"base_account"` + // code_hash is the hash calculated from the code contents + CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"` +} + +func (m *EthAccount) Reset() { *m = EthAccount{} } +func (*EthAccount) ProtoMessage() {} +func (*EthAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_4edc057d42a619ef, []int{0} +} +func (m *EthAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EthAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthAccount.Merge(m, src) +} +func (m *EthAccount) XXX_Size() int { + return m.Size() +} +func (m *EthAccount) XXX_DiscardUnknown() { + xxx_messageInfo_EthAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_EthAccount proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EthAccount)(nil), "ethermint.types.v1.EthAccount") +} + +func init() { proto.RegisterFile("ethermint/types/v1/account.proto", fileDescriptor_4edc057d42a619ef) } + +var fileDescriptor_4edc057d42a619ef = []byte{ + // 319 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, + 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xab, + 0xd0, 0x03, 0xab, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x4b, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, + 0x2c, 0x2d, 0xc9, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0x04, 0x73, 0x20, 0x7a, 0xa4, + 0x24, 0x21, 0xf2, 0xf1, 0x60, 0x9e, 0x3e, 0x84, 0x03, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x87, + 0x88, 0x83, 0x58, 0x10, 0x51, 0xa5, 0x9f, 0x8c, 0x5c, 0x5c, 0xae, 0x25, 0x19, 0x8e, 0x10, 0x9b, + 0x85, 0x12, 0xb8, 0x78, 0x92, 0x12, 0x8b, 0x53, 0xe3, 0xa1, 0x2e, 0x91, 0x60, 0x54, 0x60, 0xd4, + 0xe0, 0x36, 0x52, 0xd0, 0x83, 0x9a, 0x04, 0xb6, 0x09, 0x6a, 0xad, 0x9e, 0x53, 0x62, 0x71, 0x2a, + 0x54, 0x9f, 0x93, 0xf4, 0x85, 0x7b, 0xf2, 0x8c, 0x9f, 0xee, 0xc9, 0x0b, 0x57, 0x26, 0xe6, 0xe6, + 0x58, 0x29, 0x21, 0x9b, 0xa1, 0x14, 0xc4, 0x9d, 0x84, 0x50, 0x29, 0x64, 0xc8, 0xc5, 0x99, 0x9c, + 0x9f, 0x92, 0x1a, 0x9f, 0x91, 0x58, 0x9c, 0x21, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xf2, + 0xe9, 0x9e, 0xbc, 0x00, 0x44, 0x23, 0x5c, 0x4a, 0x29, 0x88, 0x03, 0xc4, 0xf6, 0x48, 0x2c, 0xce, + 0xb0, 0x0a, 0xeb, 0x58, 0x20, 0xcf, 0x30, 0x63, 0x81, 0x3c, 0xc3, 0x8b, 0x05, 0xf2, 0x0c, 0xa7, + 0xb6, 0xe8, 0xba, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0x42, 0xbd, 0x08, + 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x20, 0x81, 0x03, 0x09, 0x32, 0x6c, 0xee, 0x86, 0xba, + 0xc4, 0xd3, 0xc9, 0xea, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, + 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x14, 0x90, + 0x6c, 0x48, 0x2d, 0x03, 0x59, 0x00, 0x21, 0xcb, 0x8c, 0x0c, 0x20, 0x06, 0x27, 0xb1, 0x81, 0x83, + 0xcf, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x52, 0xb6, 0xfb, 0x41, 0xc7, 0x01, 0x00, 0x00, +} + +func (m *EthAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EthAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintAccount(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0x12 + } + if m.BaseAccount != nil { + { + size, err := m.BaseAccount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAccount(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { + offset -= sovAccount(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EthAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseAccount != nil { + l = m.BaseAccount.Size() + n += 1 + l + sovAccount(uint64(l)) + } + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovAccount(uint64(l)) + } + return n +} + +func sovAccount(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAccount(x uint64) (n int) { + return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EthAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EthAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseAccount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAccount + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BaseAccount == nil { + m.BaseAccount = &types.BaseAccount{} + } + if err := m.BaseAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAccount + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAccount(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAccount + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAccount(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccount + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccount + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccount + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAccount + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAccount + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAccount + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/types/account_test.go b/legacy/types/account_test.go new file mode 100644 index 0000000..8ee125a --- /dev/null +++ b/legacy/types/account_test.go @@ -0,0 +1,58 @@ +package types_test + +import ( + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + cryptocodec "github.com/evmos/evmos/v20/crypto/codec" + "github.com/evmos/evmos/v20/crypto/ethsecp256k1" + encodingcodec "github.com/evmos/evmos/v20/encoding/codec" + "github.com/evmos/evmos/v20/types" +) + +func init() { + amino := codec.NewLegacyAmino() + cryptocodec.RegisterCrypto(amino) +} + +type AccountTestSuite struct { + suite.Suite + + account *types.EthAccount + cdc codec.JSONCodec +} + +func (suite *AccountTestSuite) SetupTest() { + privKey, err := ethsecp256k1.GenerateKey() + suite.Require().NoError(err) + pubKey := privKey.PubKey() + addr := sdk.AccAddress(pubKey.Address()) + baseAcc := authtypes.NewBaseAccount(addr, pubKey, 10, 50) + suite.account = &types.EthAccount{ + BaseAccount: baseAcc, + CodeHash: common.Hash{}.String(), + } + + interfaceRegistry := codectypes.NewInterfaceRegistry() + encodingcodec.RegisterInterfaces(interfaceRegistry) + suite.cdc = codec.NewProtoCodec(interfaceRegistry) +} + +func TestAccountTestSuite(t *testing.T) { + suite.Run(t, new(AccountTestSuite)) +} + +func (suite *AccountTestSuite) TestAccountType() { + suite.account.CodeHash = common.BytesToHash(crypto.Keccak256(nil)).Hex() + suite.Require().Equal(types.AccountTypeEOA, suite.account.Type()) + suite.account.CodeHash = common.BytesToHash(crypto.Keccak256([]byte{1, 2, 3})).Hex() + suite.Require().Equal(types.AccountTypeContract, suite.account.Type()) +} diff --git a/legacy/types/benchmark_test.go b/legacy/types/benchmark_test.go new file mode 100644 index 0000000..8636ec5 --- /dev/null +++ b/legacy/types/benchmark_test.go @@ -0,0 +1,17 @@ +package types + +import ( + "fmt" + "testing" +) + +func BenchmarkParseChainID(b *testing.B) { + b.ReportAllocs() + // Start at 1, for valid EIP155, see regexEIP155 variable. + for i := 1; i < b.N; i++ { + chainID := fmt.Sprintf("evmos_1-%d", i) + if _, err := ParseChainID(chainID); err != nil { + b.Fatal(err) + } + } +} diff --git a/legacy/types/block.go b/legacy/types/block.go new file mode 100644 index 0000000..36c1f18 --- /dev/null +++ b/legacy/types/block.go @@ -0,0 +1,41 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + math "math" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// BlockGasLimit returns the max gas (limit) defined in the block gas meter. If the meter is not +// set, it returns the max gas from the application consensus params. +// NOTE: see https://github.com/cosmos/cosmos-sdk/issues/9514 for full reference +func BlockGasLimit(ctx sdk.Context) uint64 { + blockGasMeter := ctx.BlockGasMeter() + + // Get the limit from the gas meter only if its not null and not an InfiniteGasMeter + if blockGasMeter != nil && blockGasMeter.Limit() != 0 { + return blockGasMeter.Limit() + } + + // Otherwise get from the consensus parameters + cp := ctx.ConsensusParams() + if cp.Block == nil { + return 0 + } + + maxGas := cp.Block.MaxGas + + // Setting max_gas to -1 in Tendermint means there is no limit on the maximum gas consumption for transactions + // https://github.com/cometbft/cometbft/blob/v0.37.2/proto/tendermint/types/params.proto#L25-L27 + if maxGas == -1 { + return math.MaxUint64 + } + + if maxGas > 0 { + return uint64(maxGas) // #nosec G701 -- maxGas is int64 type. It can never be greater than math.MaxUint64 + } + + return 0 +} diff --git a/legacy/types/chain_id.go b/legacy/types/chain_id.go new file mode 100644 index 0000000..b895d42 --- /dev/null +++ b/legacy/types/chain_id.go @@ -0,0 +1,57 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "fmt" + "math/big" + "regexp" + "strings" + + errorsmod "cosmossdk.io/errors" +) + +var ( + regexChainID = `[a-z]{1,}` + regexEIP155Separator = `_{1}` + regexEIP155 = `[1-9][0-9]*` + regexEpochSeparator = `-{1}` + regexEpoch = `[1-9][0-9]*` + evmosChainID = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)%s(%s)$`, + regexChainID, + regexEIP155Separator, + regexEIP155, + regexEpochSeparator, + regexEpoch)) +) + +// IsValidChainID returns false if the given chain identifier is incorrectly formatted. +func IsValidChainID(chainID string) bool { + if len(chainID) > 48 { + return false + } + + return evmosChainID.MatchString(chainID) +} + +// ParseChainID parses a string chain identifier's epoch to an Ethereum-compatible +// chain-id in *big.Int format. The function returns an error if the chain-id has an invalid format +func ParseChainID(chainID string) (*big.Int, error) { + chainID = strings.TrimSpace(chainID) + if len(chainID) > 48 { + return nil, errorsmod.Wrapf(ErrInvalidChainID, "chain-id '%s' cannot exceed 48 chars", chainID) + } + + matches := evmosChainID.FindStringSubmatch(chainID) + if matches == nil || len(matches) != 4 || matches[1] == "" { + return nil, errorsmod.Wrapf(ErrInvalidChainID, "%s: %v", chainID, matches) + } + + // verify that the chain-id entered is a base 10 integer + chainIDInt, ok := new(big.Int).SetString(matches[2], 10) + if !ok { + return nil, errorsmod.Wrapf(ErrInvalidChainID, "epoch %s must be base-10 integer format", matches[2]) + } + + return chainIDInt, nil +} diff --git a/legacy/types/chain_id_test.go b/legacy/types/chain_id_test.go new file mode 100644 index 0000000..f7c6cfa --- /dev/null +++ b/legacy/types/chain_id_test.go @@ -0,0 +1,87 @@ +package types + +import ( + "math/big" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestParseChainID(t *testing.T) { + testCases := []struct { + name string + chainID string + expError bool + expInt *big.Int + }{ + { + "valid chain-id, single digit", "evmos_1-1", false, big.NewInt(1), + }, + { + "valid chain-id, multiple digits", "aragonchain_256-1", false, big.NewInt(256), + }, + { + "invalid chain-id, double dash", "aragonchain-1-1", true, nil, + }, + { + "invalid chain-id, double underscore", "aragonchain_1_1", true, nil, + }, + { + "invalid chain-id, dash only", "-", true, nil, + }, + { + "invalid chain-id, undefined identifier and EIP155", "-1", true, nil, + }, + { + "invalid chain-id, undefined identifier", "_1-1", true, nil, + }, + { + "invalid chain-id, uppercases", "EVMOS_1-1", true, nil, + }, + { + "invalid chain-id, mixed cases", "Evmos_1-1", true, nil, + }, + { + "invalid chain-id, special chars", "$&*#!_1-1", true, nil, + }, + { + "invalid eip155 chain-id, cannot start with 0", "evmos_001-1", true, nil, + }, + { + "invalid eip155 chain-id, cannot invalid base", "evmos_0x212-1", true, nil, + }, + { + "invalid eip155 chain-id, non-integer", "evmos_evmos_9000-1", true, nil, + }, + { + "invalid epoch, undefined", "evmos_-", true, nil, + }, + { + "blank chain ID", " ", true, nil, + }, + { + "empty chain ID", "", true, nil, + }, + { + "empty content for chain id, eip155 and epoch numbers", "_-", true, nil, + }, + { + "long chain-id", "evmos_" + strings.Repeat("1", 45) + "-1", true, nil, + }, + } + + for _, tc := range testCases { + chainIDEpoch, err := ParseChainID(tc.chainID) + if tc.expError { + require.Error(t, err, tc.name) + require.Nil(t, chainIDEpoch) + + require.False(t, IsValidChainID(tc.chainID), tc.name) + } else { + require.NoError(t, err, tc.name) + require.Equal(t, tc.expInt, chainIDEpoch, tc.name) + require.True(t, IsValidChainID(tc.chainID)) + } + } +} diff --git a/legacy/types/codec.go b/legacy/types/codec.go new file mode 100644 index 0000000..2fe1de6 --- /dev/null +++ b/legacy/types/codec.go @@ -0,0 +1,28 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// RegisterInterfaces registers the tendermint concrete client-related +// implementations and interfaces. +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.AccountI)(nil), + &EthAccount{}, + ) + registry.RegisterImplementations( + (*authtypes.GenesisAccount)(nil), + &EthAccount{}, + ) + registry.RegisterImplementations( + (*tx.TxExtensionOptionI)(nil), + &ExtensionOptionsWeb3Tx{}, + &ExtensionOptionDynamicFeeTx{}, + ) +} diff --git a/legacy/types/coin.go b/legacy/types/coin.go new file mode 100644 index 0000000..597253b --- /dev/null +++ b/legacy/types/coin.go @@ -0,0 +1,50 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math/big" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + // AttoEvmos defines the default coin denomination used in Evmos in: + // + // - Staking parameters: denomination used as stake in the dPoS chain + // - Mint parameters: denomination minted due to fee distribution rewards + // - Governance parameters: denomination used for spam prevention in proposal deposits + // - Crisis parameters: constant fee denomination used for spam prevention to check broken invariant + // - EVM parameters: denomination used for running EVM state transitions in Evmos. + AttoEvmos string = "aevmos" + + // BaseDenomUnit defines the base denomination unit for Evmos. + // 1 evmos = 1x10^{BaseDenomUnit} aevmos + BaseDenomUnit = 18 + + // DefaultGasPrice is default gas price for evm transactions + DefaultGasPrice = 20 +) + +// PowerReduction defines the default power reduction value for staking +var PowerReduction = sdkmath.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(BaseDenomUnit), nil)) + +// NewEvmosCoin is a utility function that returns an "aevmos" coin with the given sdkmath.Int amount. +// The function will panic if the provided amount is negative. +func NewEvmosCoin(amount sdkmath.Int) sdk.Coin { + return sdk.NewCoin(AttoEvmos, amount) +} + +// NewEvmosDecCoin is a utility function that returns an "aevmos" decimal coin with the given sdkmath.Int amount. +// The function will panic if the provided amount is negative. +func NewEvmosDecCoin(amount sdkmath.Int) sdk.DecCoin { + return sdk.NewDecCoin(AttoEvmos, amount) +} + +// NewEvmosCoinInt64 is a utility function that returns an "aevmos" coin with the given int64 amount. +// The function will panic if the provided amount is negative. +func NewEvmosCoinInt64(amount int64) sdk.Coin { + return sdk.NewInt64Coin(AttoEvmos, amount) +} diff --git a/legacy/types/dynamic_fee.go b/legacy/types/dynamic_fee.go new file mode 100644 index 0000000..75f399d --- /dev/null +++ b/legacy/types/dynamic_fee.go @@ -0,0 +1,13 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" +) + +// HasDynamicFeeExtensionOption returns true if the tx implements the `ExtensionOptionDynamicFeeTx` extension option. +func HasDynamicFeeExtensionOption(any *codectypes.Any) bool { + _, ok := any.GetCachedValue().(*ExtensionOptionDynamicFeeTx) + return ok +} diff --git a/legacy/types/dynamic_fee.pb.go b/legacy/types/dynamic_fee.pb.go new file mode 100644 index 0000000..ce4a7a4 --- /dev/null +++ b/legacy/types/dynamic_fee.pb.go @@ -0,0 +1,324 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/dynamic_fee.proto + +package types + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + cosmossdk_io_math "cosmossdk.io/math" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ExtensionOptionDynamicFeeTx is an extension option that specifies the maxPrioPrice for cosmos tx +type ExtensionOptionDynamicFeeTx struct { + // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec + MaxPriorityPrice cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=max_priority_price,json=maxPriorityPrice,proto3,customtype=cosmossdk.io/math.Int" json:"max_priority_price"` +} + +func (m *ExtensionOptionDynamicFeeTx) Reset() { *m = ExtensionOptionDynamicFeeTx{} } +func (m *ExtensionOptionDynamicFeeTx) String() string { return proto.CompactTextString(m) } +func (*ExtensionOptionDynamicFeeTx) ProtoMessage() {} +func (*ExtensionOptionDynamicFeeTx) Descriptor() ([]byte, []int) { + return fileDescriptor_9d7cf05c9992c480, []int{0} +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtensionOptionDynamicFeeTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionOptionDynamicFeeTx.Merge(m, src) +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Size() int { + return m.Size() +} +func (m *ExtensionOptionDynamicFeeTx) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionOptionDynamicFeeTx.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionOptionDynamicFeeTx proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ExtensionOptionDynamicFeeTx)(nil), "ethermint.types.v1.ExtensionOptionDynamicFeeTx") +} + +func init() { + proto.RegisterFile("ethermint/types/v1/dynamic_fee.proto", fileDescriptor_9d7cf05c9992c480) +} + +var fileDescriptor_9d7cf05c9992c480 = []byte{ + // 254 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, + 0xa9, 0xcc, 0x4b, 0xcc, 0xcd, 0x4c, 0x8e, 0x4f, 0x4b, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x82, 0xab, 0xd2, 0x03, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, + 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x65, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, + 0x05, 0x11, 0x55, 0xca, 0xe7, 0x92, 0x76, 0xad, 0x28, 0x49, 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0xf3, + 0x2f, 0x28, 0xc9, 0xcc, 0xcf, 0x73, 0x81, 0x58, 0xe0, 0x96, 0x9a, 0x1a, 0x52, 0x21, 0x14, 0xc0, + 0x25, 0x94, 0x9b, 0x58, 0x11, 0x5f, 0x50, 0x94, 0x99, 0x5f, 0x94, 0x59, 0x52, 0x09, 0x62, 0x24, + 0xa7, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x3a, 0x29, 0x9d, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, + 0xbc, 0x68, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x71, 0x4a, 0xb6, 0x5e, 0x66, 0xbe, 0x7e, 0x6e, + 0x62, 0x49, 0x86, 0x9e, 0x67, 0x5e, 0xc9, 0x8a, 0xe7, 0x1b, 0xb4, 0x18, 0x83, 0x04, 0x72, 0x13, + 0x2b, 0x02, 0xa0, 0x9a, 0x03, 0x40, 0x7a, 0x9d, 0xac, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, + 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, + 0x58, 0x8e, 0x21, 0x4a, 0x21, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, + 0xb5, 0x2c, 0x37, 0xbf, 0x18, 0x4a, 0x96, 0x19, 0x19, 0x40, 0xbc, 0x9f, 0xc4, 0x06, 0x76, 0xb3, + 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x2f, 0x5c, 0xa5, 0x18, 0x01, 0x00, 0x00, +} + +func (m *ExtensionOptionDynamicFeeTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtensionOptionDynamicFeeTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtensionOptionDynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MaxPriorityPrice.Size() + i -= size + if _, err := m.MaxPriorityPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDynamicFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintDynamicFee(dAtA []byte, offset int, v uint64) int { + offset -= sovDynamicFee(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExtensionOptionDynamicFeeTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MaxPriorityPrice.Size() + n += 1 + l + sovDynamicFee(uint64(l)) + return n +} + +func sovDynamicFee(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDynamicFee(x uint64) (n int) { + return sovDynamicFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExtensionOptionDynamicFeeTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxPriorityPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDynamicFee + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDynamicFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxPriorityPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDynamicFee(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDynamicFee + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDynamicFee(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDynamicFee + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDynamicFee + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDynamicFee + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDynamicFee = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDynamicFee = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDynamicFee = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/types/errors.go b/legacy/types/errors.go new file mode 100644 index 0000000..70af5a6 --- /dev/null +++ b/legacy/types/errors.go @@ -0,0 +1,14 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package types + +import ( + errorsmod "cosmossdk.io/errors" +) + +// RootCodespace is the codespace for all errors defined in this package +const RootCodespace = "evmos" + +// ErrInvalidChainID returns an error resulting from an invalid chain ID. +var ErrInvalidChainID = errorsmod.Register(RootCodespace, 3, "invalid chain ID") diff --git a/legacy/types/gasmeter.go b/legacy/types/gasmeter.go new file mode 100644 index 0000000..bdd25bc --- /dev/null +++ b/legacy/types/gasmeter.go @@ -0,0 +1,108 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + fmt "fmt" + math "math" + + storetypes "cosmossdk.io/store/types" +) + +// ErrorNegativeGasConsumed defines an error thrown when the amount of gas refunded results in a +// negative gas consumed amount. +// Copied from cosmos-sdk +type ErrorNegativeGasConsumed struct { + Descriptor string +} + +// ErrorGasOverflow defines an error thrown when an action results gas consumption +// unsigned integer overflow. +type ErrorGasOverflow struct { + Descriptor string +} + +type infiniteGasMeterWithLimit struct { + consumed storetypes.Gas + limit storetypes.Gas +} + +// NewInfiniteGasMeterWithLimit returns a reference to a new infiniteGasMeter. +func NewInfiniteGasMeterWithLimit(limit storetypes.Gas) storetypes.GasMeter { + return &infiniteGasMeterWithLimit{ + consumed: 0, + limit: limit, + } +} + +// GasConsumed returns the gas consumed from the GasMeter. +func (g *infiniteGasMeterWithLimit) GasConsumed() storetypes.Gas { + return g.consumed +} + +// GasConsumedToLimit returns the gas limit if gas consumed is past the limit, +// otherwise it returns the consumed gas. +// NOTE: This behavior is only called when recovering from panic when +// BlockGasMeter consumes gas past the limit. +func (g *infiniteGasMeterWithLimit) GasConsumedToLimit() storetypes.Gas { + return g.consumed +} + +// Limit returns the gas limit of the GasMeter. +func (g *infiniteGasMeterWithLimit) Limit() storetypes.Gas { + return g.limit +} + +// addUint64Overflow performs the addition operation on two uint64 integers and +// returns a boolean on whether or not the result overflows. +func addUint64Overflow(a, b uint64) (uint64, bool) { + if math.MaxUint64-a < b { + return 0, true + } + + return a + b, false +} + +// ConsumeGas adds the given amount of gas to the gas consumed and panics if it overflows the limit or out of gas. +func (g *infiniteGasMeterWithLimit) 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) + if overflow { + panic(ErrorGasOverflow{descriptor}) + } +} + +// RefundGas will deduct the given amount from the gas consumed. If the amount is greater than the +// gas consumed, the function will panic. +// +// Use case: This functionality enables refunding gas to the transaction 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 *infiniteGasMeterWithLimit) RefundGas(amount storetypes.Gas, descriptor string) { + if g.consumed < amount { + panic(ErrorNegativeGasConsumed{Descriptor: descriptor}) + } + + g.consumed -= amount +} + +// IsPastLimit returns true if gas consumed is past limit, otherwise it returns false. +func (g *infiniteGasMeterWithLimit) IsPastLimit() bool { + return false +} + +// IsOutOfGas returns true if gas consumed is greater than or equal to gas limit, otherwise it returns false. +func (g *infiniteGasMeterWithLimit) IsOutOfGas() bool { + return false +} + +// String returns the BasicGasMeter's gas limit and gas consumed. +func (g *infiniteGasMeterWithLimit) String() string { + return fmt.Sprintf("InfiniteGasMeter:\n consumed: %d", g.consumed) +} + +// GasRemaining returns MaxUint64 since limit is not confined in infiniteGasMeter. +func (g *infiniteGasMeterWithLimit) GasRemaining() storetypes.Gas { + return math.MaxUint64 +} diff --git a/legacy/types/genesis.go b/legacy/types/genesis.go new file mode 100644 index 0000000..fae4de8 --- /dev/null +++ b/legacy/types/genesis.go @@ -0,0 +1,14 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import "encoding/json" + +// GenesisState of the blockchain is represented here as a map of raw json +// messages key'd by a identifier string. +// The identifier is used to determine which module genesis information belongs +// to so it may be appropriately routed during init chain. +// Within this application default genesis information is retrieved from +// the ModuleBasicManager which populates json from each BasicModule +// object provided to it during init. +type GenesisState map[string]json.RawMessage diff --git a/legacy/types/hdpath.go b/legacy/types/hdpath.go new file mode 100644 index 0000000..9600f27 --- /dev/null +++ b/legacy/types/hdpath.go @@ -0,0 +1,34 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + ethaccounts "github.com/ethereum/go-ethereum/accounts" +) + +var ( + // Bip44CoinType satisfies EIP84. See https://github.com/ethereum/EIPs/issues/84 for more info. + Bip44CoinType uint32 = 60 + + // BIP44HDPath is the default BIP44 HD path used on Ethereum. + BIP44HDPath = ethaccounts.DefaultBaseDerivationPath.String() +) + +type ( + HDPathIterator func() ethaccounts.DerivationPath +) + +// HDPathIterator receives a base path as a string and a boolean for the desired iterator type and +// returns a function that iterates over the base HD path, returning the string. +func NewHDPathIterator(basePath string, ledgerIter bool) (HDPathIterator, error) { + hdPath, err := ethaccounts.ParseDerivationPath(basePath) + if err != nil { + return nil, err + } + + if ledgerIter { + return ethaccounts.LedgerLiveIterator(hdPath), nil + } + + return ethaccounts.DefaultIterator(hdPath), nil +} diff --git a/legacy/types/indexer.go b/legacy/types/indexer.go new file mode 100644 index 0000000..0247a13 --- /dev/null +++ b/legacy/types/indexer.go @@ -0,0 +1,21 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + abci "github.com/cometbft/cometbft/abci/types" + cmttypes "github.com/cometbft/cometbft/types" + "github.com/ethereum/go-ethereum/common" +) + +// EVMTxIndexer defines the interface of custom eth tx indexer. +type EVMTxIndexer interface { + // LastIndexedBlock returns -1 if indexer db is empty + LastIndexedBlock() (int64, error) + IndexBlock(*cmttypes.Block, []*abci.ExecTxResult) error + + // GetByTxHash returns nil if tx not found. + GetByTxHash(common.Hash) (*TxResult, error) + // GetByBlockAndIndex returns nil if tx not found. + GetByBlockAndIndex(int64, int32) (*TxResult, error) +} diff --git a/legacy/types/indexer.pb.go b/legacy/types/indexer.pb.go new file mode 100644 index 0000000..c8e6a0d --- /dev/null +++ b/legacy/types/indexer.pb.go @@ -0,0 +1,487 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/indexer.proto + +package types + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// TxResult is the value stored in eth tx indexer +type TxResult struct { + // height of the blockchain + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // tx_index of the cosmos transaction + TxIndex uint32 `protobuf:"varint,2,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + // msg_index in a batch transaction + MsgIndex uint32 `protobuf:"varint,3,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"` + // eth_tx_index is the index in the list of valid eth tx in the block, + // aka. the transaction list returned by eth_getBlock api. + EthTxIndex int32 `protobuf:"varint,4,opt,name=eth_tx_index,json=ethTxIndex,proto3" json:"eth_tx_index,omitempty"` + // failed is true if the eth transaction did not go succeed + Failed bool `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"` + // gas_used by the transaction. If it exceeds the block gas limit, + // it's set to gas limit, which is what's actually deducted by ante handler. + GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + // cumulative_gas_used specifies the cumulated amount of gas used for all + // processed messages within the current batch transaction. + CumulativeGasUsed uint64 `protobuf:"varint,7,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"` +} + +func (m *TxResult) Reset() { *m = TxResult{} } +func (m *TxResult) String() string { return proto.CompactTextString(m) } +func (*TxResult) ProtoMessage() {} +func (*TxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_1197e10a8be8ed28, []int{0} +} +func (m *TxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxResult.Merge(m, src) +} +func (m *TxResult) XXX_Size() int { + return m.Size() +} +func (m *TxResult) XXX_DiscardUnknown() { + xxx_messageInfo_TxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_TxResult proto.InternalMessageInfo + +func init() { + proto.RegisterType((*TxResult)(nil), "ethermint.types.v1.TxResult") +} + +func init() { proto.RegisterFile("ethermint/types/v1/indexer.proto", fileDescriptor_1197e10a8be8ed28) } + +var fileDescriptor_1197e10a8be8ed28 = []byte{ + // 299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0xe3, 0xbf, 0x6d, 0x9a, 0xdf, 0x82, 0x81, 0x80, 0xaa, 0x00, 0x52, 0xb0, 0x98, 0x32, + 0x25, 0x14, 0xb6, 0x8e, 0x2c, 0x88, 0xd5, 0x2a, 0x0b, 0x4b, 0x94, 0x36, 0x17, 0xdb, 0x52, 0x5d, + 0x57, 0xf5, 0x4d, 0x14, 0xde, 0x80, 0x91, 0x47, 0xe0, 0x71, 0x18, 0x3b, 0x32, 0xa2, 0x56, 0xbc, + 0x07, 0xaa, 0x13, 0x95, 0xc5, 0xf2, 0xd1, 0xf7, 0x5d, 0x1d, 0xe9, 0x50, 0x06, 0x28, 0x61, 0xad, + 0xd5, 0x12, 0x33, 0x7c, 0x5d, 0x81, 0xcd, 0xea, 0x71, 0xa6, 0x96, 0x25, 0x34, 0xb0, 0x4e, 0x57, + 0x6b, 0x83, 0x26, 0x0c, 0x0f, 0x46, 0xea, 0x8c, 0xb4, 0x1e, 0x5f, 0x9c, 0x09, 0x23, 0x8c, 0xc3, + 0xd9, 0xfe, 0xd7, 0x9a, 0xd7, 0x3f, 0x84, 0x06, 0xd3, 0x86, 0x83, 0xad, 0x16, 0x18, 0x8e, 0xa8, + 0x2f, 0x41, 0x09, 0x89, 0x11, 0x61, 0x24, 0xe9, 0xf1, 0x2e, 0x85, 0xe7, 0x34, 0xc0, 0x26, 0x77, + 0x15, 0xd1, 0x3f, 0x46, 0x92, 0x63, 0x3e, 0xc4, 0xe6, 0x71, 0x1f, 0xc3, 0x4b, 0xfa, 0x5f, 0x5b, + 0xd1, 0xb1, 0x9e, 0x63, 0x81, 0xb6, 0xa2, 0x85, 0x8c, 0x1e, 0x01, 0xca, 0xfc, 0x70, 0xdb, 0x67, + 0x24, 0x19, 0x70, 0x0a, 0x28, 0xa7, 0xdd, 0xf9, 0x88, 0xfa, 0x2f, 0x85, 0x5a, 0x40, 0x19, 0x0d, + 0x18, 0x49, 0x02, 0xde, 0xa5, 0x7d, 0xa3, 0x28, 0x6c, 0x5e, 0x59, 0x28, 0x23, 0x9f, 0x91, 0xa4, + 0xcf, 0x87, 0xa2, 0xb0, 0x4f, 0x16, 0xca, 0x30, 0xa5, 0xa7, 0xf3, 0x4a, 0x57, 0x8b, 0x02, 0x55, + 0x0d, 0xf9, 0xc1, 0x1a, 0x3a, 0xeb, 0xe4, 0x0f, 0x3d, 0xb4, 0xfe, 0xa4, 0xff, 0xf6, 0x71, 0xe5, + 0xdd, 0x4f, 0x3e, 0xb7, 0x31, 0xd9, 0x6c, 0x63, 0xf2, 0xbd, 0x8d, 0xc9, 0xfb, 0x2e, 0xf6, 0x36, + 0xbb, 0xd8, 0xfb, 0xda, 0xc5, 0xde, 0x33, 0x13, 0x0a, 0x65, 0x35, 0x4b, 0xe7, 0x46, 0x67, 0x50, + 0x6b, 0x63, 0xbb, 0xb7, 0xbe, 0xbd, 0x69, 0xe7, 0x9d, 0xf9, 0x6e, 0xaa, 0xbb, 0xdf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xfb, 0xee, 0x5a, 0x69, 0x78, 0x01, 0x00, 0x00, +} + +func (m *TxResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CumulativeGasUsed != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.CumulativeGasUsed)) + i-- + dAtA[i] = 0x38 + } + if m.GasUsed != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if m.Failed { + i-- + if m.Failed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.EthTxIndex != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.EthTxIndex)) + i-- + dAtA[i] = 0x20 + } + if m.MsgIndex != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.MsgIndex)) + i-- + dAtA[i] = 0x18 + } + if m.TxIndex != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x10 + } + if m.Height != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintIndexer(dAtA []byte, offset int, v uint64) int { + offset -= sovIndexer(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TxResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovIndexer(uint64(m.Height)) + } + if m.TxIndex != 0 { + n += 1 + sovIndexer(uint64(m.TxIndex)) + } + if m.MsgIndex != 0 { + n += 1 + sovIndexer(uint64(m.MsgIndex)) + } + if m.EthTxIndex != 0 { + n += 1 + sovIndexer(uint64(m.EthTxIndex)) + } + if m.Failed { + n += 2 + } + if m.GasUsed != 0 { + n += 1 + sovIndexer(uint64(m.GasUsed)) + } + if m.CumulativeGasUsed != 0 { + n += 1 + sovIndexer(uint64(m.CumulativeGasUsed)) + } + return n +} + +func sovIndexer(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozIndexer(x uint64) (n int) { + return sovIndexer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TxResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgIndex", wireType) + } + m.MsgIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MsgIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EthTxIndex", wireType) + } + m.EthTxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EthTxIndex |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Failed = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativeGasUsed", wireType) + } + m.CumulativeGasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CumulativeGasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIndexer(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthIndexer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIndexer(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndexer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndexer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndexer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthIndexer + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupIndexer + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthIndexer + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthIndexer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndexer = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupIndexer = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/types/int.go b/legacy/types/int.go new file mode 100644 index 0000000..a6a47d3 --- /dev/null +++ b/legacy/types/int.go @@ -0,0 +1,38 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + fmt "fmt" + math "math" + "math/big" + + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" +) + +const maxBitLen = 256 + +// SafeInt64 checks for overflows while casting a uint64 to int64 value. +func SafeInt64(value uint64) (int64, error) { + if value > uint64(math.MaxInt64) { + return 0, errorsmod.Wrapf(errortypes.ErrInvalidHeight, "uint64 value %v cannot exceed %v", value, int64(math.MaxInt64)) + } + + // #nosec G701 G115 -- checked for int overflow already + return int64(value), nil +} + +// SafeNewIntFromBigInt constructs Int from big.Int, return error if more than 256bits +func SafeNewIntFromBigInt(i *big.Int) (sdkmath.Int, error) { + if !IsValidInt256(i) { + return sdkmath.NewInt(0), fmt.Errorf("big int out of bound: %s", i) + } + return sdkmath.NewIntFromBigInt(i), nil +} + +// IsValidInt256 check the bound of 256 bit number +func IsValidInt256(i *big.Int) bool { + return i == nil || i.BitLen() <= maxBitLen +} diff --git a/legacy/types/protocol.go b/legacy/types/protocol.go new file mode 100644 index 0000000..a0d8828 --- /dev/null +++ b/legacy/types/protocol.go @@ -0,0 +1,11 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +// Constants to match up protocol versions and messages +const ( + eth65 = 65 + + // ProtocolVersion is the latest supported version of the eth protocol. + ProtocolVersion = eth65 +) diff --git a/legacy/types/tests/test_utils.go b/legacy/types/tests/test_utils.go new file mode 100644 index 0000000..3a1ae94 --- /dev/null +++ b/legacy/types/tests/test_utils.go @@ -0,0 +1,40 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package tests + +import ( + transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" +) + +var ( + UosmoDenomtrace = transfertypes.DenomTrace{ + Path: "transfer/channel-0", + BaseDenom: "uosmo", + } + UosmoIbcdenom = UosmoDenomtrace.IBCDenom() + + UatomDenomtrace = transfertypes.DenomTrace{ + Path: "transfer/channel-1", + BaseDenom: "uatom", + } + UatomIbcdenom = UatomDenomtrace.IBCDenom() + + UevmosDenomtrace = transfertypes.DenomTrace{ + Path: "transfer/channel-0", + BaseDenom: "aevmos", + } + UevmosIbcdenom = UevmosDenomtrace.IBCDenom() + + UatomOsmoDenomtrace = transfertypes.DenomTrace{ + Path: "transfer/channel-0/transfer/channel-1", + BaseDenom: "uatom", + } + UatomOsmoIbcdenom = UatomOsmoDenomtrace.IBCDenom() + + AevmosDenomtrace = transfertypes.DenomTrace{ + Path: "transfer/channel-0", + BaseDenom: "aevmos", + } + AevmosIbcdenom = AevmosDenomtrace.IBCDenom() +) diff --git a/legacy/types/validation.go b/legacy/types/validation.go new file mode 100644 index 0000000..80d0d6a --- /dev/null +++ b/legacy/types/validation.go @@ -0,0 +1,44 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "bytes" + + errorsmod "cosmossdk.io/errors" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/ethereum/go-ethereum/common" +) + +// IsEmptyHash returns true if the hash corresponds to an empty ethereum hex hash. +func IsEmptyHash(hash string) bool { + return bytes.Equal(common.HexToHash(hash).Bytes(), common.Hash{}.Bytes()) +} + +// IsZeroAddress returns true if the address corresponds to an empty ethereum hex address. +func IsZeroAddress(address string) bool { + return bytes.Equal(common.HexToAddress(address).Bytes(), common.Address{}.Bytes()) +} + +// ValidateAddress returns an error if the provided string is either not a hex formatted string address +func ValidateAddress(address string) error { + if !common.IsHexAddress(address) { + return errorsmod.Wrapf( + errortypes.ErrInvalidAddress, "address '%s' is not a valid ethereum hex address", + address, + ) + } + return nil +} + +// ValidateNonZeroAddress returns an error if the provided string is not a hex +// formatted string address or is equal to zero +func ValidateNonZeroAddress(address string) error { + if IsZeroAddress(address) { + return errorsmod.Wrapf( + errortypes.ErrInvalidAddress, "address '%s' must not be zero", + address, + ) + } + return ValidateAddress(address) +} diff --git a/legacy/types/validation_test.go b/legacy/types/validation_test.go new file mode 100644 index 0000000..b141a9f --- /dev/null +++ b/legacy/types/validation_test.go @@ -0,0 +1,144 @@ +package types_test + +import ( + "testing" + + "github.com/ethereum/go-ethereum/common" + utiltx "github.com/evmos/evmos/v20/testutil/tx" + "github.com/evmos/evmos/v20/types" + "github.com/stretchr/testify/require" +) + +func TestIsEmptyHash(t *testing.T) { + testCases := []struct { + name string + hash string + expEmpty bool + }{ + { + "empty string", "", true, + }, + { + "zero hash", common.Hash{}.String(), true, + }, + + { + "non-empty hash", common.BytesToHash([]byte{1, 2, 3, 4}).String(), false, + }, + } + + for _, tc := range testCases { + require.Equal(t, tc.expEmpty, types.IsEmptyHash(tc.hash), tc.name) + } +} + +func TestIsZeroAddress(t *testing.T) { + testCases := []struct { + name string + address string + expEmpty bool + }{ + { + "empty string", "", true, + }, + { + "zero address", common.Address{}.String(), true, + }, + + { + "non-empty address", common.BytesToAddress([]byte{1, 2, 3, 4}).String(), false, + }, + } + + for _, tc := range testCases { + require.Equal(t, tc.expEmpty, types.IsZeroAddress(tc.address), tc.name) + } +} + +func TestValidateAddress(t *testing.T) { + testCases := []struct { + name string + address string + expError bool + }{ + { + "empty string", "", true, + }, + { + "invalid address", "0x", true, + }, + { + "zero address", common.Address{}.String(), false, + }, + { + "valid address", utiltx.GenerateAddress().Hex(), false, + }, + } + + for _, tc := range testCases { + err := types.ValidateAddress(tc.address) + + if tc.expError { + require.Error(t, err, tc.name) + } else { + require.NoError(t, err, tc.name) + } + } +} + +func TestValidateNonZeroAddress(t *testing.T) { + testCases := []struct { + name string + address string + expError bool + }{ + { + "empty string", "", true, + }, + { + "invalid address", "0x", true, + }, + { + "zero address", common.Address{}.String(), true, + }, + { + "valid address", utiltx.GenerateAddress().Hex(), false, + }, + } + + for _, tc := range testCases { + err := types.ValidateNonZeroAddress(tc.address) + + if tc.expError { + require.Error(t, err, tc.name) + } else { + require.NoError(t, err, tc.name) + } + } +} + +func TestSafeInt64(t *testing.T) { + testCases := []struct { + name string + value uint64 + expError bool + }{ + { + "no overflow", 10, false, + }, + { + "overflow", 18446744073709551615, true, + }, + } + + for _, tc := range testCases { + value, err := types.SafeInt64(tc.value) + if tc.expError { + require.Error(t, err, tc.name) + continue + } + + require.NoError(t, err, tc.name) + require.Equal(t, int64(tc.value), value, tc.name) //#nosec G115 + } +} diff --git a/legacy/types/web3.pb.go b/legacy/types/web3.pb.go new file mode 100644 index 0000000..2c49432 --- /dev/null +++ b/legacy/types/web3.pb.go @@ -0,0 +1,400 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/web3.proto + +package types + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ExtensionOptionsWeb3Tx is an extension option that specifies the typed chain id, +// the fee payer as well as its signature data. +type ExtensionOptionsWeb3Tx struct { + // typed_data_chain_id is used only in EIP712 Domain and should match + // Ethereum network ID in a Web3 provider (e.g. Metamask). + TypedDataChainID uint64 `protobuf:"varint,1,opt,name=typed_data_chain_id,json=typedDataChainId,proto3" json:"typedDataChainID,omitempty"` + // fee_payer is an account address for the fee payer. It will be validated + // during EIP712 signature checking. + FeePayer string `protobuf:"bytes,2,opt,name=fee_payer,json=feePayer,proto3" json:"feePayer,omitempty"` + // fee_payer_sig is a signature data from the fee paying account, + // allows to perform fee delegation when using EIP712 Domain. + FeePayerSig []byte `protobuf:"bytes,3,opt,name=fee_payer_sig,json=feePayerSig,proto3" json:"feePayerSig,omitempty"` +} + +func (m *ExtensionOptionsWeb3Tx) Reset() { *m = ExtensionOptionsWeb3Tx{} } +func (m *ExtensionOptionsWeb3Tx) String() string { return proto.CompactTextString(m) } +func (*ExtensionOptionsWeb3Tx) ProtoMessage() {} +func (*ExtensionOptionsWeb3Tx) Descriptor() ([]byte, []int) { + return fileDescriptor_9eb7cd56e3c92bc3, []int{0} +} +func (m *ExtensionOptionsWeb3Tx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtensionOptionsWeb3Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtensionOptionsWeb3Tx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExtensionOptionsWeb3Tx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionOptionsWeb3Tx.Merge(m, src) +} +func (m *ExtensionOptionsWeb3Tx) XXX_Size() int { + return m.Size() +} +func (m *ExtensionOptionsWeb3Tx) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionOptionsWeb3Tx.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionOptionsWeb3Tx proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ExtensionOptionsWeb3Tx)(nil), "ethermint.types.v1.ExtensionOptionsWeb3Tx") +} + +func init() { proto.RegisterFile("ethermint/types/v1/web3.proto", fileDescriptor_9eb7cd56e3c92bc3) } + +var fileDescriptor_9eb7cd56e3c92bc3 = []byte{ + // 304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, + 0x4f, 0x4d, 0x32, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x4b, 0xeb, 0x81, 0xa5, + 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xd2, 0xfa, 0x20, 0x16, 0x44, 0xa5, + 0xd2, 0x57, 0x46, 0x2e, 0x31, 0xd7, 0x8a, 0x92, 0xd4, 0xbc, 0xe2, 0xcc, 0xfc, 0x3c, 0xff, 0x82, + 0x92, 0xcc, 0xfc, 0xbc, 0xe2, 0xf0, 0xd4, 0x24, 0xe3, 0x90, 0x0a, 0xa1, 0x44, 0x2e, 0x61, 0x90, + 0xe6, 0x94, 0xf8, 0x94, 0xc4, 0x92, 0xc4, 0xf8, 0xe4, 0x8c, 0xc4, 0xcc, 0xbc, 0xf8, 0xcc, 0x14, + 0x09, 0x46, 0x05, 0x46, 0x0d, 0x16, 0x27, 0xa3, 0x47, 0xf7, 0xe4, 0x05, 0x42, 0x40, 0xd2, 0x2e, + 0x89, 0x25, 0x89, 0xce, 0x20, 0x49, 0x4f, 0x97, 0x57, 0xf7, 0xe4, 0xa5, 0x4a, 0xd0, 0xc4, 0x74, + 0xf2, 0x73, 0x33, 0x4b, 0x52, 0x73, 0x0b, 0x4a, 0x2a, 0x83, 0x04, 0xd0, 0xe4, 0x52, 0x84, 0x8c, + 0xb9, 0x38, 0xd3, 0x52, 0x53, 0xe3, 0x0b, 0x12, 0x2b, 0x53, 0x8b, 0x24, 0x98, 0x14, 0x18, 0x35, + 0x38, 0x9d, 0xc4, 0x5e, 0xdd, 0x93, 0x17, 0x4a, 0x4b, 0x4d, 0x0d, 0x00, 0x89, 0x21, 0x69, 0xe6, + 0x80, 0x89, 0x09, 0xd9, 0x72, 0xf1, 0xc2, 0x35, 0xc5, 0x17, 0x67, 0xa6, 0x4b, 0x30, 0x2b, 0x30, + 0x6a, 0xf0, 0x38, 0x49, 0xbe, 0xba, 0x27, 0x2f, 0x0a, 0x53, 0x14, 0x9c, 0x99, 0x8e, 0xa4, 0x97, + 0x1b, 0x49, 0xd8, 0x8a, 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x93, 0xd5, 0x89, 0x47, 0x72, 0x8c, 0x17, + 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, + 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x29, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, + 0xea, 0xa7, 0x96, 0xe5, 0xe6, 0x17, 0x43, 0xc9, 0x32, 0x23, 0x03, 0x48, 0x58, 0x27, 0xb1, 0x81, + 0x83, 0xce, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x68, 0xc3, 0xd2, 0x11, 0x85, 0x01, 0x00, 0x00, +} + +func (m *ExtensionOptionsWeb3Tx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtensionOptionsWeb3Tx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtensionOptionsWeb3Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeePayerSig) > 0 { + i -= len(m.FeePayerSig) + copy(dAtA[i:], m.FeePayerSig) + i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayerSig))) + i-- + dAtA[i] = 0x1a + } + if len(m.FeePayer) > 0 { + i -= len(m.FeePayer) + copy(dAtA[i:], m.FeePayer) + i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayer))) + i-- + dAtA[i] = 0x12 + } + if m.TypedDataChainID != 0 { + i = encodeVarintWeb3(dAtA, i, uint64(m.TypedDataChainID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintWeb3(dAtA []byte, offset int, v uint64) int { + offset -= sovWeb3(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExtensionOptionsWeb3Tx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TypedDataChainID != 0 { + n += 1 + sovWeb3(uint64(m.TypedDataChainID)) + } + l = len(m.FeePayer) + if l > 0 { + n += 1 + l + sovWeb3(uint64(l)) + } + l = len(m.FeePayerSig) + if l > 0 { + n += 1 + l + sovWeb3(uint64(l)) + } + return n +} + +func sovWeb3(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozWeb3(x uint64) (n int) { + return sovWeb3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExtensionOptionsWeb3Tx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TypedDataChainID", wireType) + } + m.TypedDataChainID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TypedDataChainID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWeb3 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWeb3 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeePayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeePayerSig", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWeb3 + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWeb3 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeePayerSig = append(m.FeePayerSig[:0], dAtA[iNdEx:postIndex]...) + if m.FeePayerSig == nil { + m.FeePayerSig = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWeb3(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWeb3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWeb3(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWeb3 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWeb3 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWeb3 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthWeb3 + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupWeb3 + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthWeb3 + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthWeb3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWeb3 = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupWeb3 = fmt.Errorf("proto: unexpected end of group") +) From 7a78c93e3dad6b1807d05707eb0cdebb8cbe852f Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 21 Aug 2025 17:20:56 +0200 Subject: [PATCH 31/66] refactor(app): add evmos proto account types compatibility + signature capabilities --- app/ante/sigverify.go | 81 +++ app/app.go | 5 +- app/encoding.go | 73 ++- go.mod | 1 - legacy/crypto/ethsecp256k1/benchmark_test.go | 34 ++ legacy/crypto/ethsecp256k1/ethsecp256k1.go | 249 +++++++++ .../crypto/ethsecp256k1/ethsecp256k1_test.go | 124 +++++ legacy/crypto/ethsecp256k1/keys.pb.go | 500 ++++++++++++++++++ legacy/ethereum/eip712/domain.go | 19 + legacy/ethereum/eip712/eip712.go | 34 ++ legacy/ethereum/eip712/eip712_legacy.go | 438 +++++++++++++++ legacy/ethereum/eip712/eip712_legacy_test.go | 95 ++++ legacy/ethereum/eip712/encoding.go | 229 ++++++++ legacy/ethereum/eip712/encoding_legacy.go | 262 +++++++++ legacy/ethereum/eip712/message.go | 152 ++++++ legacy/ethereum/eip712/preprocess.go | 87 +++ legacy/ethereum/eip712/preprocess_test.go | 247 +++++++++ legacy/ethereum/eip712/types.go | 389 ++++++++++++++ legacy/types/account.pb.go | 7 +- legacy/types/dynamic_fee.pb.go | 9 +- legacy/types/indexer.pb.go | 5 +- legacy/types/web3.pb.go | 5 +- 22 files changed, 3020 insertions(+), 25 deletions(-) create mode 100644 app/ante/sigverify.go create mode 100644 legacy/crypto/ethsecp256k1/benchmark_test.go create mode 100644 legacy/crypto/ethsecp256k1/ethsecp256k1.go create mode 100644 legacy/crypto/ethsecp256k1/ethsecp256k1_test.go create mode 100644 legacy/crypto/ethsecp256k1/keys.pb.go create mode 100644 legacy/ethereum/eip712/domain.go create mode 100644 legacy/ethereum/eip712/eip712.go create mode 100644 legacy/ethereum/eip712/eip712_legacy.go create mode 100644 legacy/ethereum/eip712/eip712_legacy_test.go create mode 100644 legacy/ethereum/eip712/encoding.go create mode 100644 legacy/ethereum/eip712/encoding_legacy.go create mode 100644 legacy/ethereum/eip712/message.go create mode 100644 legacy/ethereum/eip712/preprocess.go create mode 100644 legacy/ethereum/eip712/preprocess_test.go create mode 100644 legacy/ethereum/eip712/types.go diff --git a/app/ante/sigverify.go b/app/ante/sigverify.go new file mode 100644 index 0000000..9230c47 --- /dev/null +++ b/app/ante/sigverify.go @@ -0,0 +1,81 @@ +package ante + +import ( + "fmt" + + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/types/multisig" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + evmethsecp256k1 "github.com/cosmos/evm/crypto/ethsecp256k1" + "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" +) + +var _ authante.SignatureVerificationGasConsumer = SigVerificationGasConsumer + +const ( + Secp256k1VerifyCost uint64 = 21000 +) + +func SigVerificationGasConsumer( + meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error { + pubkey := sig.PubKey + switch pubkey := pubkey.(type) { + + case *evmethsecp256k1.PubKey, *ethsecp256k1.PubKey: + // Ethereum keys + meter.ConsumeGas(Secp256k1VerifyCost, "ante verify: eth_secp256k1") + return nil + case *secp256k1.PubKey: + // Cosmos keys + meter.ConsumeGas(params.SigVerifyCostSecp256k1, "ante verify: secp256k1") + return nil + case *ed25519.PubKey: + // Validator keys + meter.ConsumeGas(params.SigVerifyCostED25519, "ante verify: ed25519") + return errorsmod.Wrap(errortypes.ErrInvalidPubKey, "ED25519 public keys are unsupported") + + case multisig.PubKey: + // Multisig keys + multisignature, ok := sig.Data.(*signing.MultiSignatureData) + if !ok { + return fmt.Errorf("expected %T, got, %T", &signing.MultiSignatureData{}, sig.Data) + } + return ConsumeMultisignatureVerificationGas(meter, multisignature, pubkey, params, sig.Sequence) + + default: + return errorsmod.Wrapf(errortypes.ErrInvalidPubKey, "unrecognized/unsupported public key type: %T", pubkey) + } +} + +// ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature +func ConsumeMultisignatureVerificationGas( + meter storetypes.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, + params authtypes.Params, accSeq uint64, +) error { + size := sig.BitArray.Count() + sigIndex := 0 + + for i := 0; i < size; i++ { + if !sig.BitArray.GetIndex(i) { + continue + } + sigV2 := signing.SignatureV2{ + PubKey: pubkey.GetPubKeys()[i], + Data: sig.Signatures[sigIndex], + Sequence: accSeq, + } + err := SigVerificationGasConsumer(meter, sigV2, params) + if err != nil { + return err + } + sigIndex++ + } + + return nil +} diff --git a/app/app.go b/app/app.go index 6eab327..b43157b 100644 --- a/app/app.go +++ b/app/app.go @@ -24,7 +24,6 @@ import ( govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" ethante "github.com/cosmos/evm/ante/evm" - "github.com/cosmos/evm/encoding" "github.com/xrplevm/node/v9/app/ante" evmante "github.com/cosmos/evm/ante" @@ -285,7 +284,7 @@ func New( evmAppOptions EVMOptionsFn, baseAppOptions ...func(*baseapp.BaseApp), ) *App { - encodingConfig := encoding.MakeConfig(evmChainID) + encodingConfig := MakeEncodingConfig(evmChainID) appCodec := encodingConfig.Codec cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -905,7 +904,7 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { IBCKeeper: app.IBCKeeper, FeeMarketKeeper: app.FeeMarketKeeper, SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: evmante.SigVerificationGasConsumer, + SigGasConsumer: ante.SigVerificationGasConsumer, MaxTxGasWanted: maxGasWanted, TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), StakingKeeper: app.StakingKeeper, diff --git a/app/encoding.go b/app/encoding.go index ce78965..b230f42 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -1,10 +1,28 @@ package app import ( - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/codec/address" + types2 "github.com/cosmos/cosmos-sdk/crypto/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/evm/types" + evmethsecp256k1 "github.com/cosmos/evm/crypto/ethsecp256k1" + "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + + amino "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + enccodec "github.com/cosmos/evm/encoding/codec" + "github.com/cosmos/evm/ethereum/eip712" + evmtypes "github.com/cosmos/evm/types" + erc20types "github.com/cosmos/evm/x/erc20/types" + vmtypes "github.com/cosmos/evm/x/vm/types" + "github.com/cosmos/gogoproto/proto" legacytypes "github.com/xrplevm/node/v9/legacy/types" + "google.golang.org/protobuf/reflect/protoreflect" ) // MakeEncodingConfig creates an EncodingConfig for testing @@ -12,9 +30,52 @@ import ( // return evmenc.MakeConfig(ModuleBasics) // } -func (app *App) RegisterLegacyInterfaces(reg codectypes.InterfaceRegistry) { - reg.RegisterImplementations((*authtypes.AccountI)(nil), - &types.EthAccount{}, // cosmos/evm - &legacytypes.EthAccount{}, // evmos +func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { + cdc := amino.NewLegacyAmino() + signingOptions := signing.Options{ + AddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), + }, + ValidatorAddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), + }, + CustomGetSigners: map[protoreflect.FullName]signing.GetSignersFunc{ + vmtypes.MsgEthereumTxCustomGetSigner.MsgType: vmtypes.MsgEthereumTxCustomGetSigner.Fn, + erc20types.MsgConvertERC20CustomGetSigner.MsgType: erc20types.MsgConvertERC20CustomGetSigner.Fn, + }, + } + + interfaceRegistry, _ := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ + ProtoFiles: proto.HybridResolver, + SigningOptions: signingOptions, + }) + + interfaceRegistry.RegisterImplementations((*authtypes.AccountI)(nil), + &evmtypes.EthAccount{}, + &legacytypes.EthAccount{}, + ) + interfaceRegistry.RegisterImplementations((*types2.PubKey)(nil), + &evmethsecp256k1.PubKey{}, // cosmos-evm + ðsecp256k1.PubKey{}, // evmos (legacy) ) + interfaceRegistry.RegisterImplementations((*types2.PrivKey)(nil), + &evmethsecp256k1.PrivKey{}, // cosmos-evm + ðsecp256k1.PrivKey{}, // evmos (legacy) + ) + + codec := amino.NewProtoCodec(interfaceRegistry) + enccodec.RegisterLegacyAminoCodec(cdc) + enccodec.RegisterInterfaces(interfaceRegistry) + + // This is needed for the EIP712 txs because currently is using + // the deprecated method legacytx.StdSignBytes + legacytx.RegressionTestingAminoCodec = cdc + eip712.SetEncodingConfig(cdc, interfaceRegistry, evmChainID) + + return sdktestutil.TestEncodingConfig{ + InterfaceRegistry: interfaceRegistry, + Codec: codec, + TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes), + Amino: cdc, + } } diff --git a/go.mod b/go.mod index 91cb15a..b7718b4 100644 --- a/go.mod +++ b/go.mod @@ -289,7 +289,6 @@ replace ( // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 // use exrp Evmos fork - github.com/evmos/evmos/v20 => github.com/xrplevm/evmos/v20 v20.0.0-exrp.7 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb diff --git a/legacy/crypto/ethsecp256k1/benchmark_test.go b/legacy/crypto/ethsecp256k1/benchmark_test.go new file mode 100644 index 0000000..815cc58 --- /dev/null +++ b/legacy/crypto/ethsecp256k1/benchmark_test.go @@ -0,0 +1,34 @@ +package ethsecp256k1 + +import ( + "fmt" + "testing" +) + +func BenchmarkGenerateKey(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + if _, err := GenerateKey(); err != nil { + b.Fatal(err) + } + } +} + +func BenchmarkPubKey_VerifySignature(b *testing.B) { + privKey, err := GenerateKey() + if err != nil { + b.Fatal(err) + } + pubKey := privKey.PubKey() + + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + msg := []byte(fmt.Sprintf("%10d", i)) + sig, err := privKey.Sign(msg) + if err != nil { + b.Fatal(err) + } + pubKey.VerifySignature(msg, sig) + } +} diff --git a/legacy/crypto/ethsecp256k1/ethsecp256k1.go b/legacy/crypto/ethsecp256k1/ethsecp256k1.go new file mode 100644 index 0000000..84d577b --- /dev/null +++ b/legacy/crypto/ethsecp256k1/ethsecp256k1.go @@ -0,0 +1,249 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package ethsecp256k1 + +import ( + "bytes" + "crypto/ecdsa" + "crypto/subtle" + "fmt" + + errorsmod "cosmossdk.io/errors" + tmcrypto "github.com/cometbft/cometbft/crypto" + "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/ethereum/go-ethereum/crypto" + "github.com/xrplevm/node/v9/legacy/ethereum/eip712" +) + +const ( + // PrivKeySize defines the size of the PrivKey bytes + PrivKeySize = 32 + // PubKeySize defines the size of the PubKey bytes + PubKeySize = 33 + // KeyType is the string constant for the Secp256k1 algorithm + KeyType = "eth_secp256k1" +) + +// Amino encoding names +const ( + // PrivKeyName defines the amino encoding name for the EthSecp256k1 private key + PrivKeyName = "ethermint/PrivKeyEthSecp256k1" + // PubKeyName defines the amino encoding name for the EthSecp256k1 public key + PubKeyName = "ethermint/PubKeyEthSecp256k1" +) + +// ---------------------------------------------------------------------------- +// secp256k1 Private Key + +var ( + _ cryptotypes.PrivKey = &PrivKey{} + _ codec.AminoMarshaler = &PrivKey{} +) + +// GenerateKey generates a new random private key. It returns an error upon +// failure. +func GenerateKey() (*PrivKey, error) { + priv, err := crypto.GenerateKey() + if err != nil { + return nil, err + } + + return &PrivKey{ + Key: crypto.FromECDSA(priv), + }, nil +} + +// Bytes returns the byte representation of the ECDSA Private Key. +func (privKey PrivKey) Bytes() []byte { + bz := make([]byte, len(privKey.Key)) + copy(bz, privKey.Key) + + return bz +} + +// PubKey returns the ECDSA private key's public key. If the privkey is not valid +// it returns a nil value. +func (privKey PrivKey) PubKey() cryptotypes.PubKey { + ecdsaPrivKey, err := privKey.ToECDSA() + if err != nil { + return nil + } + + return &PubKey{ + Key: crypto.CompressPubkey(&ecdsaPrivKey.PublicKey), + } +} + +// Equals returns true if two ECDSA private keys are equal and false otherwise. +func (privKey PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool { + return privKey.Type() == other.Type() && subtle.ConstantTimeCompare(privKey.Bytes(), other.Bytes()) == 1 +} + +// Type returns eth_secp256k1 +func (privKey PrivKey) Type() string { + return KeyType +} + +// MarshalAmino overrides Amino binary marshaling. +func (privKey PrivKey) MarshalAmino() ([]byte, error) { + return privKey.Key, nil +} + +// UnmarshalAmino overrides Amino binary marshaling. +func (privKey *PrivKey) UnmarshalAmino(bz []byte) error { + if len(bz) != PrivKeySize { + return fmt.Errorf("invalid privkey size, expected %d got %d", PrivKeySize, len(bz)) + } + privKey.Key = bz + + return nil +} + +// MarshalAminoJSON overrides Amino JSON marshaling. +func (privKey PrivKey) MarshalAminoJSON() ([]byte, error) { + // When we marshal to Amino JSON, we don't marshal the "key" field itself, + // just its contents (i.e. the key bytes). + return privKey.MarshalAmino() +} + +// UnmarshalAminoJSON overrides Amino JSON marshaling. +func (privKey *PrivKey) UnmarshalAminoJSON(bz []byte) error { + return privKey.UnmarshalAmino(bz) +} + +// Sign creates a recoverable ECDSA signature on the secp256k1 curve over the +// provided hash of the message. The produced signature is 65 bytes +// where the last byte contains the recovery ID. +func (privKey PrivKey) Sign(digestBz []byte) ([]byte, error) { + // TODO: remove + if len(digestBz) != crypto.DigestLength { + digestBz = crypto.Keccak256Hash(digestBz).Bytes() + } + + key, err := privKey.ToECDSA() + if err != nil { + return nil, err + } + + return crypto.Sign(digestBz, key) +} + +// ToECDSA returns the ECDSA private key as a reference to ecdsa.PrivateKey type. +func (privKey PrivKey) ToECDSA() (*ecdsa.PrivateKey, error) { + return crypto.ToECDSA(privKey.Bytes()) +} + +// ---------------------------------------------------------------------------- +// secp256k1 Public Key + +var ( + _ cryptotypes.PubKey = &PubKey{} + _ codec.AminoMarshaler = &PubKey{} +) + +// Address returns the address of the ECDSA public key. +// The function will return an empty address if the public key is invalid. +func (pubKey PubKey) Address() tmcrypto.Address { + pubk, err := crypto.DecompressPubkey(pubKey.Key) + if err != nil { + return nil + } + + return tmcrypto.Address(crypto.PubkeyToAddress(*pubk).Bytes()) +} + +// Bytes returns the raw bytes of the ECDSA public key. +func (pubKey PubKey) Bytes() []byte { + bz := make([]byte, len(pubKey.Key)) + copy(bz, pubKey.Key) + + return bz +} + +// String implements the fmt.Stringer interface. +func (pubKey PubKey) String() string { + return fmt.Sprintf("EthPubKeySecp256k1{%X}", pubKey.Key) +} + +// Type returns eth_secp256k1 +func (pubKey PubKey) Type() string { + return KeyType +} + +// Equals returns true if the pubkey type is the same and their bytes are deeply equal. +func (pubKey PubKey) Equals(other cryptotypes.PubKey) bool { + return pubKey.Type() == other.Type() && bytes.Equal(pubKey.Bytes(), other.Bytes()) +} + +// MarshalAmino overrides Amino binary marshaling. +func (pubKey PubKey) MarshalAmino() ([]byte, error) { + return pubKey.Key, nil +} + +// UnmarshalAmino overrides Amino binary marshaling. +func (pubKey *PubKey) UnmarshalAmino(bz []byte) error { + if len(bz) != PubKeySize { + return errorsmod.Wrapf(errortypes.ErrInvalidPubKey, "invalid pubkey size, expected %d, got %d", PubKeySize, len(bz)) + } + pubKey.Key = bz + + return nil +} + +// MarshalAminoJSON overrides Amino JSON marshaling. +func (pubKey PubKey) MarshalAminoJSON() ([]byte, error) { + // When we marshal to Amino JSON, we don't marshal the "key" field itself, + // just its contents (i.e. the key bytes). + return pubKey.MarshalAmino() +} + +// UnmarshalAminoJSON overrides Amino JSON marshaling. +func (pubKey *PubKey) UnmarshalAminoJSON(bz []byte) error { + return pubKey.UnmarshalAmino(bz) +} + +// VerifySignature verifies that the ECDSA public key created a given signature over +// the provided message. It will calculate the Keccak256 hash of the message +// prior to verification and approve verification if the signature can be verified +// from either the original message or its EIP-712 representation. +// +// CONTRACT: The signature should be in [R || S] format. +func (pubKey PubKey) VerifySignature(msg, sig []byte) bool { + return pubKey.verifySignatureECDSA(msg, sig) || pubKey.verifySignatureAsEIP712(msg, sig) +} + +// Verifies the signature as an EIP-712 signature by first converting the message payload +// to EIP-712 object bytes, then performing ECDSA verification on the hash. This is to support +// signing a Cosmos payload using EIP-712. +func (pubKey PubKey) verifySignatureAsEIP712(msg, sig []byte) bool { + eip712Bytes, err := eip712.GetEIP712BytesForMsg(msg) + if err != nil { + return false + } + + if pubKey.verifySignatureECDSA(eip712Bytes, sig) { + return true + } + + // Try verifying the signature using the legacy EIP-712 encoding + legacyEIP712Bytes, err := eip712.LegacyGetEIP712BytesForMsg(msg) + if err != nil { + return false + } + + return pubKey.verifySignatureECDSA(legacyEIP712Bytes, sig) +} + +// Perform standard ECDSA signature verification for the given raw bytes and signature. +func (pubKey PubKey) verifySignatureECDSA(msg, sig []byte) bool { + if len(sig) == crypto.SignatureLength { + // remove recovery ID (V) if contained in the signature + sig = sig[:len(sig)-1] + } + + // the signature needs to be in [R || S] format when provided to VerifySignature + return crypto.VerifySignature(pubKey.Key, crypto.Keccak256Hash(msg).Bytes(), sig) +} diff --git a/legacy/crypto/ethsecp256k1/ethsecp256k1_test.go b/legacy/crypto/ethsecp256k1/ethsecp256k1_test.go new file mode 100644 index 0000000..044f1c2 --- /dev/null +++ b/legacy/crypto/ethsecp256k1/ethsecp256k1_test.go @@ -0,0 +1,124 @@ +package ethsecp256k1 + +import ( + "encoding/base64" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/codec" + + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/crypto/secp256k1" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +func TestPrivKey(t *testing.T) { + // validate type and equality + privKey, err := GenerateKey() + require.NoError(t, err) + require.Implements(t, (*cryptotypes.PrivKey)(nil), privKey) + + // validate inequality + privKey2, err := GenerateKey() + require.NoError(t, err) + require.False(t, privKey.Equals(privKey2)) + + // validate Ethereum address equality + addr := privKey.PubKey().Address() + key, err := privKey.ToECDSA() + require.NoError(t, err) + expectedAddr := crypto.PubkeyToAddress(key.PublicKey) + require.Equal(t, expectedAddr.Bytes(), addr.Bytes()) + + // validate we can sign some bytes + msg := []byte("hello world") + sigHash := crypto.Keccak256Hash(msg) + expectedSig, err := secp256k1.Sign(sigHash.Bytes(), privKey.Bytes()) + require.NoError(t, err) + + sig, err := privKey.Sign(sigHash.Bytes()) + require.NoError(t, err) + require.Equal(t, expectedSig, sig) +} + +func TestPrivKey_PubKey(t *testing.T) { + privKey, err := GenerateKey() + require.NoError(t, err) + + // validate type and equality + pubKey := &PubKey{ + Key: privKey.PubKey().Bytes(), + } + require.Implements(t, (*cryptotypes.PubKey)(nil), pubKey) + + // validate inequality + privKey2, err := GenerateKey() + require.NoError(t, err) + require.False(t, pubKey.Equals(privKey2.PubKey())) + + // validate signature + msg := []byte("hello world") + sigHash := crypto.Keccak256Hash(msg) + sig, err := privKey.Sign(sigHash.Bytes()) + require.NoError(t, err) + + res := pubKey.VerifySignature(msg, sig) + require.True(t, res) +} + +func TestMarshalAmino(t *testing.T) { + aminoCdc := codec.NewLegacyAmino() + privKey, err := GenerateKey() + require.NoError(t, err) + + pubKey := privKey.PubKey().(*PubKey) + + testCases := []struct { + desc string + msg codec.AminoMarshaler + typ interface{} + expBinary []byte + expJSON string + }{ + { + "ethsecp256k1 private key", + privKey, + &PrivKey{}, + append([]byte{32}, privKey.Bytes()...), // Length-prefixed. + "\"" + base64.StdEncoding.EncodeToString(privKey.Bytes()) + "\"", + }, + { + "ethsecp256k1 public key", + pubKey, + &PubKey{}, + append([]byte{33}, pubKey.Bytes()...), // Length-prefixed. + "\"" + base64.StdEncoding.EncodeToString(pubKey.Bytes()) + "\"", + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + // Do a round trip of encoding/decoding binary. + bz, err := aminoCdc.Marshal(tc.msg) + require.NoError(t, err) + require.Equal(t, tc.expBinary, bz) + + err = aminoCdc.Unmarshal(bz, tc.typ) + require.NoError(t, err) + + require.Equal(t, tc.msg, tc.typ) + + // Do a round trip of encoding/decoding JSON. + bz, err = aminoCdc.MarshalJSON(tc.msg) + require.NoError(t, err) + require.Equal(t, tc.expJSON, string(bz)) + + err = aminoCdc.UnmarshalJSON(bz, tc.typ) + require.NoError(t, err) + + require.Equal(t, tc.msg, tc.typ) + }) + } +} diff --git a/legacy/crypto/ethsecp256k1/keys.pb.go b/legacy/crypto/ethsecp256k1/keys.pb.go new file mode 100644 index 0000000..de61f7e --- /dev/null +++ b/legacy/crypto/ethsecp256k1/keys.pb.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/crypto/v1/ethsecp256k1/keys.proto + +package ethsecp256k1 + +import ( + fmt "fmt" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// PubKey defines a type alias for an ecdsa.PublicKey that implements +// Tendermint's PubKey interface. It represents the 33-byte compressed public +// key format. +type PubKey struct { + // key is the public key in byte form + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *PubKey) Reset() { *m = PubKey{} } +func (*PubKey) ProtoMessage() {} +func (*PubKey) Descriptor() ([]byte, []int) { + return fileDescriptor_0c10cadcf35beb64, []int{0} +} +func (m *PubKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubKey.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PubKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKey.Merge(m, src) +} +func (m *PubKey) XXX_Size() int { + return m.Size() +} +func (m *PubKey) XXX_DiscardUnknown() { + xxx_messageInfo_PubKey.DiscardUnknown(m) +} + +var xxx_messageInfo_PubKey proto.InternalMessageInfo + +func (m *PubKey) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +// PrivKey defines a type alias for an ecdsa.PrivateKey that implements +// Tendermint's PrivateKey interface. +type PrivKey struct { + // key is the private key in byte form + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *PrivKey) Reset() { *m = PrivKey{} } +func (m *PrivKey) String() string { return proto.CompactTextString(m) } +func (*PrivKey) ProtoMessage() {} +func (*PrivKey) Descriptor() ([]byte, []int) { + return fileDescriptor_0c10cadcf35beb64, []int{1} +} +func (m *PrivKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PrivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PrivKey.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PrivKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PrivKey.Merge(m, src) +} +func (m *PrivKey) XXX_Size() int { + return m.Size() +} +func (m *PrivKey) XXX_DiscardUnknown() { + xxx_messageInfo_PrivKey.DiscardUnknown(m) +} + +var xxx_messageInfo_PrivKey proto.InternalMessageInfo + +func (m *PrivKey) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func init() { + proto.RegisterType((*PubKey)(nil), "ethermint.crypto.v1.ethsecp256k1.PubKey") + proto.RegisterType((*PrivKey)(nil), "ethermint.crypto.v1.ethsecp256k1.PrivKey") +} + +func init() { + proto.RegisterFile("ethermint/crypto/v1/ethsecp256k1/keys.proto", fileDescriptor_0c10cadcf35beb64) +} + +var fileDescriptor_0c10cadcf35beb64 = []byte{ + // 197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x2f, 0x33, 0xd4, + 0x4f, 0x2d, 0xc9, 0x28, 0x4e, 0x4d, 0x2e, 0x30, 0x32, 0x35, 0xcb, 0x36, 0xd4, 0xcf, 0x4e, 0xad, + 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x80, 0x2b, 0xd6, 0x83, 0x28, 0xd6, 0x2b, + 0x33, 0xd4, 0x43, 0x56, 0x2c, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xac, 0x0f, 0x62, 0x41, + 0xf4, 0x29, 0x29, 0x70, 0xb1, 0x05, 0x94, 0x26, 0x79, 0xa7, 0x56, 0x0a, 0x09, 0x70, 0x31, 0x67, + 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x81, 0x98, 0x56, 0x2c, 0x33, 0x16, 0xc8, + 0x33, 0x28, 0x49, 0x73, 0xb1, 0x07, 0x14, 0x65, 0x96, 0x61, 0x55, 0xe2, 0xe4, 0x71, 0xe2, 0x91, + 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, + 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x7a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, + 0xc9, 0xf9, 0xb9, 0xfa, 0xa9, 0x65, 0xb9, 0xf9, 0xc5, 0x50, 0xb2, 0xcc, 0xc8, 0x00, 0xe6, 0x1d, + 0x64, 0xe7, 0x25, 0xb1, 0x81, 0xdd, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x82, 0x9c, 0x2b, + 0x6e, 0xf6, 0x00, 0x00, 0x00, +} + +func (m *PubKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PubKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PrivKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PrivKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { + offset -= sovKeys(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PubKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovKeys(uint64(l)) + } + return n +} + +func (m *PrivKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovKeys(uint64(l)) + } + return n +} + +func sovKeys(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozKeys(x uint64) (n int) { + return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PubKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PubKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PrivKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PrivKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PrivKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipKeys(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthKeys + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupKeys + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthKeys + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/ethereum/eip712/domain.go b/legacy/ethereum/eip712/domain.go new file mode 100644 index 0000000..5b9552a --- /dev/null +++ b/legacy/ethereum/eip712/domain.go @@ -0,0 +1,19 @@ +package eip712 + +import ( + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/signer/core/apitypes" +) + +// createEIP712Domain creates the typed data domain for the given chainID. +func createEIP712Domain(chainID uint64) apitypes.TypedDataDomain { + domain := apitypes.TypedDataDomain{ + Name: "Cosmos Web3", + Version: "1.0.0", + ChainId: math.NewHexOrDecimal256(int64(chainID)), // #nosec G115 + VerifyingContract: "cosmos", + Salt: "0", + } + + return domain +} diff --git a/legacy/ethereum/eip712/eip712.go b/legacy/ethereum/eip712/eip712.go new file mode 100644 index 0000000..0b3d998 --- /dev/null +++ b/legacy/ethereum/eip712/eip712.go @@ -0,0 +1,34 @@ +package eip712 + +import ( + "github.com/ethereum/go-ethereum/signer/core/apitypes" +) + +// WrapTxToTypedData wraps an Amino-encoded Cosmos Tx JSON SignDoc +// bytestream into an EIP712-compatible TypedData request. +func WrapTxToTypedData( + chainID uint64, + data []byte, +) (apitypes.TypedData, error) { + messagePayload, err := createEIP712MessagePayload(data) + message := messagePayload.message + if err != nil { + return apitypes.TypedData{}, err + } + + types, err := createEIP712Types(messagePayload) + if err != nil { + return apitypes.TypedData{}, err + } + + domain := createEIP712Domain(chainID) + + typedData := apitypes.TypedData{ + Types: types, + PrimaryType: txField, + Domain: domain, + Message: message, + } + + return typedData, nil +} diff --git a/legacy/ethereum/eip712/eip712_legacy.go b/legacy/ethereum/eip712/eip712_legacy.go new file mode 100644 index 0000000..9d8b6e8 --- /dev/null +++ b/legacy/ethereum/eip712/eip712_legacy.go @@ -0,0 +1,438 @@ +package eip712 + +import ( + "encoding/json" + "fmt" + "math/big" + "reflect" // #nosec G702 for sensitive import + "strings" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/signer/core/apitypes" + + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" +) + +type FeeDelegationOptions struct { + FeePayer sdk.AccAddress +} + +const ( + typeDefPrefix = "_" +) + +// LegacyWrapTxToTypedData is an ultimate method that wraps Amino-encoded Cosmos Tx JSON data +// into an EIP712-compatible TypedData request. +func LegacyWrapTxToTypedData( + cdc codectypes.AnyUnpacker, + chainID uint64, + msg sdk.Msg, + data []byte, + feeDelegation *FeeDelegationOptions, +) (apitypes.TypedData, error) { + txData := make(map[string]interface{}) + + if err := json.Unmarshal(data, &txData); err != nil { + return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to JSON unmarshal data") + } + + domain := apitypes.TypedDataDomain{ + Name: "Cosmos Web3", + Version: "1.0.0", + ChainId: math.NewHexOrDecimal256(int64(chainID)), //#nosec G115 -- int overflow is not a concern here + VerifyingContract: "cosmos", + Salt: "0", + } + + msgTypes, err := extractMsgTypes(cdc, "MsgValue", msg) + if err != nil { + return apitypes.TypedData{}, err + } + + if feeDelegation != nil { + feeInfo, ok := txData["fee"].(map[string]interface{}) + if !ok { + return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrInvalidType, "cannot parse fee from tx data") + } + + feeInfo["feePayer"] = feeDelegation.FeePayer.String() + + // also patching msgTypes to include feePayer + msgTypes["Fee"] = []apitypes.Type{ + {Name: "feePayer", Type: "string"}, + {Name: "amount", Type: "Coin[]"}, + {Name: "gas", Type: "string"}, + } + } + + typedData := apitypes.TypedData{ + Types: msgTypes, + PrimaryType: "Tx", + Domain: domain, + Message: txData, + } + + return typedData, nil +} + +func extractMsgTypes(cdc codectypes.AnyUnpacker, msgTypeName string, msg sdk.Msg) (apitypes.Types, error) { + rootTypes := apitypes.Types{ + "EIP712Domain": { + { + Name: "name", + Type: "string", + }, + { + Name: "version", + Type: "string", + }, + { + Name: "chainId", + Type: "uint256", + }, + { + Name: "verifyingContract", + Type: "string", + }, + { + Name: "salt", + Type: "string", + }, + }, + "Tx": { + {Name: "account_number", Type: "string"}, + {Name: "chain_id", Type: "string"}, + {Name: "fee", Type: "Fee"}, + {Name: "memo", Type: "string"}, + {Name: "msgs", Type: "Msg[]"}, + {Name: "sequence", Type: "string"}, + // Note timeout_height was removed because it was not getting filled with the legacyTx + // {Name: "timeout_height", Type: "string"}, + }, + "Fee": { + {Name: "amount", Type: "Coin[]"}, + {Name: "gas", Type: "string"}, + }, + "Coin": { + {Name: "denom", Type: "string"}, + {Name: "amount", Type: "string"}, + }, + "Msg": { + {Name: "type", Type: "string"}, + {Name: "value", Type: msgTypeName}, + }, + msgTypeName: {}, + } + + if err := walkFields(cdc, rootTypes, msgTypeName, msg); err != nil { + return nil, err + } + + return rootTypes, nil +} + +func walkFields(cdc codectypes.AnyUnpacker, typeMap apitypes.Types, rootType string, in interface{}) (err error) { + defer doRecover(&err) + + t := reflect.TypeOf(in) + v := reflect.ValueOf(in) + + for { + if t.Kind() == reflect.Ptr || + t.Kind() == reflect.Interface { + t = t.Elem() + v = v.Elem() + + continue + } + + break + } + + return legacyTraverseFields(cdc, typeMap, rootType, typeDefPrefix, t, v) +} + +type cosmosAnyWrapper struct { + Type string `json:"type"` + Value interface{} `json:"value"` +} + +func legacyTraverseFields( + cdc codectypes.AnyUnpacker, + typeMap apitypes.Types, + rootType string, + prefix string, + t reflect.Type, + v reflect.Value, +) error { + n := t.NumField() + + if prefix == typeDefPrefix { + if len(typeMap[rootType]) == n { + return nil + } + } else { + typeDef := sanitizeTypedef(prefix) + if len(typeMap[typeDef]) == n { + return nil + } + } + + for i := 0; i < n; i++ { + var ( + field reflect.Value + err error + ) + + if v.IsValid() { + field = v.Field(i) + } + + fieldType := t.Field(i).Type + fieldName := jsonNameFromTag(t.Field(i).Tag) + + if fieldType == cosmosAnyType { + // Unpack field, value as Any + if fieldType, field, err = unpackAny(cdc, field); err != nil { + return err + } + } + + // If field is an empty value, do not include in types, since it will not be present in the object + if field.IsZero() { + continue + } + + for { + if fieldType.Kind() == reflect.Ptr { + fieldType = fieldType.Elem() + + if field.IsValid() { + field = field.Elem() + } + + continue + } + + if fieldType.Kind() == reflect.Interface { + fieldType = reflect.TypeOf(field.Interface()) + continue + } + + if field.Kind() == reflect.Ptr { + field = field.Elem() + continue + } + + break + } + + var isCollection bool + if fieldType.Kind() == reflect.Array || fieldType.Kind() == reflect.Slice { + if field.Len() == 0 { + // skip empty collections from type mapping + continue + } + + fieldType = fieldType.Elem() + field = field.Index(0) + isCollection = true + + if fieldType == cosmosAnyType { + if fieldType, field, err = unpackAny(cdc, field); err != nil { + return err + } + } + } + + for { + if fieldType.Kind() == reflect.Ptr { + fieldType = fieldType.Elem() + + if field.IsValid() { + field = field.Elem() + } + + continue + } + + if fieldType.Kind() == reflect.Interface { + fieldType = reflect.TypeOf(field.Interface()) + continue + } + + if field.Kind() == reflect.Ptr { + field = field.Elem() + continue + } + + break + } + + fieldPrefix := fmt.Sprintf("%s.%s", prefix, fieldName) + + ethTyp := typToEth(fieldType) + + if len(ethTyp) > 0 { + // Support array of uint64 + if isCollection && fieldType.Kind() != reflect.Slice && fieldType.Kind() != reflect.Array { + ethTyp += "[]" + } + + if prefix == typeDefPrefix { + typeMap[rootType] = append(typeMap[rootType], apitypes.Type{ + Name: fieldName, + Type: ethTyp, + }) + } else { + typeDef := sanitizeTypedef(prefix) + typeMap[typeDef] = append(typeMap[typeDef], apitypes.Type{ + Name: fieldName, + Type: ethTyp, + }) + } + + continue + } + + if fieldType.Kind() == reflect.Struct { + var fieldTypedef string + + if isCollection { + fieldTypedef = sanitizeTypedef(fieldPrefix) + "[]" + } else { + fieldTypedef = sanitizeTypedef(fieldPrefix) + } + + if prefix == typeDefPrefix { + typeMap[rootType] = append(typeMap[rootType], apitypes.Type{ + Name: fieldName, + Type: fieldTypedef, + }) + } else { + typeDef := sanitizeTypedef(prefix) + typeMap[typeDef] = append(typeMap[typeDef], apitypes.Type{ + Name: fieldName, + Type: fieldTypedef, + }) + } + + if err := legacyTraverseFields(cdc, typeMap, rootType, fieldPrefix, fieldType, field); err != nil { + return err + } + + continue + } + } + + return nil +} + +func jsonNameFromTag(tag reflect.StructTag) string { + jsonTags := tag.Get("json") + parts := strings.Split(jsonTags, ",") + return parts[0] +} + +// Unpack the given Any value with Type/Value deconstruction +func unpackAny(cdc codectypes.AnyUnpacker, field reflect.Value) (reflect.Type, reflect.Value, error) { + anyData, ok := field.Interface().(*codectypes.Any) + if !ok { + return nil, reflect.Value{}, errorsmod.Wrapf(errortypes.ErrPackAny, "%T", field.Interface()) + } + + anyWrapper := &cosmosAnyWrapper{ + Type: anyData.TypeUrl, + } + + if err := cdc.UnpackAny(anyData, &anyWrapper.Value); err != nil { + return nil, reflect.Value{}, errorsmod.Wrap(err, "failed to unpack Any in msg struct") + } + + fieldType := reflect.TypeOf(anyWrapper) + field = reflect.ValueOf(anyWrapper) + + return fieldType, field, nil +} + +var ( + hashType = reflect.TypeOf(common.Hash{}) + addressType = reflect.TypeOf(common.Address{}) + bigIntType = reflect.TypeOf(big.Int{}) + cosmIntType = reflect.TypeOf(sdkmath.Int{}) + cosmDecType = reflect.TypeOf(sdkmath.LegacyDec{}) + timeType = reflect.TypeOf(time.Time{}) + cosmosAnyType = reflect.TypeOf(&codectypes.Any{}) + edType = reflect.TypeOf(ed25519.PubKey{}) +) + +// typToEth supports only basic types and arrays of basic types. +// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md +func typToEth(typ reflect.Type) string { + const str = "string" + + switch typ.Kind() { + case reflect.String: + return str + case reflect.Bool: + return "bool" + case reflect.Int: + return "int64" + case reflect.Int8: + return "int8" + case reflect.Int16: + return "int16" + case reflect.Int32: + return "int32" + case reflect.Int64: + return "int64" + case reflect.Uint: + return "uint64" + case reflect.Uint8: + return "uint8" + case reflect.Uint16: + return "uint16" + case reflect.Uint32: + return "uint32" + case reflect.Uint64: + return "uint64" + case reflect.Slice: + ethName := typToEth(typ.Elem()) + if len(ethName) > 0 { + return ethName + "[]" + } + case reflect.Array: + ethName := typToEth(typ.Elem()) + if len(ethName) > 0 { + return ethName + "[]" + } + case reflect.Ptr: + if typ.Elem().ConvertibleTo(bigIntType) || + typ.Elem().ConvertibleTo(timeType) || + typ.Elem().ConvertibleTo(edType) || + typ.Elem().ConvertibleTo(cosmDecType) || + typ.Elem().ConvertibleTo(cosmIntType) { + return str + } + case reflect.Struct: + if typ.ConvertibleTo(hashType) || + typ.ConvertibleTo(addressType) || + typ.ConvertibleTo(bigIntType) || + typ.ConvertibleTo(edType) || + typ.ConvertibleTo(timeType) || + typ.ConvertibleTo(cosmDecType) || + typ.ConvertibleTo(cosmIntType) { + return str + } + } + + return "" +} diff --git a/legacy/ethereum/eip712/eip712_legacy_test.go b/legacy/ethereum/eip712/eip712_legacy_test.go new file mode 100644 index 0000000..c280d00 --- /dev/null +++ b/legacy/ethereum/eip712/eip712_legacy_test.go @@ -0,0 +1,95 @@ +package eip712_test + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/evm/ethereum/eip712" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +func TestLegacyWrapTxToTypedData(t *testing.T) { + // Setup + cdc := codec.NewProtoCodec(types.NewInterfaceRegistry()) + + chainID := uint64(1) + msg := banktypes.NewMsgSend( + sdk.AccAddress([]byte("from_address")), + sdk.AccAddress([]byte("to_address")), + sdk.Coins{ + sdk.NewInt64Coin("stake", 1000), + }, + ) + + txData := map[string]interface{}{ + "account_number": "1", + "chain_id": "cosmoshub-4", + "fee": map[string]interface{}{ + "amount": []map[string]string{ + {"denom": "stake", "amount": "10"}, + }, + "gas": "200000", + }, + "memo": "Test Memo", + "msgs": []interface{}{ + map[string]interface{}{ + "type": "cosmos-sdk/MsgSend", + "value": map[string]string{ + "from_address": "from_address", + "to_address": "to_address", + "amount": "1000stake", + }, + }, + }, + "sequence": "1", + } + + data, err := json.Marshal(txData) + require.NoError(t, err) + + feeDelegation := &eip712.FeeDelegationOptions{ + FeePayer: sdk.AccAddress([]byte("fee_payer")), + } + + // Execute + typedData, err := eip712.LegacyWrapTxToTypedData(cdc, chainID, msg, data, feeDelegation) + + // Validate + require.NoError(t, err) + require.NotNil(t, typedData) + + // Check Domain + require.Equal(t, "Cosmos Web3", typedData.Domain.Name) + require.Equal(t, "1.0.0", typedData.Domain.Version) + require.Equal(t, "cosmos", typedData.Domain.VerifyingContract) + + // Check Message + message := typedData.Message + require.Equal(t, "1", message["account_number"]) + require.Equal(t, "cosmoshub-4", message["chain_id"]) + + fee := message["fee"].(map[string]interface{}) + require.Equal(t, sdk.AccAddress([]byte("fee_payer")).String(), fee["feePayer"]) + + require.Equal(t, "200000", fee["gas"]) + + msgs := message["msgs"].([]interface{}) + require.Len(t, msgs, 1) + + msgContent := msgs[0].(map[string]interface{}) + require.Equal(t, "cosmos-sdk/MsgSend", msgContent["type"]) + value := msgContent["value"].(map[string]interface{}) + require.Equal(t, "from_address", value["from_address"]) + require.Equal(t, "to_address", value["to_address"]) + require.Equal(t, "1000stake", value["amount"]) + + // Validate types structure + require.Contains(t, typedData.Types, "EIP712Domain") + require.Contains(t, typedData.Types, "Tx") +} diff --git a/legacy/ethereum/eip712/encoding.go b/legacy/ethereum/eip712/encoding.go new file mode 100644 index 0000000..5292fa4 --- /dev/null +++ b/legacy/ethereum/eip712/encoding.go @@ -0,0 +1,229 @@ +package eip712 + +import ( + "errors" + "fmt" + + apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + txTypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" +) + +var ( + protoCodec codec.ProtoCodecMarshaler + aminoCodec *codec.LegacyAmino + eip155ChainID uint64 +) + +// SetEncodingConfig set the encoding config to the singleton codecs (Amino and Protobuf). +// The process of unmarshaling SignDoc bytes into a SignDoc object requires having a codec +// populated with all relevant message types. As a result, we must call this method on app +// initialization with the app's encoding config. +func SetEncodingConfig(cdc *codec.LegacyAmino, interfaceRegistry types.InterfaceRegistry, evmChainID uint64) { + aminoCodec = cdc + protoCodec = codec.NewProtoCodec(interfaceRegistry) + // Since these transactions require a Cosmos chain ID, we can instead derive the EIP155 chain ID from the config. Replays are of no worry here. + eip155ChainID = evmChainID +} + +// GetEIP712BytesForMsg returns the EIP-712 object bytes for the given SignDoc bytes by decoding the bytes into +// an EIP-712 object, then converting via WrapTxToTypedData. See https://eips.ethereum.org/EIPS/eip-712 for more. +func GetEIP712BytesForMsg(signDocBytes []byte) ([]byte, error) { + typedData, err := GetEIP712TypedDataForMsg(signDocBytes) + if err != nil { + return nil, err + } + + _, rawData, err := apitypes.TypedDataAndHash(typedData) + if err != nil { + return nil, fmt.Errorf("could not get EIP-712 object bytes: %w", err) + } + + return []byte(rawData), nil +} + +// GetEIP712TypedDataForMsg returns the EIP-712 TypedData representation for either +// Amino or Protobuf encoded signature doc bytes. +func GetEIP712TypedDataForMsg(signDocBytes []byte) (apitypes.TypedData, error) { + // Attempt to decode as both Amino and Protobuf since the message format is unknown. + // If either decode works, we can move forward with the corresponding typed data. + typedDataAmino, errAmino := decodeAminoSignDoc(signDocBytes) + if errAmino == nil && isValidEIP712Payload(typedDataAmino) { + return typedDataAmino, nil + } + typedDataProtobuf, errProtobuf := decodeProtobufSignDoc(signDocBytes) + if errProtobuf == nil && isValidEIP712Payload(typedDataProtobuf) { + return typedDataProtobuf, nil + } + + return apitypes.TypedData{}, fmt.Errorf("could not decode sign doc as either Amino or Protobuf.\n amino: %v\n protobuf: %v", errAmino, errProtobuf) +} + +// isValidEIP712Payload ensures that the given TypedData does not contain empty fields from +// an improper initialization. +func isValidEIP712Payload(typedData apitypes.TypedData) bool { + return len(typedData.Message) != 0 && len(typedData.Types) != 0 && typedData.PrimaryType != "" && typedData.Domain != apitypes.TypedDataDomain{} +} + +// decodeAminoSignDoc attempts to decode the provided sign doc (bytes) as an Amino payload +// and returns a signable EIP-712 TypedData object. +func decodeAminoSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { + // Ensure codecs have been initialized + if err := validateCodecInit(); err != nil { + return apitypes.TypedData{}, err + } + + var aminoDoc legacytx.StdSignDoc + if err := aminoCodec.UnmarshalJSON(signDocBytes, &aminoDoc); err != nil { + return apitypes.TypedData{}, err + } + + var fees legacytx.StdFee + if err := aminoCodec.UnmarshalJSON(aminoDoc.Fee, &fees); err != nil { + return apitypes.TypedData{}, err + } + + // Validate payload messages + msgs := make([]sdk.Msg, len(aminoDoc.Msgs)) + for i, jsonMsg := range aminoDoc.Msgs { + var m sdk.Msg + if err := aminoCodec.UnmarshalJSON(jsonMsg, &m); err != nil { + return apitypes.TypedData{}, fmt.Errorf("failed to unmarshal sign doc message: %w", err) + } + msgs[i] = m + } + + if err := validatePayloadMessages(msgs); err != nil { + return apitypes.TypedData{}, err + } + + typedData, err := WrapTxToTypedData( + eip155ChainID, + signDocBytes, + ) + if err != nil { + return apitypes.TypedData{}, fmt.Errorf("could not convert to EIP712 representation: %w", err) + } + + return typedData, nil +} + +// decodeProtobufSignDoc attempts to decode the provided sign doc (bytes) as a Protobuf payload +// and returns a signable EIP-712 TypedData object. +func decodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { + // Ensure codecs have been initialized + if err := validateCodecInit(); err != nil { + return apitypes.TypedData{}, err + } + + signDoc := &txTypes.SignDoc{} + if err := signDoc.Unmarshal(signDocBytes); err != nil { + return apitypes.TypedData{}, err + } + + authInfo := &txTypes.AuthInfo{} + if err := authInfo.Unmarshal(signDoc.AuthInfoBytes); err != nil { + return apitypes.TypedData{}, err + } + + body := &txTypes.TxBody{} + if err := body.Unmarshal(signDoc.BodyBytes); err != nil { + return apitypes.TypedData{}, err + } + + // Until support for these fields is added, throw an error at their presence + if body.TimeoutHeight != 0 || len(body.ExtensionOptions) != 0 || len(body.NonCriticalExtensionOptions) != 0 { + return apitypes.TypedData{}, errors.New("body contains unsupported fields: TimeoutHeight, ExtensionOptions, or NonCriticalExtensionOptions") + } + + if len(authInfo.SignerInfos) != 1 { + return apitypes.TypedData{}, fmt.Errorf("invalid number of signer infos provided, expected 1 got %v", len(authInfo.SignerInfos)) + } + + // Validate payload messages + msgs := make([]sdk.Msg, len(body.Messages)) + for i, protoMsg := range body.Messages { + var m sdk.Msg + if err := protoCodec.UnpackAny(protoMsg, &m); err != nil { + return apitypes.TypedData{}, fmt.Errorf("could not unpack message object with error %w", err) + } + msgs[i] = m + } + + if err := validatePayloadMessages(msgs); err != nil { + return apitypes.TypedData{}, err + } + + signerInfo := authInfo.SignerInfos[0] + + stdFee := &legacytx.StdFee{ + Amount: authInfo.Fee.Amount, + Gas: authInfo.Fee.GasLimit, + } + + // WrapTxToTypedData expects the payload as an Amino Sign Doc + signBytes := legacytx.StdSignBytes( + signDoc.ChainId, + signDoc.AccountNumber, + signerInfo.Sequence, + body.TimeoutHeight, + *stdFee, + msgs, + body.Memo, + ) + + typedData, err := WrapTxToTypedData( + eip155ChainID, + signBytes, + ) + if err != nil { + return apitypes.TypedData{}, err + } + + return typedData, nil +} + +// validateCodecInit ensures that both Amino and Protobuf encoding codecs have been set on app init, +// so the module does not panic if either codec is not found. +func validateCodecInit() error { + if aminoCodec == nil || protoCodec == nil { + return errors.New("missing codec: codecs have not been properly initialized using SetEncodingConfig") + } + + return nil +} + +// validatePayloadMessages ensures that the transaction messages can be represented in an EIP-712 +// encoding by checking that messages exist and share a single signer. +func validatePayloadMessages(msgs []sdk.Msg) error { + if len(msgs) == 0 { + return errors.New("unable to build EIP-712 payload: transaction does contain any messages") + } + + var msgSigner sdk.AccAddress + + for i, m := range msgs { + 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 = signers[0] + continue + } + + if !msgSigner.Equals(sdk.AccAddress(signers[0])) { + return errors.New("unable to build EIP-712 payload: multiple signers detected") + } + } + + return nil +} diff --git a/legacy/ethereum/eip712/encoding_legacy.go b/legacy/ethereum/eip712/encoding_legacy.go new file mode 100644 index 0000000..d0efecf --- /dev/null +++ b/legacy/ethereum/eip712/encoding_legacy.go @@ -0,0 +1,262 @@ +package eip712 + +import ( + "encoding/json" + "errors" + "fmt" + + apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" + + sdk "github.com/cosmos/cosmos-sdk/types" + txTypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" +) + +type aminoMessage struct { + Type string `json:"type"` + Value interface{} `json:"value"` +} + +// LegacyGetEIP712BytesForMsg returns the EIP-712 object bytes for the given SignDoc bytes by decoding the bytes into +// an EIP-712 object, then converting via LegacyWrapTxToTypedData. See https://eips.ethereum.org/EIPS/eip-712 for more. +func LegacyGetEIP712BytesForMsg(signDocBytes []byte) ([]byte, error) { + typedData, err := LegacyGetEIP712TypedDataForMsg(signDocBytes, eip155ChainID) + if err != nil { + return nil, err + } + + _, rawData, err := apitypes.TypedDataAndHash(typedData) + if err != nil { + return nil, fmt.Errorf("could not get EIP-712 object bytes: %w", err) + } + + return []byte(rawData), nil +} + +// LegacyGetEIP712TypedDataForMsg returns the EIP-712 TypedData representation for either +// Amino or Protobuf encoded signature doc bytes. +func LegacyGetEIP712TypedDataForMsg(signDocBytes []byte, eip155ChainID uint64) (apitypes.TypedData, error) { + // Attempt to decode as both Amino and Protobuf since the message format is unknown. + // If either decode works, we can move forward with the corresponding typed data. + typedDataAmino, errAmino := legacyDecodeAminoSignDoc(signDocBytes, eip155ChainID) + if errAmino == nil && isValidEIP712Payload(typedDataAmino) { + return typedDataAmino, nil + } + typedDataProtobuf, errProtobuf := legacyDecodeProtobufSignDoc(signDocBytes, eip155ChainID) + if errProtobuf == nil && isValidEIP712Payload(typedDataProtobuf) { + return typedDataProtobuf, nil + } + + return apitypes.TypedData{}, fmt.Errorf("could not decode sign doc as either Amino or Protobuf.\n amino: %v\n protobuf: %v", errAmino, errProtobuf) +} + +// legacyDecodeAminoSignDoc attempts to decode the provided sign doc (bytes) as an Amino payload +// and returns a signable EIP-712 TypedData object. +func legacyDecodeAminoSignDoc(signDocBytes []byte, eip155ChainID uint64) (apitypes.TypedData, error) { + // Ensure codecs have been initialized + if err := validateCodecInit(); err != nil { + return apitypes.TypedData{}, err + } + + var aminoDoc legacytx.StdSignDoc + if err := aminoCodec.UnmarshalJSON(signDocBytes, &aminoDoc); err != nil { + return apitypes.TypedData{}, err + } + + var fees legacytx.StdFee + if err := aminoCodec.UnmarshalJSON(aminoDoc.Fee, &fees); err != nil { + return apitypes.TypedData{}, err + } + + // Validate payload messages + msgs := make([]sdk.Msg, len(aminoDoc.Msgs)) + for i, jsonMsg := range aminoDoc.Msgs { + var m sdk.Msg + if err := aminoCodec.UnmarshalJSON(jsonMsg, &m); err != nil { + return apitypes.TypedData{}, fmt.Errorf("failed to unmarshal sign doc message: %w", err) + } + msgs[i] = m + } + + if err := legacyValidatePayloadMessages(msgs); err != nil { + return apitypes.TypedData{}, err + } + + // Use first message for fee payer and type inference + msg := msgs[0] + + // By convention, the fee payer is the first address in the list of signers. + signers, _, err := protoCodec.GetMsgV1Signers(msg) + if err != nil { + return apitypes.TypedData{}, err + } + feePayer := signers[0] + feeDelegation := &FeeDelegationOptions{ + FeePayer: feePayer, + } + + typedData, err := LegacyWrapTxToTypedData( + protoCodec, + eip155ChainID, + msg, + signDocBytes, + feeDelegation, + ) + if err != nil { + return apitypes.TypedData{}, fmt.Errorf("could not convert to EIP712 representation: %w", err) + } + + return typedData, nil +} + +// legacyDecodeProtobufSignDoc attempts to decode the provided sign doc (bytes) as a Protobuf payload +// and returns a signable EIP-712 TypedData object. +func legacyDecodeProtobufSignDoc(signDocBytes []byte, eip155ChainID uint64) (apitypes.TypedData, error) { + // Ensure codecs have been initialized + if err := validateCodecInit(); err != nil { + return apitypes.TypedData{}, err + } + + signDoc := &txTypes.SignDoc{} + if err := signDoc.Unmarshal(signDocBytes); err != nil { + return apitypes.TypedData{}, err + } + + authInfo := &txTypes.AuthInfo{} + if err := authInfo.Unmarshal(signDoc.AuthInfoBytes); err != nil { + return apitypes.TypedData{}, err + } + + body := &txTypes.TxBody{} + if err := body.Unmarshal(signDoc.BodyBytes); err != nil { + return apitypes.TypedData{}, err + } + + // Until support for these fields is added, throw an error at their presence + if body.TimeoutHeight != 0 || len(body.ExtensionOptions) != 0 || len(body.NonCriticalExtensionOptions) != 0 { + return apitypes.TypedData{}, errors.New("body contains unsupported fields: TimeoutHeight, ExtensionOptions, or NonCriticalExtensionOptions") + } + + if len(authInfo.SignerInfos) != 1 { + return apitypes.TypedData{}, fmt.Errorf("invalid number of signer infos provided, expected 1 got %v", len(authInfo.SignerInfos)) + } + + // Validate payload messages + msgs := make([]sdk.Msg, len(body.Messages)) + for i, protoMsg := range body.Messages { + var m sdk.Msg + if err := protoCodec.UnpackAny(protoMsg, &m); err != nil { + return apitypes.TypedData{}, fmt.Errorf("could not unpack message object with error %w", err) + } + msgs[i] = m + } + + if err := legacyValidatePayloadMessages(msgs); err != nil { + return apitypes.TypedData{}, err + } + + // Use first message for fee payer and type inference + msg := msgs[0] + + signerInfo := authInfo.SignerInfos[0] + + stdFee := &legacytx.StdFee{ + Amount: authInfo.Fee.Amount, + Gas: authInfo.Fee.GasLimit, + } + + signers, _, err := protoCodec.GetMsgV1Signers(msg) + if err != nil { + return apitypes.TypedData{}, err + } + feePayer := signers[0] + feeDelegation := &FeeDelegationOptions{ + FeePayer: feePayer, + } + + // WrapTxToTypedData expects the payload as an Amino Sign Doc + signBytes := legacytx.StdSignBytes( + signDoc.ChainId, + signDoc.AccountNumber, + signerInfo.Sequence, + body.TimeoutHeight, + *stdFee, + msgs, + body.Memo, + ) + + typedData, err := LegacyWrapTxToTypedData( + protoCodec, + eip155ChainID, + msg, + signBytes, + feeDelegation, + ) + if err != nil { + return apitypes.TypedData{}, err + } + + return typedData, nil +} + +// validatePayloadMessages ensures that the transaction messages can be represented in an EIP-712 +// encoding by checking that messages exist, are of the same type, and share a single signer. +func legacyValidatePayloadMessages(msgs []sdk.Msg) error { + if len(msgs) == 0 { + return errors.New("unable to build EIP-712 payload: transaction does contain any messages") + } + + var msgType string + var msgSigner sdk.AccAddress + + for i, m := range msgs { + t, err := getMsgType(m) + if err != nil { + return err + } + + 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 = signers[0] + continue + } + + if t != msgType { + return errors.New("unable to build EIP-712 payload: different types of messages detected") + } + + if !msgSigner.Equals(sdk.AccAddress(signers[0])) { + return errors.New("unable to build EIP-712 payload: multiple signers detected") + } + } + + return nil +} + +// getMsgType returns the message type prefix for the given Cosmos SDK Msg +func getMsgType(msg sdk.Msg) (string, error) { + jsonBytes, err := aminoCodec.MarshalJSON(msg) + if err != nil { + return "", err + } + + var jsonMsg aminoMessage + if err := json.Unmarshal(jsonBytes, &jsonMsg); err != nil { + return "", err + } + + // Verify Type was successfully filled in + if jsonMsg.Type == "" { + return "", errors.New("could not decode message: type is missing") + } + + return jsonMsg.Type, nil +} diff --git a/legacy/ethereum/eip712/message.go b/legacy/ethereum/eip712/message.go new file mode 100644 index 0000000..294489d --- /dev/null +++ b/legacy/ethereum/eip712/message.go @@ -0,0 +1,152 @@ +package eip712 + +import ( + "fmt" + + "github.com/tidwall/gjson" + "github.com/tidwall/sjson" + + errorsmod "cosmossdk.io/errors" + + errortypes "github.com/cosmos/cosmos-sdk/types/errors" +) + +type eip712MessagePayload struct { + payload gjson.Result + numPayloadMsgs int + message map[string]interface{} +} + +const ( + payloadMsgsField = "msgs" +) + +// createEIP712MessagePayload generates the EIP-712 message payload +// corresponding to the input data. +func createEIP712MessagePayload(data []byte) (eip712MessagePayload, error) { + basicPayload, err := unmarshalBytesToJSONObject(data) + if err != nil { + return eip712MessagePayload{}, err + } + + payload, numPayloadMsgs, err := FlattenPayloadMessages(basicPayload) + if err != nil { + return eip712MessagePayload{}, errorsmod.Wrap(err, "failed to flatten payload JSON messages") + } + + message, ok := payload.Value().(map[string]interface{}) + if !ok { + return eip712MessagePayload{}, errorsmod.Wrap(errortypes.ErrInvalidType, "failed to parse JSON as map") + } + + messagePayload := eip712MessagePayload{ + payload: payload, + numPayloadMsgs: numPayloadMsgs, + message: message, + } + + return messagePayload, nil +} + +// unmarshalBytesToJSONObject converts a bytestream into +// a JSON object, then makes sure the JSON is an object. +func unmarshalBytesToJSONObject(data []byte) (gjson.Result, error) { + if !gjson.ValidBytes(data) { + return gjson.Result{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "invalid JSON received") + } + + payload := gjson.ParseBytes(data) + + if !payload.IsObject() { + return gjson.Result{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to JSON unmarshal data as object") + } + + return payload, nil +} + +// FlattenPayloadMessages flattens the input payload's messages, representing +// them as key-value pairs of "msg{i}": {Msg}, rather than as an array of Msgs. +// We do this to support messages with different schemas. +func FlattenPayloadMessages(payload gjson.Result) (gjson.Result, int, error) { + flattened := payload + var err error + + msgs, err := getPayloadMessages(payload) + if err != nil { + return gjson.Result{}, 0, err + } + + for i, msg := range msgs { + flattened, err = payloadWithNewMessage(flattened, msg, i) + if err != nil { + return gjson.Result{}, 0, err + } + } + + flattened, err = payloadWithoutMsgsField(flattened) + if err != nil { + return gjson.Result{}, 0, err + } + + return flattened, len(msgs), nil +} + +// getPayloadMessages processes and returns the payload messages as a JSON array. +func getPayloadMessages(payload gjson.Result) ([]gjson.Result, error) { + rawMsgs := payload.Get(payloadMsgsField) + + if !rawMsgs.Exists() { + return nil, errorsmod.Wrap(errortypes.ErrInvalidRequest, "no messages found in payload, unable to parse") + } + + if rawMsgs.Type == gjson.Null { + return []gjson.Result{}, nil + } + + if !rawMsgs.IsArray() { + return nil, errorsmod.Wrap(errortypes.ErrInvalidRequest, "expected type array of messages, cannot parse") + } + + return rawMsgs.Array(), nil +} + +// payloadWithNewMessage returns the updated payload object with the message +// set at the field corresponding to index. +func payloadWithNewMessage(payload gjson.Result, msg gjson.Result, index int) (gjson.Result, error) { + field := msgFieldForIndex(index) + + if payload.Get(field).Exists() { + return gjson.Result{}, errorsmod.Wrapf( + errortypes.ErrInvalidRequest, + "malformed payload received, did not expect to find key at field %v", field, + ) + } + + if !msg.IsObject() { + return gjson.Result{}, errorsmod.Wrapf(errortypes.ErrInvalidRequest, "msg at index %d is not valid JSON: %v", index, msg) + } + + newRaw, err := sjson.SetRaw(payload.Raw, field, msg.Raw) + if err != nil { + return gjson.Result{}, err + } + + return gjson.Parse(newRaw), nil +} + +// msgFieldForIndex returns the payload field for a given message post-flattening. +// e.g. msgs[2] becomes 'msg2' +func msgFieldForIndex(i int) string { + return fmt.Sprintf("msg%d", i) +} + +// payloadWithoutMsgsField returns the updated payload without the "msgs" array +// field, which flattening makes obsolete. +func payloadWithoutMsgsField(payload gjson.Result) (gjson.Result, error) { + newRaw, err := sjson.Delete(payload.Raw, payloadMsgsField) + if err != nil { + return gjson.Result{}, err + } + + return gjson.Parse(newRaw), nil +} diff --git a/legacy/ethereum/eip712/preprocess.go b/legacy/ethereum/eip712/preprocess.go new file mode 100644 index 0000000..3e18b7f --- /dev/null +++ b/legacy/ethereum/eip712/preprocess.go @@ -0,0 +1,87 @@ +package eip712 + +import ( + "fmt" + + "github.com/cosmos/evm/types" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec/address" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cosmoskr "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" +) + +// PreprocessLedgerTx reformats Ledger-signed Cosmos transactions to match the fork expected by Cosmos EVM +// by including the signature in a Web3Tx extension and sending a blank signature in the body. +func PreprocessLedgerTx(evmChainID uint64, keyType cosmoskr.KeyType, txBuilder client.TxBuilder) error { + // Only process Ledger transactions + if keyType != cosmoskr.TypeLedger { + return nil + } + + // Init extension builder to set Web3 extension + extensionBuilder, ok := txBuilder.(authtx.ExtensionOptionsTxBuilder) + if !ok { + return fmt.Errorf("cannot cast TxBuilder to ExtensionOptionsTxBuilder") + } + + // Get signatures from TxBuilder + sigs, err := txBuilder.GetTx().GetSignaturesV2() + if err != nil { + return fmt.Errorf("could not get signatures: %w", err) + } + + // Verify single-signer + if len(sigs) != 1 { + return fmt.Errorf("invalid number of signatures, expected 1 and got %v", len(sigs)) + } + + signature := sigs[0] + sigData, ok := signature.Data.(*signing.SingleSignatureData) + if !ok { + return fmt.Errorf("unexpected signature type, expected SingleSignatureData") + } + sigBytes := sigData.Signature + + addrCodec := address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), + } + feePayerAddr, err := addrCodec.BytesToString(txBuilder.GetTx().FeePayer()) + if err != nil { + return fmt.Errorf("could not parse feePayer address: %w", err) + } + // Add ExtensionOptionsWeb3Tx extension with signature + var option *codectypes.Any + option, err = codectypes.NewAnyWithValue(&types.ExtensionOptionsWeb3Tx{ + FeePayer: feePayerAddr, + TypedDataChainID: evmChainID, + FeePayerSig: sigBytes, + }) + if err != nil { + return fmt.Errorf("could not set extension as any: %w", err) + } + + extensionBuilder.SetExtensionOptions(option) + + // Set blank signature with Amino Sign Type + // (Regardless of input signMode, Cosmos EVM requires Amino signature type for Ledger) + blankSig := signing.SingleSignatureData{ + SignMode: signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, + Signature: nil, + } + sig := signing.SignatureV2{ + PubKey: signature.PubKey, + Data: &blankSig, + Sequence: signature.Sequence, + } + + err = txBuilder.SetSignatures(sig) + if err != nil { + return fmt.Errorf("unable to set signatures on payload: %w", err) + } + + return nil +} diff --git a/legacy/ethereum/eip712/preprocess_test.go b/legacy/ethereum/eip712/preprocess_test.go new file mode 100644 index 0000000..c0376fd --- /dev/null +++ b/legacy/ethereum/eip712/preprocess_test.go @@ -0,0 +1,247 @@ +package eip712_test + +import ( + "encoding/hex" + "fmt" + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/evm/encoding" + "github.com/cosmos/evm/ethereum/eip712" + "github.com/cosmos/evm/testutil/constants" + utiltx "github.com/cosmos/evm/testutil/tx" + "github.com/cosmos/evm/types" + evmtypes "github.com/cosmos/evm/x/vm/types" + + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec/address" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +// Testing Constants +var ( + // chainID is used in EIP-712 tests. + chainID = uint64(constants.ExampleEIP155ChainID) + + ctx = client.Context{}.WithTxConfig( + encoding.MakeConfig(chainID).TxConfig, + ) + + // feePayerAddress is the address of the fee payer used in EIP-712 tests. + feePayerAddress = fmt.Sprintf( + "%s17xpfvakm2amg962yls6f84z3kell8c5lserqta", + constants.ExampleBech32Prefix, + ) +) + +type TestCaseStruct struct { + txBuilder client.TxBuilder + expectedFeePayer string + expectedGas uint64 + expectedFee math.Int + expectedMemo string + expectedMsg string + expectedSignatureBytes []byte +} + +func TestLedgerPreprocessing(t *testing.T) { + // Update bech32 prefix + sdk.GetConfig().SetBech32PrefixForAccount(constants.ExampleBech32Prefix, "") + evmConfigurator := evmtypes.NewEVMConfigurator(). + WithEVMCoinInfo(constants.ExampleChainCoinInfo[constants.ExampleChainID]) + err := evmConfigurator.Configure() + require.NoError(t, err) + + testCases := []TestCaseStruct{ + createBasicTestCase(t), + createPopulatedTestCase(t), + } + + for _, tc := range testCases { + // Run pre-processing + err := eip712.PreprocessLedgerTx( + chainID, + keyring.TypeLedger, + tc.txBuilder, + ) + + require.NoError(t, err) + + // Verify Web3 extension matches expected + hasExtOptsTx, ok := tc.txBuilder.(ante.HasExtensionOptionsTx) + require.True(t, ok) + require.True(t, len(hasExtOptsTx.GetExtensionOptions()) == 1) + + expectedExt := types.ExtensionOptionsWeb3Tx{ + TypedDataChainID: 9001, + FeePayer: feePayerAddress, + FeePayerSig: tc.expectedSignatureBytes, + } + + expectedExtAny, err := codectypes.NewAnyWithValue(&expectedExt) + require.NoError(t, err) + + actualExtAny := hasExtOptsTx.GetExtensionOptions()[0] + require.Equal(t, expectedExtAny, actualExtAny) + + // Verify signature type matches expected + signatures, err := tc.txBuilder.GetTx().GetSignaturesV2() + require.NoError(t, err) + require.Equal(t, len(signatures), 1) + + txSig := signatures[0].Data.(*signing.SingleSignatureData) + require.Equal(t, txSig.SignMode, signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) + + // Verify signature is blank + require.Equal(t, len(txSig.Signature), 0) + + // Verify tx fields are unchanged + tx := tc.txBuilder.GetTx() + + addrCodec := address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), + } + + txFeePayer, err := addrCodec.BytesToString(tx.FeePayer()) + require.NoError(t, err) + + require.Equal(t, txFeePayer, tc.expectedFeePayer) + require.Equal(t, tx.GetGas(), tc.expectedGas) + require.Equal(t, tx.GetFee().AmountOf(evmtypes.GetEVMCoinDenom()), tc.expectedFee) + require.Equal(t, tx.GetMemo(), tc.expectedMemo) + + // Verify message is unchanged + if tc.expectedMsg != "" { + require.Equal(t, len(tx.GetMsgs()), 1) + require.Equal(t, tx.GetMsgs()[0].String(), tc.expectedMsg) + } else { + require.Equal(t, len(tx.GetMsgs()), 0) + } + } +} + +func TestBlankTxBuilder(t *testing.T) { + txBuilder := ctx.TxConfig.NewTxBuilder() + + err := eip712.PreprocessLedgerTx( + chainID, + keyring.TypeLedger, + txBuilder, + ) + + require.Error(t, err) +} + +func TestNonLedgerTxBuilder(t *testing.T) { + txBuilder := ctx.TxConfig.NewTxBuilder() + + err := eip712.PreprocessLedgerTx( + chainID, + keyring.TypeLocal, + txBuilder, + ) + + require.NoError(t, err) +} + +func TestInvalidChainId(t *testing.T) { + txBuilder := ctx.TxConfig.NewTxBuilder() + + err := eip712.PreprocessLedgerTx( + 0, + keyring.TypeLedger, + txBuilder, + ) + + require.Error(t, err) +} + +func createBasicTestCase(t *testing.T) TestCaseStruct { + t.Helper() + txBuilder := ctx.TxConfig.NewTxBuilder() + + feePayer, err := sdk.AccAddressFromBech32(feePayerAddress) + require.NoError(t, err) + + txBuilder.SetFeePayer(feePayer) + + // Create signature unrelated to payload for testing + signatureHex := strings.Repeat("01", 65) + signatureBytes, err := hex.DecodeString(signatureHex) + require.NoError(t, err) + + _, privKey := utiltx.NewAddrKey() + sigsV2 := signing.SignatureV2{ + PubKey: privKey.PubKey(), // Use unrelated public key for testing + Data: &signing.SingleSignatureData{ + SignMode: signing.SignMode_SIGN_MODE_DIRECT, + Signature: signatureBytes, + }, + Sequence: 0, + } + + err = txBuilder.SetSignatures(sigsV2) + require.NoError(t, err) + + return TestCaseStruct{ + txBuilder: txBuilder, + expectedFeePayer: feePayer.String(), + expectedGas: 0, + expectedFee: math.NewInt(0), + expectedMemo: "", + expectedMsg: "", + expectedSignatureBytes: signatureBytes, + } +} + +func createPopulatedTestCase(t *testing.T) TestCaseStruct { + t.Helper() + basicTestCase := createBasicTestCase(t) + txBuilder := basicTestCase.txBuilder + + gasLimit := uint64(200000) + memo := "" + feeAmount := math.NewInt(2000) + + txBuilder.SetFeeAmount(sdk.NewCoins( + sdk.NewCoin( + evmtypes.GetEVMCoinDenom(), + feeAmount, + ))) + + txBuilder.SetGasLimit(gasLimit) + txBuilder.SetMemo(memo) + + msgSend := banktypes.MsgSend{ + FromAddress: feePayerAddress, + ToAddress: "cosmos12luku6uxehhak02py4rcz65zu0swh7wjun6msa", + Amount: sdk.NewCoins( + sdk.NewCoin( + evmtypes.GetEVMCoinDenom(), + math.NewInt(10000000), + ), + ), + } + + err := txBuilder.SetMsgs(&msgSend) + require.NoError(t, err) + + return TestCaseStruct{ + txBuilder: txBuilder, + expectedFeePayer: basicTestCase.expectedFeePayer, + expectedGas: gasLimit, + expectedFee: feeAmount, + expectedMemo: memo, + expectedMsg: msgSend.String(), + expectedSignatureBytes: basicTestCase.expectedSignatureBytes, + } +} diff --git a/legacy/ethereum/eip712/types.go b/legacy/ethereum/eip712/types.go new file mode 100644 index 0000000..ad6db98 --- /dev/null +++ b/legacy/ethereum/eip712/types.go @@ -0,0 +1,389 @@ +package eip712 + +import ( + "bytes" + "fmt" + "sort" + "strings" + + "github.com/ethereum/go-ethereum/signer/core/apitypes" + "github.com/tidwall/gjson" + "golang.org/x/text/cases" + "golang.org/x/text/language" + + errorsmod "cosmossdk.io/errors" + + errortypes "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + rootPrefix = "_" + typePrefix = "Type" + + txField = "Tx" + ethBool = "bool" + ethInt64 = "int64" + ethString = "string" + + msgTypeField = "type" + + maxDuplicateTypeDefs = 1000 +) + +// getEIP712Types creates and returns the EIP-712 types +// for the given message payload. +func createEIP712Types(messagePayload eip712MessagePayload) (apitypes.Types, error) { + eip712Types := apitypes.Types{ + "EIP712Domain": { + { + Name: "name", + Type: "string", + }, + { + Name: "version", + Type: "string", + }, + { + Name: "chainId", + Type: "uint256", + }, + { + Name: "verifyingContract", + Type: "string", + }, + { + Name: "salt", + Type: "string", + }, + }, + "Tx": { + {Name: "account_number", Type: "string"}, + {Name: "chain_id", Type: "string"}, + {Name: "fee", Type: "Fee"}, + {Name: "memo", Type: "string"}, + {Name: "sequence", Type: "string"}, + // Note timeout_height was removed because it was not getting filled with the legacyTx + }, + "Fee": { + {Name: "amount", Type: "Coin[]"}, + {Name: "gas", Type: "string"}, + }, + "Coin": { + {Name: "denom", Type: "string"}, + {Name: "amount", Type: "string"}, + }, + } + + for i := 0; i < messagePayload.numPayloadMsgs; i++ { + field := msgFieldForIndex(i) + msg := messagePayload.payload.Get(field) + + if err := addMsgTypesToRoot(eip712Types, field, msg); err != nil { + return nil, err + } + } + + return eip712Types, nil +} + +// addMsgTypesToRoot adds all types for the given message +// to eip712Types, recursively handling object sub-fields. +func addMsgTypesToRoot(eip712Types apitypes.Types, msgField string, msg gjson.Result) (err error) { + defer doRecover(&err) + + if !msg.IsObject() { + return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "message is not valid JSON, cannot parse types") + } + + msgRootType, err := msgRootType(msg) + if err != nil { + return err + } + + msgTypeDef, err := recursivelyAddTypesToRoot(eip712Types, msgRootType, rootPrefix, msg) + if err != nil { + return err + } + + addMsgTypeDefToTxSchema(eip712Types, msgField, msgTypeDef) + + return nil +} + +// msgRootType parses the message and returns the formatted +// type signature corresponding to the message type. +func msgRootType(msg gjson.Result) (string, error) { + msgType := msg.Get(msgTypeField).Str + if msgType == "" { + // .Str is empty for arrays and objects + return "", errorsmod.Wrap(errortypes.ErrInvalidType, "malformed message type value, expected type string") + } + + // Convert e.g. cosmos-sdk/MsgSend to TypeMsgSend + typeTokenized := strings.Split(msgType, "/") + msgSignature := typeTokenized[len(typeTokenized)-1] + rootType := fmt.Sprintf("%v%v", typePrefix, msgSignature) + + return rootType, nil +} + +// addMsgTypeDefToTxSchema adds the message's field-type pairing +// to the Tx schema. +func addMsgTypeDefToTxSchema(eip712Types apitypes.Types, msgField, msgTypeDef string) { + eip712Types[txField] = append(eip712Types[txField], apitypes.Type{ + Name: msgField, + Type: msgTypeDef, + }) +} + +// recursivelyAddTypesToRoot walks all types in the given map +// and recursively adds sub-maps as new types when necessary. +// It adds all type definitions to typeMap, then returns a key +// to the json object's type definition within the map. +func recursivelyAddTypesToRoot( + typeMap apitypes.Types, + rootType string, + prefix string, + payload gjson.Result, +) (string, error) { + typesToAdd := []apitypes.Type{} + + // Must sort the JSON keys for deterministic type generation. + sortedFieldNames, err := sortedJSONKeys(payload) + if err != nil { + return "", errorsmod.Wrap(err, "unable to sort object keys") + } + + typeDef := typeDefForPrefix(prefix, rootType) + + for _, fieldName := range sortedFieldNames { + field := payload.Get(fieldName) + if !field.Exists() { + continue + } + + // Handle array type by unwrapping the first element. + // Note that arrays with multiple types are not supported + // using EIP-712, so we can ignore that case. + isCollection := false + if field.IsArray() { + fieldAsArray := field.Array() + + if len(fieldAsArray) == 0 { + // Arbitrarily add string[] type to handle empty arrays, + // since we cannot access the underlying object. + emptyArrayType := "string[]" + typesToAdd = appendedTypesList(typesToAdd, fieldName, emptyArrayType) + + continue + } + + field = fieldAsArray[0] + isCollection = true + } + + ethType := getEthTypeForJSON(field) + + // Handle JSON primitive types by adding the corresponding + // EIP-712 type to the types schema. + if ethType != "" { + if isCollection { + ethType += "[]" + } + typesToAdd = appendedTypesList(typesToAdd, fieldName, ethType) + + continue + } + + // Handle object types recursively. Note that nested array types are not supported + // in EIP-712, so we can exclude that case. + if field.IsObject() { + fieldPrefix := prefixForSubField(prefix, fieldName) + + fieldTypeDef, err := recursivelyAddTypesToRoot(typeMap, rootType, fieldPrefix, field) + if err != nil { + return "", err + } + + fieldTypeDef = sanitizeTypedef(fieldTypeDef) + if isCollection { + fieldTypeDef += "[]" + } + + typesToAdd = appendedTypesList(typesToAdd, fieldName, fieldTypeDef) + + continue + } + } + + return addTypesToRoot(typeMap, typeDef, typesToAdd) +} + +// sortedJSONKeys returns the sorted JSON keys for the input object, +// to be used for deterministic iteration. +func sortedJSONKeys(json gjson.Result) ([]string, error) { + if !json.IsObject() { + return nil, errorsmod.Wrap(errortypes.ErrInvalidType, "expected JSON map to parse") + } + + jsonMap := json.Map() + + keys := make([]string, len(jsonMap)) + i := 0 + // #nosec G705 for map iteration + for k := range jsonMap { + keys[i] = k + i++ + } + + sort.Slice(keys, func(i, j int) bool { + return strings.Compare(keys[i], keys[j]) > 0 + }) + + return keys, nil +} + +// typeDefForPrefix computes the type definition for the given +// prefix. This value will represent the types key within +// the EIP-712 types map. +func typeDefForPrefix(prefix, rootType string) string { + if prefix == rootPrefix { + return rootType + } + return sanitizeTypedef(prefix) +} + +// appendedTypesList returns an array of Types with a new element +// consisting of name and typeDef. +func appendedTypesList(types []apitypes.Type, name, typeDef string) []apitypes.Type { + return append(types, apitypes.Type{ + Name: name, + Type: typeDef, + }) +} + +// prefixForSubField computes the prefix for a subfield by +// indicating that it's derived from the object associated with prefix. +func prefixForSubField(prefix, fieldName string) string { + return fmt.Sprintf("%s.%s", prefix, fieldName) +} + +// addTypesToRoot attempts to add the types to the root at key +// typeDef and returns the key at which the types are present, +// or an error if they cannot be added. If the typeDef key is a +// duplicate, we return the key corresponding to an identical copy +// if present, without modifying the structure. Otherwise, we insert +// the types at the next available typeDef-{n} field. We do this to +// support identically named payloads with different schemas. +func addTypesToRoot(typeMap apitypes.Types, typeDef string, types []apitypes.Type) (string, error) { + var indexedTypeDef string + + indexAsDuplicate := 0 + + for { + indexedTypeDef = typeDefWithIndex(typeDef, indexAsDuplicate) + existingTypes, foundElement := typeMap[indexedTypeDef] + + // Found identical duplicate, so we can simply return + // the existing type definition. + if foundElement && typesAreEqual(types, existingTypes) { + return indexedTypeDef, nil + } + + // Found no element, so we can create a new one at this index. + if !foundElement { + break + } + + indexAsDuplicate++ + + if indexAsDuplicate == maxDuplicateTypeDefs { + return "", errorsmod.Wrap(errortypes.ErrInvalidRequest, "exceeded maximum number of duplicates for a single type definition") + } + } + + typeMap[indexedTypeDef] = types + + return indexedTypeDef, nil +} + +// typeDefWithIndex creates a duplicate-indexed type definition +// to differentiate between different schemas with the same name. +func typeDefWithIndex(typeDef string, index int) string { + return fmt.Sprintf("%v%d", typeDef, index) +} + +// typesAreEqual compares two apitypes.Type arrays +// and returns a boolean indicating whether they have +// the same values. +// It assumes both arrays are in the same sorted order. +func typesAreEqual(types1 []apitypes.Type, types2 []apitypes.Type) bool { + if len(types1) != len(types2) { + return false + } + + for i := 0; i < len(types1); i++ { + if types1[i].Name != types2[i].Name || types1[i].Type != types2[i].Type { + return false + } + } + + return true +} + +// _.foo_bar.baz -> TypeFooBarBaz +// +// Since Geth does not tolerate complex EIP-712 type names, we need to sanitize +// the inputs. +func sanitizeTypedef(str string) string { + buf := new(bytes.Buffer) + caser := cases.Title(language.English, cases.NoLower) + parts := strings.Split(str, ".") + + for _, part := range parts { + if part == rootPrefix { + buf.WriteString(typePrefix) + continue + } + + subparts := strings.Split(part, "_") + for _, subpart := range subparts { + buf.WriteString(caser.String(subpart)) + } + } + + return buf.String() +} + +// getEthTypeForJSON converts a JSON type to an Ethereum type. +// It returns an empty string for Objects, Arrays, or Null. +// See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md for more. +func getEthTypeForJSON(json gjson.Result) string { + switch json.Type { + case gjson.True, gjson.False: + return ethBool + case gjson.Number: + return ethInt64 + case gjson.String: + return ethString + case gjson.JSON: + // Array or Object type + return "" + default: + return "" + } +} + +// doRecover attempts to recover in the event of a panic to +// prevent DOS and gracefully handle an error instead. +func doRecover(err *error) { + if r := recover(); r != nil { + if e, ok := r.(error); ok { + e = errorsmod.Wrap(e, "panicked with error") + *err = e + return + } + + *err = fmt.Errorf("%v", r) + } +} diff --git a/legacy/types/account.pb.go b/legacy/types/account.pb.go index a2614cb..5664327 100644 --- a/legacy/types/account.pb.go +++ b/legacy/types/account.pb.go @@ -5,14 +5,13 @@ package types 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/legacy/types/dynamic_fee.pb.go b/legacy/types/dynamic_fee.pb.go index ce4a7a4..154e3c8 100644 --- a/legacy/types/dynamic_fee.pb.go +++ b/legacy/types/dynamic_fee.pb.go @@ -4,15 +4,14 @@ package types import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "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/legacy/types/indexer.pb.go b/legacy/types/indexer.pb.go index c8e6a0d..b4d1c76 100644 --- a/legacy/types/indexer.pb.go +++ b/legacy/types/indexer.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/legacy/types/web3.pb.go b/legacy/types/web3.pb.go index 2c49432..0e2369a 100644 --- a/legacy/types/web3.pb.go +++ b/legacy/types/web3.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. From 3ca7b30addf334a12d35e0b96a53d5989bfe16e3 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 22 Aug 2025 11:14:20 +0200 Subject: [PATCH 32/66] tmp: migrate evm params --- app/encoding.go | 4 +- app/upgrades.go | 2 + app/upgrades/v9/keepers.go | 6 + app/upgrades/v9/upgrades.go | 108 +- legacy/evm/types/access_list.go | 57 + legacy/evm/types/access_list_test.go | 39 + legacy/evm/types/access_list_tx.go | 252 + legacy/evm/types/access_list_tx_test.go | 168 + legacy/evm/types/call.go | 17 + legacy/evm/types/chain_config.go | 183 + legacy/evm/types/chain_config_test.go | 381 + legacy/evm/types/codec.go | 94 + legacy/evm/types/codec_test.go | 61 + legacy/evm/types/compiled_contract.go | 93 + legacy/evm/types/compiled_contract_test.go | 32 + legacy/evm/types/dynamic_fee_tx.go | 284 + legacy/evm/types/dynamic_fee_tx_test.go | 677 ++ legacy/evm/types/errors.go | 124 + legacy/evm/types/events.go | 26 + legacy/evm/types/events.pb.go | 1265 ++++ legacy/evm/types/evm.pb.go | 4585 +++++++++++++ legacy/evm/types/genesis.go | 51 + legacy/evm/types/genesis.pb.go | 683 ++ legacy/evm/types/genesis_test.go | 225 + legacy/evm/types/interfaces.go | 69 + legacy/evm/types/key.go | 64 + legacy/evm/types/legacy_tx.go | 229 + legacy/evm/types/legacy_tx_test.go | 434 ++ legacy/evm/types/logs.go | 129 + legacy/evm/types/logs_test.go | 201 + legacy/evm/types/msg.go | 377 + legacy/evm/types/msg_test.go | 909 +++ legacy/evm/types/opcodes_hooks.go | 70 + legacy/evm/types/params.go | 300 + legacy/evm/types/params_legacy.go | 36 + legacy/evm/types/params_test.go | 166 + legacy/evm/types/permissions.go | 144 + legacy/evm/types/permissions_test.go | 233 + legacy/evm/types/precompiles.go | 33 + legacy/evm/types/query.go | 31 + legacy/evm/types/query.pb.go | 6102 +++++++++++++++++ legacy/evm/types/query.pb.gw.go | 1178 ++++ legacy/evm/types/storage.go | 68 + legacy/evm/types/storage_test.go | 84 + .../types/testdata/SimpleContractHardhat.json | 37 + legacy/evm/types/tracer.go | 111 + legacy/evm/types/tracer_test.go | 11 + legacy/evm/types/tx.go | 81 + legacy/evm/types/tx.pb.go | 3269 +++++++++ legacy/evm/types/tx.pb.gw.go | 171 + legacy/evm/types/tx_args.go | 250 + legacy/evm/types/tx_args_test.go | 289 + legacy/evm/types/tx_data.go | 82 + legacy/evm/types/tx_data_test.go | 90 + legacy/evm/types/tx_types.go | 20 + legacy/evm/types/utils.go | 129 + legacy/evm/types/utils_test.go | 127 + 57 files changed, 24917 insertions(+), 24 deletions(-) create mode 100644 legacy/evm/types/access_list.go create mode 100644 legacy/evm/types/access_list_test.go create mode 100644 legacy/evm/types/access_list_tx.go create mode 100644 legacy/evm/types/access_list_tx_test.go create mode 100644 legacy/evm/types/call.go create mode 100644 legacy/evm/types/chain_config.go create mode 100644 legacy/evm/types/chain_config_test.go create mode 100644 legacy/evm/types/codec.go create mode 100644 legacy/evm/types/codec_test.go create mode 100644 legacy/evm/types/compiled_contract.go create mode 100644 legacy/evm/types/compiled_contract_test.go create mode 100644 legacy/evm/types/dynamic_fee_tx.go create mode 100644 legacy/evm/types/dynamic_fee_tx_test.go create mode 100644 legacy/evm/types/errors.go create mode 100644 legacy/evm/types/events.go create mode 100644 legacy/evm/types/events.pb.go create mode 100644 legacy/evm/types/evm.pb.go create mode 100644 legacy/evm/types/genesis.go create mode 100644 legacy/evm/types/genesis.pb.go create mode 100644 legacy/evm/types/genesis_test.go create mode 100644 legacy/evm/types/interfaces.go create mode 100644 legacy/evm/types/key.go create mode 100644 legacy/evm/types/legacy_tx.go create mode 100644 legacy/evm/types/legacy_tx_test.go create mode 100644 legacy/evm/types/logs.go create mode 100644 legacy/evm/types/logs_test.go create mode 100644 legacy/evm/types/msg.go create mode 100644 legacy/evm/types/msg_test.go create mode 100644 legacy/evm/types/opcodes_hooks.go create mode 100644 legacy/evm/types/params.go create mode 100644 legacy/evm/types/params_legacy.go create mode 100644 legacy/evm/types/params_test.go create mode 100644 legacy/evm/types/permissions.go create mode 100644 legacy/evm/types/permissions_test.go create mode 100644 legacy/evm/types/precompiles.go create mode 100644 legacy/evm/types/query.go create mode 100644 legacy/evm/types/query.pb.go create mode 100644 legacy/evm/types/query.pb.gw.go create mode 100644 legacy/evm/types/storage.go create mode 100644 legacy/evm/types/storage_test.go create mode 100644 legacy/evm/types/testdata/SimpleContractHardhat.json create mode 100644 legacy/evm/types/tracer.go create mode 100644 legacy/evm/types/tracer_test.go create mode 100644 legacy/evm/types/tx.go create mode 100644 legacy/evm/types/tx.pb.go create mode 100644 legacy/evm/types/tx.pb.gw.go create mode 100644 legacy/evm/types/tx_args.go create mode 100644 legacy/evm/types/tx_args_test.go create mode 100644 legacy/evm/types/tx_data.go create mode 100644 legacy/evm/types/tx_data_test.go create mode 100644 legacy/evm/types/tx_types.go create mode 100644 legacy/evm/types/utils.go create mode 100644 legacy/evm/types/utils_test.go diff --git a/app/encoding.go b/app/encoding.go index b230f42..61301f2 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -51,8 +51,8 @@ func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { }) interfaceRegistry.RegisterImplementations((*authtypes.AccountI)(nil), - &evmtypes.EthAccount{}, - &legacytypes.EthAccount{}, + &evmtypes.EthAccount{}, // cosmos-evm + &legacytypes.EthAccount{}, // evmos (legacy) ) interfaceRegistry.RegisterImplementations((*types2.PubKey)(nil), &evmethsecp256k1.PubKey{}, // cosmos-evm diff --git a/app/upgrades.go b/app/upgrades.go index eac62d4..75c03be 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -48,6 +48,8 @@ func (app *App) setupUpgradeHandlers() { app.mm, app.configurator, app.keys, + app.appCodec, + app.EvmKeeper, app.Erc20Keeper, ), ) diff --git a/app/upgrades/v9/keepers.go b/app/upgrades/v9/keepers.go index dc9b6ef..864921b 100644 --- a/app/upgrades/v9/keepers.go +++ b/app/upgrades/v9/keepers.go @@ -2,6 +2,7 @@ package v9 import ( sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/common" ) @@ -9,3 +10,8 @@ type ERC20Keeper interface { SetDynamicPrecompile(ctx sdk.Context, precompile common.Address) SetNativePrecompile(ctx sdk.Context, precompile common.Address) } + +type EvmKeeper interface { + GetParams(ctx sdk.Context) evmtypes.Params + SetParams(ctx sdk.Context, params evmtypes.Params) error +} diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index f96b242..84de83e 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -2,20 +2,26 @@ package v9 import ( "context" + "errors" + "strconv" storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - erc20types "github.com/cosmos/evm/x/erc20/types" + evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/common" + legacyevmtypes "github.com/xrplevm/node/v9/legacy/evm/types" ) func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, storeKeys map[string]*storetypes.KVStoreKey, + appCodec codec.Codec, + evmKeeper EvmKeeper, erc20Keeper ERC20Keeper, ) upgradetypes.UpgradeHandler { return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { @@ -23,30 +29,88 @@ func CreateUpgradeHandler( logger := ctx.Logger().With("upgrade", UpgradeName) logger.Info("Running v9 upgrade handler...") - // In your upgrade handler - store := ctx.KVStore(storeKeys[erc20types.StoreKey]) - const addressLength = 42 // "0x" + 40 hex characters - - // Migrate dynamic precompiles (IBC tokens, token factory) - if oldData := store.Get([]byte("DynamicPrecompiles")); len(oldData) > 0 { - for i := 0; i < len(oldData); i += addressLength { - address := common.HexToAddress(string(oldData[i : i+addressLength])) - erc20Keeper.SetDynamicPrecompile(ctx, address) - } - store.Delete([]byte("DynamicPrecompiles")) - } - - // Migrate native precompiles - if oldData := store.Get([]byte("NativePrecompiles")); len(oldData) > 0 { - for i := 0; i < len(oldData); i += addressLength { - address := common.HexToAddress(string(oldData[i : i+addressLength])) - erc20Keeper.SetNativePrecompile(ctx, address) - } - store.Delete([]byte("NativePrecompiles")) - } + migrateErc20Module( + ctx, + storeKeys, + erc20Keeper, + ) + migrateEvmModule( + ctx, + storeKeys, + appCodec, + evmKeeper, + ) logger.Info("Finished v9 upgrade handler") return mm.RunMigrations(ctx, configurator, vm) } } + +func migrateEvmModule(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, codec codec.Codec, evmKeeper EvmKeeper) error { + store := ctx.KVStore(keys[evmtypes.StoreKey]) + + legacyBz := store.Get(legacyevmtypes.KeyPrefixParams) + if legacyBz == nil { + return errors.New("legacyBz cannot be nil") + } + var legacyEvmParams legacyevmtypes.Params + + codec.MustUnmarshal(legacyBz, &legacyEvmParams) + + eips := make([]int64, 0, len(legacyEvmParams.ExtraEIPs)) + + for i, extraEIP := range legacyEvmParams.ExtraEIPs { + intEIP, err := strconv.ParseInt(extraEIP, 10, 64) + if err != nil { + return err + } + eips[i] = intEIP + } + + accessControl := evmtypes.AccessControl{ + Create: evmtypes.AccessControlType{ + AccessType: evmtypes.AccessType(legacyEvmParams.AccessControl.Create.AccessType), + AccessControlList: legacyEvmParams.AccessControl.Create.AccessControlList, + }, + Call: evmtypes.AccessControlType{ + AccessType: evmtypes.AccessType(legacyEvmParams.AccessControl.Call.AccessType), + AccessControlList: legacyEvmParams.AccessControl.Call.AccessControlList, + }, + } + + params := evmtypes.Params{ + EvmDenom: legacyEvmParams.EvmDenom, + ExtraEIPs: eips, + AllowUnprotectedTxs: legacyEvmParams.AllowUnprotectedTxs, + EVMChannels: legacyEvmParams.EVMChannels, + AccessControl: accessControl, + ActiveStaticPrecompiles: legacyEvmParams.ActiveStaticPrecompiles, + } + + return evmKeeper.SetParams(ctx, params) +} + +func migrateErc20Module(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, keeper ERC20Keeper) { + // In your upgrade handler + store := ctx.KVStore(keys[erc20types.StoreKey]) + const addressLength = 42 // "0x" + 40 hex characters + + // Migrate dynamic precompiles (IBC tokens, token factory) + if oldData := store.Get([]byte("DynamicPrecompiles")); len(oldData) > 0 { + for i := 0; i < len(oldData); i += addressLength { + address := common.HexToAddress(string(oldData[i : i+addressLength])) + keeper.SetDynamicPrecompile(ctx, address) + } + store.Delete([]byte("DynamicPrecompiles")) + } + + // Migrate native precompiles + if oldData := store.Get([]byte("NativePrecompiles")); len(oldData) > 0 { + for i := 0; i < len(oldData); i += addressLength { + address := common.HexToAddress(string(oldData[i : i+addressLength])) + keeper.SetNativePrecompile(ctx, address) + } + store.Delete([]byte("NativePrecompiles")) + } +} diff --git a/legacy/evm/types/access_list.go b/legacy/evm/types/access_list.go new file mode 100644 index 0000000..50de8b2 --- /dev/null +++ b/legacy/evm/types/access_list.go @@ -0,0 +1,57 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" +) + +// AccessList is an EIP-2930 access list that represents the slice of +// the protobuf AccessTuples. +type AccessList []AccessTuple + +// NewAccessList creates a new protobuf-compatible AccessList from an ethereum +// core AccessList type +func NewAccessList(ethAccessList *ethtypes.AccessList) AccessList { + if ethAccessList == nil { + return nil + } + + al := AccessList{} + for _, tuple := range *ethAccessList { + storageKeys := make([]string, len(tuple.StorageKeys)) + + for i := range tuple.StorageKeys { + storageKeys[i] = tuple.StorageKeys[i].String() + } + + al = append(al, AccessTuple{ + Address: tuple.Address.String(), + StorageKeys: storageKeys, + }) + } + + return al +} + +// ToEthAccessList is an utility function to convert the protobuf compatible +// AccessList to eth core AccessList from go-ethereum +func (al AccessList) ToEthAccessList() *ethtypes.AccessList { + var ethAccessList ethtypes.AccessList + + for _, tuple := range al { + storageKeys := make([]common.Hash, len(tuple.StorageKeys)) + + for i := range tuple.StorageKeys { + storageKeys[i] = common.HexToHash(tuple.StorageKeys[i]) + } + + ethAccessList = append(ethAccessList, ethtypes.AccessTuple{ + Address: common.HexToAddress(tuple.Address), + StorageKeys: storageKeys, + }) + } + + return ðAccessList +} diff --git a/legacy/evm/types/access_list_test.go b/legacy/evm/types/access_list_test.go new file mode 100644 index 0000000..10e9153 --- /dev/null +++ b/legacy/evm/types/access_list_test.go @@ -0,0 +1,39 @@ +package types_test + +import ( + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/evmos/evmos/v20/x/evm/types" +) + +func (suite *TxDataTestSuite) TestTestNewAccessList() { + testCases := []struct { + name string + ethAccessList *ethtypes.AccessList + expAl types.AccessList + }{ + { + "ethAccessList is nil", + nil, + nil, + }, + { + "non-empty ethAccessList", + ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + types.AccessList{{Address: suite.hexAddr, StorageKeys: []string{common.Hash{}.Hex()}}}, + }, + } + for _, tc := range testCases { + al := types.NewAccessList(tc.ethAccessList) + + suite.Require().Equal(tc.expAl, al) + } +} + +func (suite *TxDataTestSuite) TestAccessListToEthAccessList() { + ethAccessList := ethtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}} + al := types.NewAccessList(ðAccessList) + actual := al.ToEthAccessList() + + suite.Require().Equal(ðAccessList, actual) +} diff --git a/legacy/evm/types/access_list_tx.go b/legacy/evm/types/access_list_tx.go new file mode 100644 index 0000000..8a01265 --- /dev/null +++ b/legacy/evm/types/access_list_tx.go @@ -0,0 +1,252 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math/big" + + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/evmos/evmos/v20/types" + ethutils "github.com/evmos/evmos/v20/utils/eth" +) + +func newAccessListTx(tx *ethtypes.Transaction) (*AccessListTx, error) { + txData := &AccessListTx{ + Nonce: tx.Nonce(), + Data: tx.Data(), + GasLimit: tx.Gas(), + } + + v, r, s := tx.RawSignatureValues() + if to := tx.To(); to != nil { + txData.To = to.Hex() + } + + if tx.Value() != nil { + amountInt, err := types.SafeNewIntFromBigInt(tx.Value()) + if err != nil { + return nil, err + } + txData.Amount = &amountInt + } + + if tx.GasPrice() != nil { + gasPriceInt, err := types.SafeNewIntFromBigInt(tx.GasPrice()) + if err != nil { + return nil, err + } + txData.GasPrice = &gasPriceInt + } + + if tx.AccessList() != nil { + al := tx.AccessList() + txData.Accesses = NewAccessList(&al) + } + + txData.SetSignatureValues(tx.ChainId(), v, r, s) + return txData, nil +} + +// TxType returns the tx type +func (tx *AccessListTx) TxType() uint8 { + return ethtypes.AccessListTxType +} + +// Copy returns an instance with the same field values +func (tx *AccessListTx) Copy() TxData { + return &AccessListTx{ + ChainID: tx.ChainID, + Nonce: tx.Nonce, + GasPrice: tx.GasPrice, + GasLimit: tx.GasLimit, + To: tx.To, + Amount: tx.Amount, + Data: common.CopyBytes(tx.Data), + Accesses: tx.Accesses, + V: common.CopyBytes(tx.V), + R: common.CopyBytes(tx.R), + S: common.CopyBytes(tx.S), + } +} + +// GetChainID returns the chain id field from the AccessListTx +func (tx *AccessListTx) GetChainID() *big.Int { + if tx.ChainID == nil { + return nil + } + + return tx.ChainID.BigInt() +} + +// GetAccessList returns the AccessList field. +func (tx *AccessListTx) GetAccessList() ethtypes.AccessList { + if tx.Accesses == nil { + return nil + } + return *tx.Accesses.ToEthAccessList() +} + +// GetData returns the a copy of the input data bytes. +func (tx *AccessListTx) GetData() []byte { + return common.CopyBytes(tx.Data) +} + +// GetGas returns the gas limit. +func (tx *AccessListTx) GetGas() uint64 { + return tx.GasLimit +} + +// GetGasPrice returns the gas price field. +func (tx *AccessListTx) GetGasPrice() *big.Int { + if tx.GasPrice == nil { + return nil + } + return tx.GasPrice.BigInt() +} + +// GetGasTipCap returns the gas price field. +func (tx *AccessListTx) GetGasTipCap() *big.Int { + return tx.GetGasPrice() +} + +// GetGasFeeCap returns the gas price field. +func (tx *AccessListTx) GetGasFeeCap() *big.Int { + return tx.GetGasPrice() +} + +// GetValue returns the tx amount. +func (tx *AccessListTx) GetValue() *big.Int { + if tx.Amount == nil { + return nil + } + + return tx.Amount.BigInt() +} + +// GetNonce returns the account sequence for the transaction. +func (tx *AccessListTx) GetNonce() uint64 { return tx.Nonce } + +// GetTo returns the pointer to the recipient address. +func (tx *AccessListTx) GetTo() *common.Address { + if tx.To == "" { + return nil + } + to := common.HexToAddress(tx.To) + return &to +} + +// AsEthereumData returns an AccessListTx transaction tx from the proto-formatted +// TxData defined on the Cosmos EVM. +func (tx *AccessListTx) AsEthereumData() ethtypes.TxData { + v, r, s := tx.GetRawSignatureValues() + return ðtypes.AccessListTx{ + ChainID: tx.GetChainID(), + Nonce: tx.GetNonce(), + GasPrice: tx.GetGasPrice(), + Gas: tx.GetGas(), + To: tx.GetTo(), + Value: 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) +} + +// SetSignatureValues sets the signature values to the transaction. +func (tx *AccessListTx) SetSignatureValues(chainID, v, r, s *big.Int) { + if v != nil { + tx.V = v.Bytes() + } + if r != nil { + tx.R = r.Bytes() + } + if s != nil { + tx.S = s.Bytes() + } + if chainID != nil { + chainIDInt := sdkmath.NewIntFromBigInt(chainID) + tx.ChainID = &chainIDInt + } +} + +// Validate performs a stateless validation of the tx fields. +func (tx AccessListTx) Validate() error { + gasPrice := tx.GetGasPrice() + if gasPrice == nil { + return errorsmod.Wrap(ErrInvalidGasPrice, "cannot be nil") + } + if !types.IsValidInt256(gasPrice) { + return errorsmod.Wrap(ErrInvalidGasPrice, "out of bound") + } + + if gasPrice.Sign() == -1 { + return errorsmod.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice) + } + + amount := tx.GetValue() + // Amount can be 0 + if amount != nil && amount.Sign() == -1 { + return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount) + } + if !types.IsValidInt256(amount) { + return errorsmod.Wrap(ErrInvalidAmount, "out of bound") + } + + if !types.IsValidInt256(tx.Fee()) { + return errorsmod.Wrap(ErrInvalidGasFee, "out of bound") + } + + if tx.To != "" { + if err := types.ValidateAddress(tx.To); err != nil { + return errorsmod.Wrap(err, "invalid to address") + } + } + + if tx.GetChainID() == nil { + return errorsmod.Wrap( + errortypes.ErrInvalidChainID, + "chain ID must be present on AccessList txs", + ) + } + + return nil +} + +// Fee returns gasprice * gaslimit. +func (tx AccessListTx) Fee() *big.Int { + return fee(tx.GetGasPrice(), tx.GetGas()) +} + +// Cost returns amount + gasprice * gaslimit. +func (tx AccessListTx) Cost() *big.Int { + return cost(tx.Fee(), tx.GetValue()) +} + +// EffectiveGasPrice is the same as GasPrice for AccessListTx +func (tx AccessListTx) EffectiveGasPrice(_ *big.Int) *big.Int { + return tx.GetGasPrice() +} + +// EffectiveFee is the same as Fee for AccessListTx +func (tx AccessListTx) EffectiveFee(_ *big.Int) *big.Int { + return tx.Fee() +} + +// EffectiveCost is the same as Cost for AccessListTx +func (tx AccessListTx) EffectiveCost(_ *big.Int) *big.Int { + return tx.Cost() +} diff --git a/legacy/evm/types/access_list_tx_test.go b/legacy/evm/types/access_list_tx_test.go new file mode 100644 index 0000000..2cbe60c --- /dev/null +++ b/legacy/evm/types/access_list_tx_test.go @@ -0,0 +1,168 @@ +package types_test + +import ( + "math/big" + + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/evmos/evmos/v20/x/evm/types" +) + +func (suite *TxDataTestSuite) TestAccessListTxCopy() { + tx := &types.AccessListTx{} + txCopy := tx.Copy() + + suite.Require().Equal(&types.AccessListTx{}, txCopy) +} + +func (suite *TxDataTestSuite) TestAccessListTxGetGasTipCap() { + testCases := []struct { + name string + tx types.AccessListTx + exp *big.Int + }{ + { + "non-empty gasPrice", + types.AccessListTx{ + GasPrice: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasTipCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestAccessListTxGetGasFeeCap() { + testCases := []struct { + name string + tx types.AccessListTx + exp *big.Int + }{ + { + "non-empty gasPrice", + types.AccessListTx{ + GasPrice: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasFeeCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestEmptyAccessList() { + testCases := []struct { + name string + tx types.AccessListTx + }{ + { + "empty access list tx", + types.AccessListTx{ + Accesses: nil, + }, + }, + } + for _, tc := range testCases { + actual := tc.tx.GetAccessList() + + suite.Require().Nil(actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestAccessListTxCost() { + testCases := []struct { + name string + tx types.AccessListTx + exp *big.Int + }{ + { + "non-empty access list tx", + types.AccessListTx{ + GasPrice: &suite.sdkInt, + GasLimit: uint64(1), + Amount: &suite.sdkZeroInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.Cost() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestAccessListEffectiveGasPrice() { + testCases := []struct { + name string + tx types.AccessListTx + baseFee *big.Int + }{ + { + "non-empty access list tx", + types.AccessListTx{ + GasPrice: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveGasPrice(tc.baseFee) + + suite.Require().Equal(tc.tx.GetGasPrice(), actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestAccessListTxEffectiveCost() { + testCases := []struct { + name string + tx types.AccessListTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty access list tx", + types.AccessListTx{ + GasPrice: &suite.sdkInt, + GasLimit: uint64(1), + Amount: &suite.sdkZeroInt, + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveCost(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestAccessListTxType() { + testCases := []struct { + name string + tx types.AccessListTx + }{ + { + "non-empty access list tx", + types.AccessListTx{}, + }, + } + + for _, tc := range testCases { + actual := tc.tx.TxType() + + suite.Require().Equal(uint8(ethtypes.AccessListTxType), actual, tc.name) + } +} diff --git a/legacy/evm/types/call.go b/legacy/evm/types/call.go new file mode 100644 index 0000000..53fa089 --- /dev/null +++ b/legacy/evm/types/call.go @@ -0,0 +1,17 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +type CallType int + +const ( + // RPC call type is used on requests to eth_estimateGas rpc API endpoint + RPC CallType = iota + 1 + // Internal call type is used in case of smart contract methods calls + Internal +) + +// MaxPrecompileCalls is the maximum number of precompile +// calls within a transaction. We want to limit this because +// for each precompile tx we're creating a cached context +const MaxPrecompileCalls uint8 = 7 diff --git a/legacy/evm/types/chain_config.go b/legacy/evm/types/chain_config.go new file mode 100644 index 0000000..1708c2c --- /dev/null +++ b/legacy/evm/types/chain_config.go @@ -0,0 +1,183 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math/big" + "strings" + + sdkmath "cosmossdk.io/math" + + errorsmod "cosmossdk.io/errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/params" +) + +// EthereumConfig returns an Ethereum ChainConfig for EVM state transitions. +// All the negative or nil values are converted to nil +func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig { + return ¶ms.ChainConfig{ + ChainID: chainID, + HomesteadBlock: getBlockValue(cc.HomesteadBlock), + DAOForkBlock: getBlockValue(cc.DAOForkBlock), + DAOForkSupport: cc.DAOForkSupport, + EIP150Block: getBlockValue(cc.EIP150Block), + EIP150Hash: common.HexToHash(cc.EIP150Hash), + EIP155Block: getBlockValue(cc.EIP155Block), + EIP158Block: getBlockValue(cc.EIP158Block), + ByzantiumBlock: getBlockValue(cc.ByzantiumBlock), + ConstantinopleBlock: getBlockValue(cc.ConstantinopleBlock), + PetersburgBlock: getBlockValue(cc.PetersburgBlock), + IstanbulBlock: getBlockValue(cc.IstanbulBlock), + MuirGlacierBlock: getBlockValue(cc.MuirGlacierBlock), + BerlinBlock: getBlockValue(cc.BerlinBlock), + LondonBlock: getBlockValue(cc.LondonBlock), + ArrowGlacierBlock: getBlockValue(cc.ArrowGlacierBlock), + GrayGlacierBlock: getBlockValue(cc.GrayGlacierBlock), + MergeNetsplitBlock: getBlockValue(cc.MergeNetsplitBlock), + ShanghaiBlock: getBlockValue(cc.ShanghaiBlock), + CancunBlock: getBlockValue(cc.CancunBlock), + TerminalTotalDifficulty: nil, + Ethash: nil, + Clique: nil, + } +} + +// DefaultChainConfig returns default evm parameters. +func DefaultChainConfig() ChainConfig { + homesteadBlock := sdkmath.ZeroInt() + daoForkBlock := sdkmath.ZeroInt() + eip150Block := sdkmath.ZeroInt() + eip155Block := sdkmath.ZeroInt() + eip158Block := sdkmath.ZeroInt() + byzantiumBlock := sdkmath.ZeroInt() + constantinopleBlock := sdkmath.ZeroInt() + petersburgBlock := sdkmath.ZeroInt() + istanbulBlock := sdkmath.ZeroInt() + muirGlacierBlock := sdkmath.ZeroInt() + berlinBlock := sdkmath.ZeroInt() + londonBlock := sdkmath.ZeroInt() + arrowGlacierBlock := sdkmath.ZeroInt() + grayGlacierBlock := sdkmath.ZeroInt() + mergeNetsplitBlock := sdkmath.ZeroInt() + shanghaiBlock := sdkmath.ZeroInt() + cancunBlock := sdkmath.ZeroInt() + + return ChainConfig{ + HomesteadBlock: &homesteadBlock, + DAOForkBlock: &daoForkBlock, + DAOForkSupport: true, + EIP150Block: &eip150Block, + EIP150Hash: common.Hash{}.String(), + EIP155Block: &eip155Block, + EIP158Block: &eip158Block, + ByzantiumBlock: &byzantiumBlock, + ConstantinopleBlock: &constantinopleBlock, + PetersburgBlock: &petersburgBlock, + IstanbulBlock: &istanbulBlock, + MuirGlacierBlock: &muirGlacierBlock, + BerlinBlock: &berlinBlock, + LondonBlock: &londonBlock, + ArrowGlacierBlock: &arrowGlacierBlock, + GrayGlacierBlock: &grayGlacierBlock, + MergeNetsplitBlock: &mergeNetsplitBlock, + ShanghaiBlock: &shanghaiBlock, + CancunBlock: &cancunBlock, + } +} + +func getBlockValue(block *sdkmath.Int) *big.Int { + if block == nil || block.IsNegative() { + return nil + } + + return block.BigInt() +} + +// Validate performs a basic validation of the ChainConfig params. The function will return an error +// if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash. +func (cc ChainConfig) Validate() error { + if err := validateBlock(cc.HomesteadBlock); err != nil { + return errorsmod.Wrap(err, "homesteadBlock") + } + if err := validateBlock(cc.DAOForkBlock); err != nil { + return errorsmod.Wrap(err, "daoForkBlock") + } + if err := validateBlock(cc.EIP150Block); err != nil { + return errorsmod.Wrap(err, "eip150Block") + } + if err := validateHash(cc.EIP150Hash); err != nil { + return err + } + if err := validateBlock(cc.EIP155Block); err != nil { + return errorsmod.Wrap(err, "eip155Block") + } + if err := validateBlock(cc.EIP158Block); err != nil { + return errorsmod.Wrap(err, "eip158Block") + } + if err := validateBlock(cc.ByzantiumBlock); err != nil { + return errorsmod.Wrap(err, "byzantiumBlock") + } + if err := validateBlock(cc.ConstantinopleBlock); err != nil { + return errorsmod.Wrap(err, "constantinopleBlock") + } + if err := validateBlock(cc.PetersburgBlock); err != nil { + return errorsmod.Wrap(err, "petersburgBlock") + } + if err := validateBlock(cc.IstanbulBlock); err != nil { + return errorsmod.Wrap(err, "istanbulBlock") + } + if err := validateBlock(cc.MuirGlacierBlock); err != nil { + return errorsmod.Wrap(err, "muirGlacierBlock") + } + if err := validateBlock(cc.BerlinBlock); err != nil { + return errorsmod.Wrap(err, "berlinBlock") + } + if err := validateBlock(cc.LondonBlock); err != nil { + return errorsmod.Wrap(err, "londonBlock") + } + if err := validateBlock(cc.ArrowGlacierBlock); err != nil { + return errorsmod.Wrap(err, "arrowGlacierBlock") + } + if err := validateBlock(cc.GrayGlacierBlock); err != nil { + return errorsmod.Wrap(err, "GrayGlacierBlock") + } + if err := validateBlock(cc.MergeNetsplitBlock); err != nil { + return errorsmod.Wrap(err, "MergeNetsplitBlock") + } + if err := validateBlock(cc.ShanghaiBlock); err != nil { + return errorsmod.Wrap(err, "ShanghaiBlock") + } + if err := validateBlock(cc.CancunBlock); err != nil { + return errorsmod.Wrap(err, "CancunBlock") + } + // NOTE: chain ID is not needed to check config order + if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil { + return errorsmod.Wrap(err, "invalid config fork order") + } + return nil +} + +func validateHash(hex string) error { + if hex != "" && strings.TrimSpace(hex) == "" { + return errorsmod.Wrap(ErrInvalidChainConfig, "hash cannot be blank") + } + + return nil +} + +func validateBlock(block *sdkmath.Int) error { + // nil value means that the fork has not yet been applied + if block == nil { + return nil + } + + if block.IsNegative() { + return errorsmod.Wrapf( + ErrInvalidChainConfig, "block value cannot be negative: %s", block, + ) + } + + return nil +} diff --git a/legacy/evm/types/chain_config_test.go b/legacy/evm/types/chain_config_test.go new file mode 100644 index 0000000..5045701 --- /dev/null +++ b/legacy/evm/types/chain_config_test.go @@ -0,0 +1,381 @@ +package types + +import ( + "testing" + + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/common" +) + +var defaultEIP150Hash = common.Hash{}.String() + +func newIntPtr(i int64) *sdkmath.Int { + v := sdkmath.NewInt(i) + return &v +} + +func TestChainConfigValidate(t *testing.T) { + testCases := []struct { + name string + config ChainConfig + expError bool + }{ + {"default", DefaultChainConfig(), false}, + { + "valid", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(0), + CancunBlock: newIntPtr(0), + ShanghaiBlock: newIntPtr(0), + }, + false, + }, + { + "valid with nil values", + ChainConfig{ + HomesteadBlock: nil, + DAOForkBlock: nil, + EIP150Block: nil, + EIP150Hash: defaultEIP150Hash, + EIP155Block: nil, + EIP158Block: nil, + ByzantiumBlock: nil, + ConstantinopleBlock: nil, + PetersburgBlock: nil, + IstanbulBlock: nil, + MuirGlacierBlock: nil, + BerlinBlock: nil, + LondonBlock: nil, + CancunBlock: nil, + ShanghaiBlock: nil, + }, + false, + }, + { + "empty", + ChainConfig{}, + false, + }, + { + "invalid HomesteadBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid DAOForkBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid EIP150Block", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(-1), + }, + true, + }, + { + "invalid EIP150Hash", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: " ", + }, + true, + }, + { + "invalid EIP155Block", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(-1), + }, + true, + }, + { + "invalid EIP158Block", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(-1), + }, + true, + }, + { + "invalid ByzantiumBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid ConstantinopleBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid PetersburgBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid IstanbulBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid MuirGlacierBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid BerlinBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid LondonBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid ArrowGlacierBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(0), + ArrowGlacierBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid GrayGlacierBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(0), + ArrowGlacierBlock: newIntPtr(0), + GrayGlacierBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid MergeNetsplitBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(0), + ArrowGlacierBlock: newIntPtr(0), + GrayGlacierBlock: newIntPtr(0), + MergeNetsplitBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid fork order - skip HomesteadBlock", + ChainConfig{ + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(0), + }, + true, + }, + { + "invalid ShanghaiBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(0), + ArrowGlacierBlock: newIntPtr(0), + GrayGlacierBlock: newIntPtr(0), + MergeNetsplitBlock: newIntPtr(0), + ShanghaiBlock: newIntPtr(-1), + }, + true, + }, + { + "invalid CancunBlock", + ChainConfig{ + HomesteadBlock: newIntPtr(0), + DAOForkBlock: newIntPtr(0), + EIP150Block: newIntPtr(0), + EIP150Hash: defaultEIP150Hash, + EIP155Block: newIntPtr(0), + EIP158Block: newIntPtr(0), + ByzantiumBlock: newIntPtr(0), + ConstantinopleBlock: newIntPtr(0), + PetersburgBlock: newIntPtr(0), + IstanbulBlock: newIntPtr(0), + MuirGlacierBlock: newIntPtr(0), + BerlinBlock: newIntPtr(0), + LondonBlock: newIntPtr(0), + ArrowGlacierBlock: newIntPtr(0), + GrayGlacierBlock: newIntPtr(0), + MergeNetsplitBlock: newIntPtr(0), + ShanghaiBlock: newIntPtr(0), + CancunBlock: newIntPtr(-1), + }, + true, + }, + } + + for _, tc := range testCases { + err := tc.config.Validate() + + if tc.expError { + require.Error(t, err, tc.name) + } else { + require.NoError(t, err, tc.name) + } + } +} diff --git a/legacy/evm/types/codec.go b/legacy/evm/types/codec.go new file mode 100644 index 0000000..dd097d4 --- /dev/null +++ b/legacy/evm/types/codec.go @@ -0,0 +1,94 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/cosmos/cosmos-sdk/types/tx" + proto "github.com/cosmos/gogoproto/proto" +) + +var ( + amino = codec.NewLegacyAmino() + // ModuleCdc references the global evm module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding. + ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) + + // AminoCdc is a amino codec created to support amino JSON compatible msgs. + AminoCdc = codec.NewAminoCodec(amino) //nolint:staticcheck +) + +const ( + // Amino names + updateParamsName = "ethermint/MsgUpdateParams" +) + +// NOTE: This is required for the GetSignBytes function +func init() { + RegisterLegacyAminoCodec(amino) + amino.Seal() +} + +// RegisterInterfaces registers the client interfaces to protobuf Any. +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*tx.TxExtensionOptionI)(nil), + &ExtensionOptionsEthereumTx{}, + ) + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgEthereumTx{}, + &MsgUpdateParams{}, + ) + registry.RegisterInterface( + "ethermint.evm.v1.TxData", + (*TxData)(nil), + &DynamicFeeTx{}, + &AccessListTx{}, + &LegacyTx{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +// PackTxData constructs a new Any packed with the given tx data value. It returns +// an error if the client state can't be casted to a protobuf message or if the concrete +// implementation is not registered to the protobuf codec. +func PackTxData(txData TxData) (*codectypes.Any, error) { + msg, ok := txData.(proto.Message) + if !ok { + return nil, errorsmod.Wrapf(errortypes.ErrPackAny, "cannot proto marshal %T", txData) + } + + anyTxData, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return nil, errorsmod.Wrap(errortypes.ErrPackAny, err.Error()) + } + + return anyTxData, nil +} + +// UnpackTxData unpacks an Any into a TxData. It returns an error if the +// client state can't be unpacked into a TxData. +func UnpackTxData(any *codectypes.Any) (TxData, error) { + if any == nil { + return nil, errorsmod.Wrap(errortypes.ErrUnpackAny, "protobuf Any message cannot be nil") + } + + txData, ok := any.GetCachedValue().(TxData) + if !ok { + return nil, errorsmod.Wrapf(errortypes.ErrUnpackAny, "cannot unpack Any into TxData %T", any) + } + + return txData, nil +} + +// RegisterLegacyAminoCodec required for EIP-712 +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgUpdateParams{}, updateParamsName, nil) +} diff --git a/legacy/evm/types/codec_test.go b/legacy/evm/types/codec_test.go new file mode 100644 index 0000000..7121f5b --- /dev/null +++ b/legacy/evm/types/codec_test.go @@ -0,0 +1,61 @@ +package types + +import ( + "testing" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/stretchr/testify/require" +) + +type caseAny struct { + name string + any *codectypes.Any + expPass bool +} + +func TestPackTxData(t *testing.T) { + testCases := []struct { + name string + txData TxData + expPass bool + }{ + { + "access list tx", + &AccessListTx{}, + true, + }, + { + "legacy tx", + &LegacyTx{}, + true, + }, + { + "nil", + nil, + false, + }, + } + + testCasesAny := []caseAny{} + + for _, tc := range testCases { + txDataAny, err := PackTxData(tc.txData) + if tc.expPass { + require.NoError(t, err, tc.name) + } else { + require.Error(t, err, tc.name) + } + + testCasesAny = append(testCasesAny, caseAny{tc.name, txDataAny, tc.expPass}) + } + + for i, tc := range testCasesAny { + cs, err := UnpackTxData(tc.any) + if tc.expPass { + require.NoError(t, err, tc.name) + require.Equal(t, testCases[i].txData, cs, tc.name) + } else { + require.Error(t, err, tc.name) + } + } +} diff --git a/legacy/evm/types/compiled_contract.go b/legacy/evm/types/compiled_contract.go new file mode 100644 index 0000000..e36c1a7 --- /dev/null +++ b/legacy/evm/types/compiled_contract.go @@ -0,0 +1,93 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package types + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "strings" + + "github.com/ethereum/go-ethereum/accounts/abi" +) + +// HexString is a byte array that serializes to hex +type HexString []byte + +// MarshalJSON serializes ByteArray to hex +func (s HexString) MarshalJSON() ([]byte, error) { + return json.Marshal(fmt.Sprintf("%x", string(s))) +} + +// UnmarshalJSON deserializes ByteArray to hex +func (s *HexString) UnmarshalJSON(data []byte) error { + var x string + if err := json.Unmarshal(data, &x); err != nil { + return err + } + str, err := hex.DecodeString(x) + if err != nil { + return err + } + *s = str + return nil +} + +// CompiledContract contains compiled bytecode and abi +type CompiledContract struct { + ABI abi.ABI + Bin HexString +} + +type jsonCompiledContract struct { + ABI string + Bin HexString +} + +// MarshalJSON serializes ByteArray to hex +func (s CompiledContract) MarshalJSON() ([]byte, error) { + abi1, err := json.Marshal(s.ABI) + if err != nil { + return nil, err + } + return json.Marshal(jsonCompiledContract{ABI: string(abi1), Bin: s.Bin}) +} + +// UnmarshalJSON deserializes ByteArray to hex +func (s *CompiledContract) UnmarshalJSON(data []byte) error { + var x jsonCompiledContract + if err := json.Unmarshal(data, &x); err != nil { + return err + } + + s.Bin = x.Bin + if err := json.Unmarshal([]byte(x.ABI), &s.ABI); err != nil { + return fmt.Errorf("failed to unmarshal ABI: %w", err) + } + + return nil +} + +// HardhatCompiledContract is a type used to unpack the compiled JSON data +// which is generated by running `npx hardhat compile` for a given smart contract. +type HardhatCompiledContract struct { + Format string `json:"_format"` + ContractName string `json:"contractName"` + SourceName string `json:"sourceName"` + ABI abi.ABI `json:"abi"` + Bytecode string `json:"bytecode"` +} + +func (c HardhatCompiledContract) ToCompiledContract() (CompiledContract, error) { + strippedHex := strings.TrimPrefix(c.Bytecode, "0x") + hexBytes, err := hex.DecodeString(strippedHex) + if err != nil { + return CompiledContract{}, fmt.Errorf("failed to decode hex string: %w", err) + } + + return CompiledContract{ + ABI: c.ABI, + Bin: hexBytes, + }, nil +} diff --git a/legacy/evm/types/compiled_contract_test.go b/legacy/evm/types/compiled_contract_test.go new file mode 100644 index 0000000..e912e2b --- /dev/null +++ b/legacy/evm/types/compiled_contract_test.go @@ -0,0 +1,32 @@ +package types_test + +import ( + "encoding/json" + "os" + "testing" + + evmtypes "github.com/evmos/evmos/v20/x/evm/types" + "github.com/stretchr/testify/require" +) + +func TestHardhatCompiledContract(t *testing.T) { + contents, err := os.ReadFile("testdata/SimpleContractHardhat.json") + require.NoError(t, err, "failed to read file") + require.NotEmpty(t, contents, "expected contents not to be empty") + + var hardhatContract evmtypes.HardhatCompiledContract + err = json.Unmarshal(contents, &hardhatContract) + require.NoError(t, err, "failed to unmarshal contract") + + require.Equal(t, hardhatContract.ContractName, "SimpleContract") + require.Contains(t, + hardhatContract.ABI.Methods, + "setValue", + "missing setValue method in contract ABI methods", + ) + + compiledContract, err := hardhatContract.ToCompiledContract() + require.NoError(t, err, "failed to convert hardhat contract to compiled contract type") + require.Equal(t, compiledContract.ABI, hardhatContract.ABI, "expected ABIs to be equal") + require.NotEmpty(t, compiledContract.Bin, "expected bin data not to be empty") +} diff --git a/legacy/evm/types/dynamic_fee_tx.go b/legacy/evm/types/dynamic_fee_tx.go new file mode 100644 index 0000000..bd7500c --- /dev/null +++ b/legacy/evm/types/dynamic_fee_tx.go @@ -0,0 +1,284 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math/big" + + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/evmos/evmos/v20/types" + ethutils "github.com/evmos/evmos/v20/utils/eth" +) + +func NewDynamicFeeTx(tx *ethtypes.Transaction) (*DynamicFeeTx, error) { + txData := &DynamicFeeTx{ + Nonce: tx.Nonce(), + Data: tx.Data(), + GasLimit: tx.Gas(), + } + + v, r, s := tx.RawSignatureValues() + if to := tx.To(); to != nil { + txData.To = to.Hex() + } + + if tx.Value() != nil { + amountInt, err := types.SafeNewIntFromBigInt(tx.Value()) + if err != nil { + return nil, err + } + txData.Amount = &amountInt + } + + if tx.GasFeeCap() != nil { + gasFeeCapInt, err := types.SafeNewIntFromBigInt(tx.GasFeeCap()) + if err != nil { + return nil, err + } + txData.GasFeeCap = &gasFeeCapInt + } + + if tx.GasTipCap() != nil { + gasTipCapInt, err := types.SafeNewIntFromBigInt(tx.GasTipCap()) + if err != nil { + return nil, err + } + txData.GasTipCap = &gasTipCapInt + } + + if tx.AccessList() != nil { + al := tx.AccessList() + txData.Accesses = NewAccessList(&al) + } + + txData.SetSignatureValues(tx.ChainId(), v, r, s) + return txData, nil +} + +// TxType returns the tx type +func (tx *DynamicFeeTx) TxType() uint8 { + return ethtypes.DynamicFeeTxType +} + +// Copy returns an instance with the same field values +func (tx *DynamicFeeTx) Copy() TxData { + return &DynamicFeeTx{ + ChainID: tx.ChainID, + Nonce: tx.Nonce, + GasTipCap: tx.GasTipCap, + GasFeeCap: tx.GasFeeCap, + GasLimit: tx.GasLimit, + To: tx.To, + Amount: tx.Amount, + Data: common.CopyBytes(tx.Data), + Accesses: tx.Accesses, + V: common.CopyBytes(tx.V), + R: common.CopyBytes(tx.R), + S: common.CopyBytes(tx.S), + } +} + +// GetChainID returns the chain id field from the DynamicFeeTx +func (tx *DynamicFeeTx) GetChainID() *big.Int { + if tx.ChainID == nil { + return nil + } + + return tx.ChainID.BigInt() +} + +// GetAccessList returns the AccessList field. +func (tx *DynamicFeeTx) GetAccessList() ethtypes.AccessList { + if tx.Accesses == nil { + return nil + } + return *tx.Accesses.ToEthAccessList() +} + +// GetData returns the a copy of the input data bytes. +func (tx *DynamicFeeTx) GetData() []byte { + return common.CopyBytes(tx.Data) +} + +// GetGas returns the gas limit. +func (tx *DynamicFeeTx) GetGas() uint64 { + return tx.GasLimit +} + +// GetGasPrice returns the gas fee cap field. +func (tx *DynamicFeeTx) GetGasPrice() *big.Int { + return tx.GetGasFeeCap() +} + +// GetGasTipCap returns the gas tip cap field. +func (tx *DynamicFeeTx) GetGasTipCap() *big.Int { + if tx.GasTipCap == nil { + return nil + } + return tx.GasTipCap.BigInt() +} + +// GetGasFeeCap returns the gas fee cap field. +func (tx *DynamicFeeTx) GetGasFeeCap() *big.Int { + if tx.GasFeeCap == nil { + return nil + } + return tx.GasFeeCap.BigInt() +} + +// GetValue returns the tx amount. +func (tx *DynamicFeeTx) GetValue() *big.Int { + if tx.Amount == nil { + return nil + } + + return tx.Amount.BigInt() +} + +// GetNonce returns the account sequence for the transaction. +func (tx *DynamicFeeTx) GetNonce() uint64 { return tx.Nonce } + +// GetTo returns the pointer to the recipient address. +func (tx *DynamicFeeTx) GetTo() *common.Address { + if tx.To == "" { + return nil + } + to := common.HexToAddress(tx.To) + return &to +} + +// AsEthereumData returns an DynamicFeeTx transaction tx from the proto-formatted +// TxData defined on the Cosmos EVM. +func (tx *DynamicFeeTx) AsEthereumData() ethtypes.TxData { + v, r, s := tx.GetRawSignatureValues() + return ðtypes.DynamicFeeTx{ + ChainID: tx.GetChainID(), + Nonce: tx.GetNonce(), + GasTipCap: tx.GetGasTipCap(), + GasFeeCap: tx.GetGasFeeCap(), + Gas: tx.GetGas(), + To: tx.GetTo(), + Value: 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 *DynamicFeeTx) GetRawSignatureValues() (v, r, s *big.Int) { + return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) +} + +// SetSignatureValues sets the signature values to the transaction. +func (tx *DynamicFeeTx) SetSignatureValues(chainID, v, r, s *big.Int) { + if v != nil { + tx.V = v.Bytes() + } + if r != nil { + tx.R = r.Bytes() + } + if s != nil { + tx.S = s.Bytes() + } + if chainID != nil { + chainIDInt := sdkmath.NewIntFromBigInt(chainID) + tx.ChainID = &chainIDInt + } +} + +// Validate performs a stateless validation of the tx fields. +func (tx DynamicFeeTx) Validate() error { + if tx.GasTipCap == nil { + return errorsmod.Wrap(ErrInvalidGasCap, "gas tip cap cannot nil") + } + + if tx.GasFeeCap == nil { + return errorsmod.Wrap(ErrInvalidGasCap, "gas fee cap cannot nil") + } + + if tx.GasTipCap.IsNegative() { + return errorsmod.Wrapf(ErrInvalidGasCap, "gas tip cap cannot be negative %s", tx.GasTipCap) + } + + if tx.GasFeeCap.IsNegative() { + return errorsmod.Wrapf(ErrInvalidGasCap, "gas fee cap cannot be negative %s", tx.GasFeeCap) + } + + if !types.IsValidInt256(tx.GetGasTipCap()) { + return errorsmod.Wrap(ErrInvalidGasCap, "out of bound") + } + + if !types.IsValidInt256(tx.GetGasFeeCap()) { + return errorsmod.Wrap(ErrInvalidGasCap, "out of bound") + } + + if tx.GasFeeCap.LT(*tx.GasTipCap) { + return errorsmod.Wrapf( + ErrInvalidGasCap, "max priority fee per gas higher than max fee per gas (%s > %s)", + tx.GasTipCap, tx.GasFeeCap, + ) + } + + if !types.IsValidInt256(tx.Fee()) { + return errorsmod.Wrap(ErrInvalidGasFee, "out of bound") + } + + amount := tx.GetValue() + // Amount can be 0 + if amount != nil && amount.Sign() == -1 { + return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount) + } + if !types.IsValidInt256(amount) { + return errorsmod.Wrap(ErrInvalidAmount, "out of bound") + } + + if tx.To != "" { + if err := types.ValidateAddress(tx.To); err != nil { + return errorsmod.Wrap(err, "invalid to address") + } + } + + if tx.GetChainID() == nil { + return errorsmod.Wrap( + errortypes.ErrInvalidChainID, + "chain ID must be present on DynamicFee txs", + ) + } + + return nil +} + +// Fee returns gasprice * gaslimit. +func (tx DynamicFeeTx) Fee() *big.Int { + return fee(tx.GetGasFeeCap(), tx.GasLimit) +} + +// Cost returns amount + gasprice * gaslimit. +func (tx DynamicFeeTx) Cost() *big.Int { + return cost(tx.Fee(), tx.GetValue()) +} + +// EffectiveGasPrice returns the effective gas price +func (tx *DynamicFeeTx) EffectiveGasPrice(baseFee *big.Int) *big.Int { + return EffectiveGasPrice(baseFee, tx.GasFeeCap.BigInt(), tx.GasTipCap.BigInt()) +} + +// EffectiveFee returns effective_gasprice * gaslimit. +func (tx DynamicFeeTx) EffectiveFee(baseFee *big.Int) *big.Int { + return fee(tx.EffectiveGasPrice(baseFee), tx.GasLimit) +} + +// EffectiveCost returns amount + effective_gasprice * gaslimit. +func (tx DynamicFeeTx) EffectiveCost(baseFee *big.Int) *big.Int { + return cost(tx.EffectiveFee(baseFee), tx.GetValue()) +} diff --git a/legacy/evm/types/dynamic_fee_tx_test.go b/legacy/evm/types/dynamic_fee_tx_test.go new file mode 100644 index 0000000..f713959 --- /dev/null +++ b/legacy/evm/types/dynamic_fee_tx_test.go @@ -0,0 +1,677 @@ +package types_test + +import ( + "math/big" + "testing" + + sdkmath "cosmossdk.io/math" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + utiltx "github.com/evmos/evmos/v20/testutil/tx" + "github.com/evmos/evmos/v20/x/evm/types" + + "github.com/stretchr/testify/suite" +) + +type TxDataTestSuite struct { + suite.Suite + + sdkInt sdkmath.Int + uint64 uint64 + hexUint64 hexutil.Uint64 + bigInt *big.Int + hexBigInt hexutil.Big + overflowBigInt *big.Int + sdkZeroInt sdkmath.Int + sdkMinusOneInt sdkmath.Int + invalidAddr string + addr common.Address + hexAddr string + hexDataBytes hexutil.Bytes + hexInputBytes hexutil.Bytes +} + +func (suite *TxDataTestSuite) SetupTest() { + suite.sdkInt = sdkmath.NewInt(9001) + suite.uint64 = suite.sdkInt.Uint64() + suite.hexUint64 = hexutil.Uint64(100) + suite.bigInt = big.NewInt(1) + suite.hexBigInt = hexutil.Big(*big.NewInt(1)) + suite.overflowBigInt = big.NewInt(0).Exp(big.NewInt(10), big.NewInt(256), nil) + suite.sdkZeroInt = sdkmath.ZeroInt() + suite.sdkMinusOneInt = sdkmath.NewInt(-1) + suite.invalidAddr = "123456" + suite.addr = utiltx.GenerateAddress() + suite.hexAddr = suite.addr.Hex() + suite.hexDataBytes = hexutil.Bytes([]byte("data")) + suite.hexInputBytes = hexutil.Bytes([]byte("input")) +} + +func TestTxDataTestSuite(t *testing.T) { + suite.Run(t, new(TxDataTestSuite)) +} + +func (suite *TxDataTestSuite) TestNewDynamicFeeTx() { + testCases := []struct { + name string + expError bool + tx *ethtypes.Transaction + }{ + { + "non-empty tx", + false, + ethtypes.NewTx(ðtypes.DynamicFeeTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + Value: big.NewInt(1), + AccessList: ethtypes.AccessList{}, + To: &suite.addr, + V: suite.bigInt, + R: suite.bigInt, + S: suite.bigInt, + }), + }, + { + "value out of bounds tx", + true, + ethtypes.NewTx(ðtypes.DynamicFeeTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + Value: suite.overflowBigInt, + AccessList: ethtypes.AccessList{}, + To: &suite.addr, + V: suite.bigInt, + R: suite.bigInt, + S: suite.bigInt, + }), + }, + { + "gas fee cap out of bounds tx", + true, + ethtypes.NewTx(ðtypes.DynamicFeeTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + GasFeeCap: suite.overflowBigInt, + Value: big.NewInt(1), + AccessList: ethtypes.AccessList{}, + To: &suite.addr, + V: suite.bigInt, + R: suite.bigInt, + S: suite.bigInt, + }), + }, + { + "gas tip cap out of bounds tx", + true, + ethtypes.NewTx(ðtypes.DynamicFeeTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + GasTipCap: suite.overflowBigInt, + Value: big.NewInt(1), + AccessList: ethtypes.AccessList{}, + To: &suite.addr, + V: suite.bigInt, + R: suite.bigInt, + S: suite.bigInt, + }), + }, + } + for _, tc := range testCases { + tx, err := types.NewDynamicFeeTx(tc.tx) + + if tc.expError { + suite.Require().Error(err) + } else { + suite.Require().NoError(err) + suite.Require().NotEmpty(tx) + suite.Require().Equal(uint8(2), tx.TxType()) + } + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxAsEthereumData() { + feeConfig := ðtypes.DynamicFeeTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + Value: big.NewInt(1), + AccessList: ethtypes.AccessList{}, + To: &suite.addr, + V: suite.bigInt, + R: suite.bigInt, + S: suite.bigInt, + } + + tx := ethtypes.NewTx(feeConfig) + + dynamicFeeTx, err := types.NewDynamicFeeTx(tx) + suite.Require().NoError(err) + + res := dynamicFeeTx.AsEthereumData() + resTx := ethtypes.NewTx(res) + + suite.Require().Equal(feeConfig.Nonce, resTx.Nonce()) + suite.Require().Equal(feeConfig.Data, resTx.Data()) + suite.Require().Equal(feeConfig.Gas, resTx.Gas()) + suite.Require().Equal(feeConfig.Value, resTx.Value()) + suite.Require().Equal(feeConfig.AccessList, resTx.AccessList()) + suite.Require().Equal(feeConfig.To, resTx.To()) +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxCopy() { + tx := &types.DynamicFeeTx{} + txCopy := tx.Copy() + + suite.Require().Equal(&types.DynamicFeeTx{}, txCopy) + // TODO: Test for different pointers +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetChainID() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp *big.Int + }{ + { + "empty chainID", + types.DynamicFeeTx{ + ChainID: nil, + }, + nil, + }, + { + "non-empty chainID", + types.DynamicFeeTx{ + ChainID: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetChainID() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetAccessList() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp ethtypes.AccessList + }{ + { + "empty accesses", + types.DynamicFeeTx{ + Accesses: nil, + }, + nil, + }, + { + "nil", + types.DynamicFeeTx{ + Accesses: types.NewAccessList(nil), + }, + nil, + }, + { + "non-empty accesses", + types.DynamicFeeTx{ + Accesses: types.AccessList{ + { + Address: suite.hexAddr, + StorageKeys: []string{}, + }, + }, + }, + ethtypes.AccessList{ + { + Address: suite.addr, + StorageKeys: []common.Hash{}, + }, + }, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetAccessList() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetData() { + testCases := []struct { + name string + tx types.DynamicFeeTx + }{ + { + "non-empty transaction", + types.DynamicFeeTx{ + Data: nil, + }, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetData() + + suite.Require().Equal(tc.tx.Data, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetGas() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp uint64 + }{ + { + "non-empty gas", + types.DynamicFeeTx{ + GasLimit: suite.uint64, + }, + suite.uint64, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGas() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetGasPrice() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp *big.Int + }{ + { + "non-empty gasFeeCap", + types.DynamicFeeTx{ + GasFeeCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasPrice() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetGasTipCap() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp *big.Int + }{ + { + "empty gasTipCap", + types.DynamicFeeTx{ + GasTipCap: nil, + }, + nil, + }, + { + "non-empty gasTipCap", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasTipCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetGasFeeCap() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp *big.Int + }{ + { + "empty gasFeeCap", + types.DynamicFeeTx{ + GasFeeCap: nil, + }, + nil, + }, + { + "non-empty gasFeeCap", + types.DynamicFeeTx{ + GasFeeCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasFeeCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetValue() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp *big.Int + }{ + { + "empty amount", + types.DynamicFeeTx{ + Amount: nil, + }, + nil, + }, + { + "non-empty amount", + types.DynamicFeeTx{ + Amount: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetValue() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetNonce() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp uint64 + }{ + { + "non-empty nonce", + types.DynamicFeeTx{ + Nonce: suite.uint64, + }, + suite.uint64, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetNonce() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxGetTo() { + testCases := []struct { + name string + tx types.DynamicFeeTx + exp *common.Address + }{ + { + "empty suite.address", + types.DynamicFeeTx{ + To: "", + }, + nil, + }, + { + "non-empty suite.address", + types.DynamicFeeTx{ + To: suite.hexAddr, + }, + &suite.addr, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetTo() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxSetSignatureValues() { + testCases := []struct { + name string + chainID *big.Int + r *big.Int + v *big.Int + s *big.Int + }{ + { + "empty values", + nil, + nil, + nil, + nil, + }, + { + "non-empty values", + suite.bigInt, + suite.bigInt, + suite.bigInt, + suite.bigInt, + }, + } + + for _, tc := range testCases { + tx := &types.DynamicFeeTx{} + tx.SetSignatureValues(tc.chainID, tc.v, tc.r, tc.s) + + v, r, s := tx.GetRawSignatureValues() + chainID := tx.GetChainID() + + suite.Require().Equal(tc.v, v, tc.name) + suite.Require().Equal(tc.r, r, tc.name) + suite.Require().Equal(tc.s, s, tc.name) + suite.Require().Equal(tc.chainID, chainID, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxValidate() { + testCases := []struct { + name string + tx types.DynamicFeeTx + expError bool + }{ + { + "empty", + types.DynamicFeeTx{}, + true, + }, + { + "gas tip cap is nil", + types.DynamicFeeTx{ + GasTipCap: nil, + }, + true, + }, + { + "gas fee cap is nil", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkZeroInt, + }, + true, + }, + { + "gas tip cap is negative", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkMinusOneInt, + GasFeeCap: &suite.sdkZeroInt, + }, + true, + }, + { + "gas tip cap is negative", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkZeroInt, + GasFeeCap: &suite.sdkMinusOneInt, + }, + true, + }, + { + "gas fee cap < gas tip cap", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkZeroInt, + }, + true, + }, + { + "amount is negative", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkMinusOneInt, + }, + true, + }, + { + "to suite.address is invalid", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.invalidAddr, + }, + true, + }, + { + "chain ID not present on AccessList txs", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.hexAddr, + ChainID: nil, + }, + true, + }, + { + "no errors", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.hexAddr, + ChainID: &suite.sdkInt, + }, + false, + }, + } + + for _, tc := range testCases { + err := tc.tx.Validate() + + if tc.expError { + suite.Require().Error(err, tc.name) + continue + } + + suite.Require().NoError(err, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxEffectiveGasPrice() { + testCases := []struct { + name string + tx types.DynamicFeeTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty dynamic fee tx", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveGasPrice(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxEffectiveFee() { + testCases := []struct { + name string + tx types.DynamicFeeTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty dynamic fee tx", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + GasLimit: uint64(1), + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveFee(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxEffectiveCost() { + testCases := []struct { + name string + tx types.DynamicFeeTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty dynamic fee tx", + types.DynamicFeeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + GasLimit: uint64(1), + Amount: &suite.sdkZeroInt, + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveCost(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestDynamicFeeTxFeeCost() { + tx := &types.DynamicFeeTx{} + suite.Require().Panics(func() { tx.Fee() }, "should panic") + suite.Require().Panics(func() { tx.Cost() }, "should panic") +} diff --git a/legacy/evm/types/errors.go b/legacy/evm/types/errors.go new file mode 100644 index 0000000..197b2ce --- /dev/null +++ b/legacy/evm/types/errors.go @@ -0,0 +1,124 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "errors" + "fmt" + + errorsmod "cosmossdk.io/errors" + "github.com/ethereum/go-ethereum/common" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common/hexutil" +) + +const ( + codeErrInvalidState = uint32(iota) + 2 // NOTE: code 1 is reserved for internal errors + codeErrInvalidChainConfig + codeErrZeroAddress + codeErrCreateDisabled + codeErrCallDisabled + codeErrInvalidAmount + codeErrInvalidGasPrice + codeErrInvalidGasFee + codeErrVMExecution + codeErrInvalidRefund + codeErrInvalidGasCap + codeErrInvalidBaseFee + codeErrGasOverflow + codeErrInvalidAccount + codeErrInvalidGasLimit + codeErrInactivePrecompile + codeErrABIPack + codeErrABIUnpack +) + +var ( + // ErrInvalidState returns an error resulting from an invalid Storage State. + ErrInvalidState = errorsmod.Register(ModuleName, codeErrInvalidState, "invalid storage state") + + // ErrInvalidChainConfig returns an error resulting from an invalid ChainConfig. + ErrInvalidChainConfig = errorsmod.Register(ModuleName, codeErrInvalidChainConfig, "invalid chain configuration") + + // ErrZeroAddress returns an error resulting from an zero (empty) ethereum Address. + ErrZeroAddress = errorsmod.Register(ModuleName, codeErrZeroAddress, "invalid zero address") + + // ErrCreateDisabled returns an error if the EnableCreate parameter is false. + ErrCreateDisabled = errorsmod.Register(ModuleName, codeErrCreateDisabled, "EVM Create operation is disabled") + + // ErrCallDisabled returns an error if the EnableCall parameter is false. + ErrCallDisabled = errorsmod.Register(ModuleName, codeErrCallDisabled, "EVM Call operation is disabled") + + // ErrInvalidAmount returns an error if a tx contains an invalid amount. + ErrInvalidAmount = errorsmod.Register(ModuleName, codeErrInvalidAmount, "invalid transaction amount") + + // ErrInvalidGasPrice returns an error if an invalid gas price is provided to the tx. + ErrInvalidGasPrice = errorsmod.Register(ModuleName, codeErrInvalidGasPrice, "invalid gas price") + + // ErrInvalidGasFee returns an error if the tx gas fee is out of bound. + ErrInvalidGasFee = errorsmod.Register(ModuleName, codeErrInvalidGasFee, "invalid gas fee") + + // ErrVMExecution returns an error resulting from an error in EVM execution. + ErrVMExecution = errorsmod.Register(ModuleName, codeErrVMExecution, "evm transaction execution failed") + + // ErrInvalidRefund returns an error if a the gas refund value is invalid. + ErrInvalidRefund = errorsmod.Register(ModuleName, codeErrInvalidRefund, "invalid gas refund amount") + + // ErrInvalidGasCap returns an error if a the gas cap value is negative or invalid + ErrInvalidGasCap = errorsmod.Register(ModuleName, codeErrInvalidGasCap, "invalid gas cap") + + // ErrInvalidBaseFee returns an error if a the base fee cap value is invalid + ErrInvalidBaseFee = errorsmod.Register(ModuleName, codeErrInvalidBaseFee, "invalid base fee") + + // ErrGasOverflow returns an error if gas computation overlow/underflow + ErrGasOverflow = errorsmod.Register(ModuleName, codeErrGasOverflow, "gas computation overflow/underflow") + + // ErrInvalidAccount returns an error if the account is not an EVM compatible account + ErrInvalidAccount = errorsmod.Register(ModuleName, codeErrInvalidAccount, "account type is not a valid ethereum account") + + // ErrInvalidGasLimit returns an error if gas limit value is invalid + ErrInvalidGasLimit = errorsmod.Register(ModuleName, codeErrInvalidGasLimit, "invalid gas limit") + + // ErrInactivePrecompile returns an error if a call is made to an inactive precompile + ErrInactivePrecompile = errorsmod.Register(ModuleName, codeErrInactivePrecompile, "precompile not enabled") + + // ErrABIPack returns an error if the contract ABI packing fails + ErrABIPack = errorsmod.Register(ModuleName, codeErrABIPack, "contract ABI pack failed") + + // ErrABIUnpack returns an error if the contract ABI unpacking fails + ErrABIUnpack = errorsmod.Register(ModuleName, codeErrABIUnpack, "contract ABI unpack failed") +) + +// NewExecErrorWithReason unpacks the revert return bytes and returns a wrapped error +// with the return reason. +func NewExecErrorWithReason(revertReason []byte) *RevertError { + result := common.CopyBytes(revertReason) + reason, errUnpack := abi.UnpackRevert(result) + err := errors.New("execution reverted") + if errUnpack == nil { + err = fmt.Errorf("execution reverted: %v", reason) + } + return &RevertError{ + error: err, + reason: hexutil.Encode(result), + } +} + +// RevertError is an API error that encompass an EVM revert with JSON error +// code and a binary data blob. +type RevertError struct { + error + reason string // revert reason hex encoded +} + +// ErrorCode returns the JSON error code for a revert. +// See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal +func (e *RevertError) ErrorCode() int { + return 3 +} + +// ErrorData returns the hex encoded revert reason. +func (e *RevertError) ErrorData() interface{} { + return e.reason +} diff --git a/legacy/evm/types/events.go b/legacy/evm/types/events.go new file mode 100644 index 0000000..8c300bf --- /dev/null +++ b/legacy/evm/types/events.go @@ -0,0 +1,26 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +// Evm module events +const ( + EventTypeEthereumTx = TypeMsgEthereumTx + EventTypeBlockBloom = "block_bloom" + EventTypeTxLog = "tx_log" + + AttributeKeyContractAddress = "contract" + AttributeKeyRecipient = "recipient" + AttributeKeyTxHash = "txHash" + AttributeKeyEthereumTxHash = "ethereumTxHash" + AttributeKeyTxIndex = "txIndex" + AttributeKeyTxGasUsed = "txGasUsed" + AttributeKeyTxType = "txType" + AttributeKeyTxLog = "txLog" + // tx failed in eth vm execution + AttributeKeyEthereumTxFailed = "ethereumTxFailed" + AttributeValueCategory = ModuleName + AttributeKeyEthereumBloom = "bloom" + + MetricKeyTransitionDB = "transition_db" + MetricKeyStaticCall = "static_call" +) diff --git a/legacy/evm/types/events.pb.go b/legacy/evm/types/events.pb.go new file mode 100644 index 0000000..2a9b612 --- /dev/null +++ b/legacy/evm/types/events.pb.go @@ -0,0 +1,1265 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/events.proto + +package types + +import ( + fmt "fmt" + 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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventEthereumTx defines the event for an Ethereum transaction +type EventEthereumTx struct { + // amount + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // eth_hash is the Ethereum hash of the transaction + EthHash string `protobuf:"bytes,2,opt,name=eth_hash,json=ethHash,proto3" json:"eth_hash,omitempty"` + // index of the transaction in the block + Index string `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"` + // gas_used is the amount of gas used by the transaction + GasUsed string `protobuf:"bytes,4,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + // hash is the Tendermint hash of the transaction + Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` + // recipient of the transaction + Recipient string `protobuf:"bytes,6,opt,name=recipient,proto3" json:"recipient,omitempty"` + // eth_tx_failed contains a VM error should it occur + EthTxFailed string `protobuf:"bytes,7,opt,name=eth_tx_failed,json=ethTxFailed,proto3" json:"eth_tx_failed,omitempty"` +} + +func (m *EventEthereumTx) Reset() { *m = EventEthereumTx{} } +func (m *EventEthereumTx) String() string { return proto.CompactTextString(m) } +func (*EventEthereumTx) ProtoMessage() {} +func (*EventEthereumTx) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{0} +} +func (m *EventEthereumTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventEthereumTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventEthereumTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventEthereumTx.Merge(m, src) +} +func (m *EventEthereumTx) XXX_Size() int { + return m.Size() +} +func (m *EventEthereumTx) XXX_DiscardUnknown() { + xxx_messageInfo_EventEthereumTx.DiscardUnknown(m) +} + +var xxx_messageInfo_EventEthereumTx proto.InternalMessageInfo + +func (m *EventEthereumTx) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func (m *EventEthereumTx) GetEthHash() string { + if m != nil { + return m.EthHash + } + return "" +} + +func (m *EventEthereumTx) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +func (m *EventEthereumTx) GetGasUsed() string { + if m != nil { + return m.GasUsed + } + return "" +} + +func (m *EventEthereumTx) GetHash() string { + if m != nil { + return m.Hash + } + return "" +} + +func (m *EventEthereumTx) GetRecipient() string { + if m != nil { + return m.Recipient + } + return "" +} + +func (m *EventEthereumTx) GetEthTxFailed() string { + if m != nil { + return m.EthTxFailed + } + return "" +} + +// EventTxLog defines the event for an Ethereum transaction log +type EventTxLog struct { + // tx_logs is an array of transaction logs + TxLogs []string `protobuf:"bytes,1,rep,name=tx_logs,json=txLogs,proto3" json:"tx_logs,omitempty"` +} + +func (m *EventTxLog) Reset() { *m = EventTxLog{} } +func (m *EventTxLog) String() string { return proto.CompactTextString(m) } +func (*EventTxLog) ProtoMessage() {} +func (*EventTxLog) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{1} +} +func (m *EventTxLog) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTxLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTxLog.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventTxLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTxLog.Merge(m, src) +} +func (m *EventTxLog) XXX_Size() int { + return m.Size() +} +func (m *EventTxLog) XXX_DiscardUnknown() { + xxx_messageInfo_EventTxLog.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTxLog proto.InternalMessageInfo + +func (m *EventTxLog) GetTxLogs() []string { + if m != nil { + return m.TxLogs + } + return nil +} + +// EventMessage +type EventMessage struct { + // module which emits the event + Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` + // sender of the message + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // tx_type is the type of the message + TxType string `protobuf:"bytes,3,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty"` +} + +func (m *EventMessage) Reset() { *m = EventMessage{} } +func (m *EventMessage) String() string { return proto.CompactTextString(m) } +func (*EventMessage) ProtoMessage() {} +func (*EventMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{2} +} +func (m *EventMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventMessage.Merge(m, src) +} +func (m *EventMessage) XXX_Size() int { + return m.Size() +} +func (m *EventMessage) XXX_DiscardUnknown() { + xxx_messageInfo_EventMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_EventMessage proto.InternalMessageInfo + +func (m *EventMessage) GetModule() string { + if m != nil { + return m.Module + } + return "" +} + +func (m *EventMessage) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventMessage) GetTxType() string { + if m != nil { + return m.TxType + } + return "" +} + +// EventBlockBloom defines an Ethereum block bloom filter event +type EventBlockBloom struct { + // bloom is the bloom filter of the block + Bloom string `protobuf:"bytes,1,opt,name=bloom,proto3" json:"bloom,omitempty"` +} + +func (m *EventBlockBloom) Reset() { *m = EventBlockBloom{} } +func (m *EventBlockBloom) String() string { return proto.CompactTextString(m) } +func (*EventBlockBloom) ProtoMessage() {} +func (*EventBlockBloom) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{3} +} +func (m *EventBlockBloom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlockBloom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlockBloom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlockBloom) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlockBloom.Merge(m, src) +} +func (m *EventBlockBloom) XXX_Size() int { + return m.Size() +} +func (m *EventBlockBloom) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlockBloom.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlockBloom proto.InternalMessageInfo + +func (m *EventBlockBloom) GetBloom() string { + if m != nil { + return m.Bloom + } + return "" +} + +func init() { + proto.RegisterType((*EventEthereumTx)(nil), "ethermint.evm.v1.EventEthereumTx") + proto.RegisterType((*EventTxLog)(nil), "ethermint.evm.v1.EventTxLog") + proto.RegisterType((*EventMessage)(nil), "ethermint.evm.v1.EventMessage") + proto.RegisterType((*EventBlockBloom)(nil), "ethermint.evm.v1.EventBlockBloom") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/events.proto", fileDescriptor_432e0d592184bde3) } + +var fileDescriptor_432e0d592184bde3 = []byte{ + // 360 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x51, 0xdd, 0x4a, 0xc3, 0x30, + 0x18, 0x5d, 0xdd, 0xd6, 0xb9, 0xa8, 0x28, 0x41, 0xb4, 0x82, 0x96, 0x51, 0xf0, 0xe7, 0xaa, 0x75, + 0xfa, 0x02, 0x32, 0x98, 0x78, 0xa1, 0x37, 0x52, 0x11, 0xbc, 0x29, 0xdd, 0xfa, 0xd9, 0x14, 0x9b, + 0xa6, 0x34, 0x69, 0xc9, 0xde, 0xc2, 0xc7, 0x12, 0xbc, 0xd9, 0xa5, 0x97, 0xb2, 0xbd, 0x88, 0x24, + 0x8d, 0x7a, 0x13, 0x72, 0xce, 0xf9, 0x7e, 0x38, 0xdf, 0x41, 0x27, 0x20, 0x08, 0x54, 0x34, 0x2b, + 0x44, 0x00, 0x0d, 0x0d, 0x9a, 0x71, 0x00, 0x0d, 0x14, 0x82, 0xfb, 0x65, 0xc5, 0x04, 0xc3, 0x7b, + 0x7f, 0xb2, 0x0f, 0x0d, 0xf5, 0x9b, 0xb1, 0xf7, 0x69, 0xa1, 0xdd, 0xa9, 0x2a, 0x99, 0x2a, 0x05, + 0x6a, 0x1a, 0x4a, 0x7c, 0x80, 0xec, 0x98, 0xb2, 0xba, 0x10, 0x8e, 0x35, 0xb2, 0x2e, 0x86, 0x8f, + 0x06, 0xe1, 0x23, 0xb4, 0x09, 0x82, 0x44, 0x24, 0xe6, 0xc4, 0xd9, 0xd0, 0xca, 0x00, 0x04, 0xb9, + 0x8b, 0x39, 0xc1, 0xfb, 0xa8, 0x9f, 0x15, 0x09, 0x48, 0xa7, 0xab, 0xf9, 0x16, 0xa8, 0x86, 0x34, + 0xe6, 0x51, 0xcd, 0x21, 0x71, 0x7a, 0x6d, 0x43, 0x1a, 0xf3, 0x27, 0x0e, 0x09, 0xc6, 0xa8, 0xa7, + 0xe7, 0xf4, 0x35, 0xad, 0xff, 0xf8, 0x18, 0x0d, 0x2b, 0x98, 0x67, 0x65, 0x06, 0x85, 0x70, 0x6c, + 0x2d, 0xfc, 0x13, 0xd8, 0x43, 0x3b, 0x6a, 0xbb, 0x90, 0xd1, 0x6b, 0x9c, 0xe5, 0x90, 0x38, 0x03, + 0x5d, 0xb1, 0x05, 0x82, 0x84, 0xf2, 0x56, 0x53, 0xde, 0x29, 0x42, 0xda, 0x4c, 0x28, 0xef, 0x59, + 0x8a, 0x0f, 0xd1, 0x40, 0xc8, 0x28, 0x67, 0x29, 0x77, 0xac, 0x51, 0x57, 0x19, 0x11, 0x8a, 0xe7, + 0xde, 0x33, 0xda, 0xd6, 0x65, 0x0f, 0xc0, 0x79, 0x9c, 0x82, 0x32, 0x4c, 0x59, 0x52, 0xe7, 0xf0, + 0x6b, 0xb8, 0x45, 0x8a, 0xe7, 0x50, 0x24, 0x50, 0x19, 0xbb, 0x06, 0x99, 0xc1, 0x62, 0x51, 0x82, + 0xf1, 0x6b, 0x0b, 0x19, 0x2e, 0x4a, 0xf0, 0xce, 0xcd, 0x31, 0x27, 0x39, 0x9b, 0xbf, 0x4d, 0x72, + 0xc6, 0xa8, 0xba, 0xcc, 0x4c, 0x7d, 0xcc, 0xe8, 0x16, 0x4c, 0x6e, 0x3e, 0x56, 0xae, 0xb5, 0x5c, + 0xb9, 0xd6, 0xf7, 0xca, 0xb5, 0xde, 0xd7, 0x6e, 0x67, 0xb9, 0x76, 0x3b, 0x5f, 0x6b, 0xb7, 0xf3, + 0x72, 0x96, 0x66, 0x82, 0xd4, 0x33, 0x7f, 0xce, 0xa8, 0x8a, 0x90, 0x71, 0xf3, 0x36, 0x57, 0x97, + 0x81, 0xd4, 0xa1, 0xaa, 0xbd, 0x7c, 0x66, 0xeb, 0x44, 0xaf, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x1e, 0x34, 0x40, 0xd6, 0xf2, 0x01, 0x00, 0x00, +} + +func (m *EventEthereumTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventEthereumTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EthTxFailed) > 0 { + i -= len(m.EthTxFailed) + copy(dAtA[i:], m.EthTxFailed) + i = encodeVarintEvents(dAtA, i, uint64(len(m.EthTxFailed))) + i-- + dAtA[i] = 0x3a + } + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x32 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x2a + } + if len(m.GasUsed) > 0 { + i -= len(m.GasUsed) + copy(dAtA[i:], m.GasUsed) + i = encodeVarintEvents(dAtA, i, uint64(len(m.GasUsed))) + i-- + dAtA[i] = 0x22 + } + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0x1a + } + if len(m.EthHash) > 0 { + i -= len(m.EthHash) + copy(dAtA[i:], m.EthHash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.EthHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTxLog) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTxLog) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTxLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxLogs) > 0 { + for iNdEx := len(m.TxLogs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TxLogs[iNdEx]) + copy(dAtA[i:], m.TxLogs[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TxLogs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EventMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxType) > 0 { + i -= len(m.TxType) + copy(dAtA[i:], m.TxType) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TxType))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if len(m.Module) > 0 { + i -= len(m.Module) + copy(dAtA[i:], m.Module) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Module))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBlockBloom) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlockBloom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlockBloom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Bloom) > 0 { + i -= len(m.Bloom) + copy(dAtA[i:], m.Bloom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Bloom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventEthereumTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.EthHash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Index) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.GasUsed) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.EthTxFailed) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventTxLog) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TxLogs) > 0 { + for _, s := range m.TxLogs { + l = len(s) + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Module) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.TxType) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBlockBloom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bloom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventEthereumTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventEthereumTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GasUsed = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthTxFailed", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthTxFailed = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTxLog) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTxLog: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTxLog: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxLogs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxLogs = append(m.TxLogs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Module = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlockBloom) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBlockBloom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBlockBloom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bloom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bloom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/evm/types/evm.pb.go b/legacy/evm/types/evm.pb.go new file mode 100644 index 0000000..e6b6c37 --- /dev/null +++ b/legacy/evm/types/evm.pb.go @@ -0,0 +1,4585 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/evm.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// AccessType defines the types of permissions for the operations +type AccessType int32 + +const ( + // ACCESS_TYPE_PERMISSIONLESS does not restrict the operation to anyone + AccessTypePermissionless AccessType = 0 + // ACCESS_TYPE_RESTRICTED restrict the operation to anyone + AccessTypeRestricted AccessType = 1 + // ACCESS_TYPE_PERMISSIONED only allows the operation for specific addresses + AccessTypePermissioned AccessType = 2 +) + +var AccessType_name = map[int32]string{ + 0: "ACCESS_TYPE_PERMISSIONLESS", + 1: "ACCESS_TYPE_RESTRICTED", + 2: "ACCESS_TYPE_PERMISSIONED", +} + +var AccessType_value = map[string]int32{ + "ACCESS_TYPE_PERMISSIONLESS": 0, + "ACCESS_TYPE_RESTRICTED": 1, + "ACCESS_TYPE_PERMISSIONED": 2, +} + +func (x AccessType) String() string { + return proto.EnumName(AccessType_name, int32(x)) +} + +func (AccessType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{0} +} + +// Params defines the EVM module parameters +type Params struct { + // evm_denom represents the token denomination used to run the EVM state + // transitions. + EvmDenom string `protobuf:"bytes,1,opt,name=evm_denom,json=evmDenom,proto3" json:"evm_denom,omitempty" yaml:"evm_denom"` + // extra_eips defines the additional EIPs for the vm.Config + ExtraEIPs []string `protobuf:"bytes,4,rep,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` + // chain_config defines the EVM chain configuration parameters + ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` + // allow_unprotected_txs defines if replay-protected (i.e non EIP155 + // signed) transactions can be executed on the state machine. + AllowUnprotectedTxs bool `protobuf:"varint,6,opt,name=allow_unprotected_txs,json=allowUnprotectedTxs,proto3" json:"allow_unprotected_txs,omitempty"` + // evm_channels is the list of channel identifiers from EVM compatible chains + EVMChannels []string `protobuf:"bytes,8,rep,name=evm_channels,json=evmChannels,proto3" json:"evm_channels,omitempty"` + // access_control defines the permission policy of the EVM + AccessControl AccessControl `protobuf:"bytes,9,opt,name=access_control,json=accessControl,proto3" json:"access_control"` + // active_static_precompiles defines the slice of hex addresses of the precompiled + // contracts that are active + ActiveStaticPrecompiles []string `protobuf:"bytes,10,rep,name=active_static_precompiles,json=activeStaticPrecompiles,proto3" json:"active_static_precompiles,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetEvmDenom() string { + if m != nil { + return m.EvmDenom + } + return "" +} + +func (m *Params) GetExtraEIPs() []string { + if m != nil { + return m.ExtraEIPs + } + return nil +} + +func (m *Params) GetChainConfig() ChainConfig { + if m != nil { + return m.ChainConfig + } + return ChainConfig{} +} + +func (m *Params) GetAllowUnprotectedTxs() bool { + if m != nil { + return m.AllowUnprotectedTxs + } + return false +} + +func (m *Params) GetEVMChannels() []string { + if m != nil { + return m.EVMChannels + } + return nil +} + +func (m *Params) GetAccessControl() AccessControl { + if m != nil { + return m.AccessControl + } + return AccessControl{} +} + +func (m *Params) GetActiveStaticPrecompiles() []string { + if m != nil { + return m.ActiveStaticPrecompiles + } + return nil +} + +// AccessControl defines the permission policy of the EVM +// for creating and calling contracts +type AccessControl struct { + // create defines the permission policy for creating contracts + Create AccessControlType `protobuf:"bytes,1,opt,name=create,proto3" json:"create"` + // call defines the permission policy for calling contracts + Call AccessControlType `protobuf:"bytes,2,opt,name=call,proto3" json:"call"` +} + +func (m *AccessControl) Reset() { *m = AccessControl{} } +func (m *AccessControl) String() string { return proto.CompactTextString(m) } +func (*AccessControl) ProtoMessage() {} +func (*AccessControl) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{1} +} +func (m *AccessControl) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessControl.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessControl) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessControl.Merge(m, src) +} +func (m *AccessControl) XXX_Size() int { + return m.Size() +} +func (m *AccessControl) XXX_DiscardUnknown() { + xxx_messageInfo_AccessControl.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessControl proto.InternalMessageInfo + +func (m *AccessControl) GetCreate() AccessControlType { + if m != nil { + return m.Create + } + return AccessControlType{} +} + +func (m *AccessControl) GetCall() AccessControlType { + if m != nil { + return m.Call + } + return AccessControlType{} +} + +// AccessControlType defines the permission type for policies +type AccessControlType struct { + // access_type defines which type of permission is required for the operation + AccessType AccessType `protobuf:"varint,1,opt,name=access_type,json=accessType,proto3,enum=ethermint.evm.v1.AccessType" json:"access_type,omitempty" yaml:"access_type"` + // access_control_list defines defines different things depending on the AccessType: + // - ACCESS_TYPE_PERMISSIONLESS: list of addresses that are blocked from performing the operation + // - ACCESS_TYPE_RESTRICTED: ignored + // - ACCESS_TYPE_PERMISSIONED: list of addresses that are allowed to perform the operation + AccessControlList []string `protobuf:"bytes,2,rep,name=access_control_list,json=accessControlList,proto3" json:"access_control_list,omitempty" yaml:"access_control_list"` +} + +func (m *AccessControlType) Reset() { *m = AccessControlType{} } +func (m *AccessControlType) String() string { return proto.CompactTextString(m) } +func (*AccessControlType) ProtoMessage() {} +func (*AccessControlType) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{2} +} +func (m *AccessControlType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessControlType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessControlType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessControlType) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessControlType.Merge(m, src) +} +func (m *AccessControlType) XXX_Size() int { + return m.Size() +} +func (m *AccessControlType) XXX_DiscardUnknown() { + xxx_messageInfo_AccessControlType.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessControlType proto.InternalMessageInfo + +func (m *AccessControlType) GetAccessType() AccessType { + if m != nil { + return m.AccessType + } + return AccessTypePermissionless +} + +func (m *AccessControlType) GetAccessControlList() []string { + if m != nil { + return m.AccessControlList + } + return nil +} + +// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// instead of *big.Int. +type ChainConfig struct { + // homestead_block switch (nil no fork, 0 = already homestead) + HomesteadBlock *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=cosmossdk.io/math.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` + // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) + DAOForkBlock *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=cosmossdk.io/math.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` + // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork + DAOForkSupport bool `protobuf:"varint,3,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"` + // eip150_block: EIP150 implements the Gas price changes + // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) + EIP150Block *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` + // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) + EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"` + // eip155_block: EIP155Block HF block + EIP155Block *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` + // eip158_block: EIP158 HF block + EIP158Block *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` + // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) + ByzantiumBlock *cosmossdk_io_math.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=cosmossdk.io/math.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` + // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) + ConstantinopleBlock *cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=cosmossdk.io/math.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` + // petersburg_block: Petersburg switch block (nil same as Constantinople) + PetersburgBlock *cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=cosmossdk.io/math.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` + // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) + IstanbulBlock *cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=cosmossdk.io/math.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` + // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) + MuirGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` + // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) + BerlinBlock *cosmossdk_io_math.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=cosmossdk.io/math.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` + // london_block: London switch block (nil = no fork, 0 = already on london) + LondonBlock *cosmossdk_io_math.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=cosmossdk.io/math.Int" json:"london_block,omitempty" yaml:"london_block"` + // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) + ArrowGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` + // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) + GrayGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"` + // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter + MergeNetsplitBlock *cosmossdk_io_math.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=cosmossdk.io/math.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` + // shanghai_block switch block (nil = no fork, 0 = already on shanghai) + ShanghaiBlock *cosmossdk_io_math.Int `protobuf:"bytes,22,opt,name=shanghai_block,json=shanghaiBlock,proto3,customtype=cosmossdk.io/math.Int" json:"shanghai_block,omitempty" yaml:"shanghai_block"` + // cancun_block switch block (nil = no fork, 0 = already on cancun) + CancunBlock *cosmossdk_io_math.Int `protobuf:"bytes,23,opt,name=cancun_block,json=cancunBlock,proto3,customtype=cosmossdk.io/math.Int" json:"cancun_block,omitempty" yaml:"cancun_block"` +} + +func (m *ChainConfig) Reset() { *m = ChainConfig{} } +func (m *ChainConfig) String() string { return proto.CompactTextString(m) } +func (*ChainConfig) ProtoMessage() {} +func (*ChainConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{3} +} +func (m *ChainConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChainConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainConfig.Merge(m, src) +} +func (m *ChainConfig) XXX_Size() int { + return m.Size() +} +func (m *ChainConfig) XXX_DiscardUnknown() { + xxx_messageInfo_ChainConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainConfig proto.InternalMessageInfo + +func (m *ChainConfig) GetDAOForkSupport() bool { + if m != nil { + return m.DAOForkSupport + } + return false +} + +func (m *ChainConfig) GetEIP150Hash() string { + if m != nil { + return m.EIP150Hash + } + return "" +} + +// State represents a single Storage key value pair item. +type State struct { + // key is the stored key + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // value is the stored value for the given key + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *State) Reset() { *m = State{} } +func (m *State) String() string { return proto.CompactTextString(m) } +func (*State) ProtoMessage() {} +func (*State) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{4} +} +func (m *State) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_State.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *State) XXX_Merge(src proto.Message) { + xxx_messageInfo_State.Merge(m, src) +} +func (m *State) XXX_Size() int { + return m.Size() +} +func (m *State) XXX_DiscardUnknown() { + xxx_messageInfo_State.DiscardUnknown(m) +} + +var xxx_messageInfo_State proto.InternalMessageInfo + +func (m *State) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *State) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// TransactionLogs define the logs generated from a transaction execution +// with a given hash. It it used for import/export data as transactions are not +// persisted on blockchain state after an upgrade. +type TransactionLogs struct { + // hash of the transaction + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // logs is an array of Logs for the given transaction hash + Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` +} + +func (m *TransactionLogs) Reset() { *m = TransactionLogs{} } +func (m *TransactionLogs) String() string { return proto.CompactTextString(m) } +func (*TransactionLogs) ProtoMessage() {} +func (*TransactionLogs) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{5} +} +func (m *TransactionLogs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TransactionLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TransactionLogs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TransactionLogs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransactionLogs.Merge(m, src) +} +func (m *TransactionLogs) XXX_Size() int { + return m.Size() +} +func (m *TransactionLogs) XXX_DiscardUnknown() { + xxx_messageInfo_TransactionLogs.DiscardUnknown(m) +} + +var xxx_messageInfo_TransactionLogs proto.InternalMessageInfo + +func (m *TransactionLogs) GetHash() string { + if m != nil { + return m.Hash + } + return "" +} + +func (m *TransactionLogs) GetLogs() []*Log { + if m != nil { + return m.Logs + } + return nil +} + +// Log represents an protobuf compatible Ethereum Log that defines a contract +// log event. These events are generated by the LOG opcode and stored/indexed by +// the node. +// +// NOTE: address, topics and data are consensus fields. The rest of the fields +// are derived, i.e. filled in by the nodes, but not secured by consensus. +type Log struct { + // address of the contract that generated the event + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // topics is a list of topics provided by the contract. + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` + // data which is supplied by the contract, usually ABI-encoded + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // block_number of the block in which the transaction was included + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"blockNumber"` + // tx_hash is the transaction hash + TxHash string `protobuf:"bytes,5,opt,name=tx_hash,json=txHash,proto3" json:"transactionHash"` + // tx_index of the transaction in the block + TxIndex uint64 `protobuf:"varint,6,opt,name=tx_index,json=txIndex,proto3" json:"transactionIndex"` + // block_hash of the block in which the transaction was included + BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"blockHash"` + // index of the log in the block + Index uint64 `protobuf:"varint,8,opt,name=index,proto3" json:"logIndex"` + // removed is true if this log was reverted due to a chain + // reorganisation. You must pay attention to this field if you receive logs + // through a filter query. + Removed bool `protobuf:"varint,9,opt,name=removed,proto3" json:"removed,omitempty"` +} + +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{6} +} +func (m *Log) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Log.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_Log.Merge(m, src) +} +func (m *Log) XXX_Size() int { + return m.Size() +} +func (m *Log) XXX_DiscardUnknown() { + xxx_messageInfo_Log.DiscardUnknown(m) +} + +var xxx_messageInfo_Log proto.InternalMessageInfo + +func (m *Log) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Log) GetTopics() []string { + if m != nil { + return m.Topics + } + return nil +} + +func (m *Log) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *Log) GetBlockNumber() uint64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *Log) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *Log) GetTxIndex() uint64 { + if m != nil { + return m.TxIndex + } + return 0 +} + +func (m *Log) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *Log) GetIndex() uint64 { + if m != nil { + return m.Index + } + return 0 +} + +func (m *Log) GetRemoved() bool { + if m != nil { + return m.Removed + } + return false +} + +// TxResult stores results of Tx execution. +type TxResult struct { + // contract_address contains the ethereum address of the created contract (if + // any). If the state transition is an evm.Call, the contract address will be + // empty. + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" yaml:"contract_address"` + // bloom represents the bloom filter bytes + Bloom []byte `protobuf:"bytes,2,opt,name=bloom,proto3" json:"bloom,omitempty"` + // tx_logs contains the transaction hash and the proto-compatible ethereum + // logs. + TxLogs TransactionLogs `protobuf:"bytes,3,opt,name=tx_logs,json=txLogs,proto3" json:"tx_logs" yaml:"tx_logs"` + // ret defines the bytes from the execution. + Ret []byte `protobuf:"bytes,4,opt,name=ret,proto3" json:"ret,omitempty"` + // reverted flag is set to true when the call has been reverted + Reverted bool `protobuf:"varint,5,opt,name=reverted,proto3" json:"reverted,omitempty"` + // gas_used notes the amount of gas consumed while execution + GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` +} + +func (m *TxResult) Reset() { *m = TxResult{} } +func (m *TxResult) String() string { return proto.CompactTextString(m) } +func (*TxResult) ProtoMessage() {} +func (*TxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{7} +} +func (m *TxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxResult.Merge(m, src) +} +func (m *TxResult) XXX_Size() int { + return m.Size() +} +func (m *TxResult) XXX_DiscardUnknown() { + xxx_messageInfo_TxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_TxResult proto.InternalMessageInfo + +// AccessTuple is the element type of an access list. +type AccessTuple struct { + // address is a hex formatted ethereum address + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // storage_keys are hex formatted hashes of the storage keys + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storageKeys"` +} + +func (m *AccessTuple) Reset() { *m = AccessTuple{} } +func (m *AccessTuple) String() string { return proto.CompactTextString(m) } +func (*AccessTuple) ProtoMessage() {} +func (*AccessTuple) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{8} +} +func (m *AccessTuple) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessTuple.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessTuple) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessTuple.Merge(m, src) +} +func (m *AccessTuple) XXX_Size() int { + return m.Size() +} +func (m *AccessTuple) XXX_DiscardUnknown() { + xxx_messageInfo_AccessTuple.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessTuple proto.InternalMessageInfo + +// TraceConfig holds extra parameters to trace functions. +type TraceConfig struct { + // tracer is a custom javascript tracer + Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` + // timeout overrides the default timeout of 5 seconds for JavaScript-based tracing + // calls + Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + // reexec defines the number of blocks the tracer is willing to go back + Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"` + // disable_stack switches stack capture + DisableStack bool `protobuf:"varint,5,opt,name=disable_stack,json=disableStack,proto3" json:"disableStack"` + // disable_storage switches storage capture + DisableStorage bool `protobuf:"varint,6,opt,name=disable_storage,json=disableStorage,proto3" json:"disableStorage"` + // debug can be used to print output during capture end + Debug bool `protobuf:"varint,8,opt,name=debug,proto3" json:"debug,omitempty"` + // limit defines the maximum length of output, but zero means unlimited + Limit int32 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit,omitempty"` + // overrides can be used to execute a trace using future fork rules + Overrides *ChainConfig `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"` + // enable_memory switches memory capture + EnableMemory bool `protobuf:"varint,11,opt,name=enable_memory,json=enableMemory,proto3" json:"enableMemory"` + // enable_return_data switches the capture of return data + EnableReturnData bool `protobuf:"varint,12,opt,name=enable_return_data,json=enableReturnData,proto3" json:"enableReturnData"` + // tracer_json_config configures the tracer using a JSON string + TracerJsonConfig string `protobuf:"bytes,13,opt,name=tracer_json_config,json=tracerJsonConfig,proto3" json:"tracerConfig"` +} + +func (m *TraceConfig) Reset() { *m = TraceConfig{} } +func (m *TraceConfig) String() string { return proto.CompactTextString(m) } +func (*TraceConfig) ProtoMessage() {} +func (*TraceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{9} +} +func (m *TraceConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TraceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceConfig.Merge(m, src) +} +func (m *TraceConfig) XXX_Size() int { + return m.Size() +} +func (m *TraceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TraceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_TraceConfig proto.InternalMessageInfo + +func (m *TraceConfig) GetTracer() string { + if m != nil { + return m.Tracer + } + return "" +} + +func (m *TraceConfig) GetTimeout() string { + if m != nil { + return m.Timeout + } + return "" +} + +func (m *TraceConfig) GetReexec() uint64 { + if m != nil { + return m.Reexec + } + return 0 +} + +func (m *TraceConfig) GetDisableStack() bool { + if m != nil { + return m.DisableStack + } + return false +} + +func (m *TraceConfig) GetDisableStorage() bool { + if m != nil { + return m.DisableStorage + } + return false +} + +func (m *TraceConfig) GetDebug() bool { + if m != nil { + return m.Debug + } + return false +} + +func (m *TraceConfig) GetLimit() int32 { + if m != nil { + return m.Limit + } + return 0 +} + +func (m *TraceConfig) GetOverrides() *ChainConfig { + if m != nil { + return m.Overrides + } + return nil +} + +func (m *TraceConfig) GetEnableMemory() bool { + if m != nil { + return m.EnableMemory + } + return false +} + +func (m *TraceConfig) GetEnableReturnData() bool { + if m != nil { + return m.EnableReturnData + } + return false +} + +func (m *TraceConfig) GetTracerJsonConfig() string { + if m != nil { + return m.TracerJsonConfig + } + return "" +} + +func init() { + proto.RegisterEnum("ethermint.evm.v1.AccessType", AccessType_name, AccessType_value) + proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params") + proto.RegisterType((*AccessControl)(nil), "ethermint.evm.v1.AccessControl") + proto.RegisterType((*AccessControlType)(nil), "ethermint.evm.v1.AccessControlType") + proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig") + proto.RegisterType((*State)(nil), "ethermint.evm.v1.State") + proto.RegisterType((*TransactionLogs)(nil), "ethermint.evm.v1.TransactionLogs") + proto.RegisterType((*Log)(nil), "ethermint.evm.v1.Log") + proto.RegisterType((*TxResult)(nil), "ethermint.evm.v1.TxResult") + proto.RegisterType((*AccessTuple)(nil), "ethermint.evm.v1.AccessTuple") + proto.RegisterType((*TraceConfig)(nil), "ethermint.evm.v1.TraceConfig") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) } + +var fileDescriptor_d21ecc92c8c8583e = []byte{ + // 1927 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0x4b, 0x6f, 0x23, 0xc7, + 0x11, 0x16, 0xa5, 0x91, 0x34, 0x6c, 0x52, 0xe4, 0xa8, 0x45, 0xed, 0x72, 0xb9, 0x8e, 0x46, 0x99, + 0x04, 0xc1, 0x66, 0xe1, 0x48, 0x2b, 0xad, 0x95, 0x08, 0xeb, 0xbc, 0x44, 0x89, 0x4e, 0xa4, 0x68, + 0xd7, 0x42, 0x53, 0x8e, 0xe1, 0x20, 0xc1, 0xa0, 0x39, 0xd3, 0x26, 0xc7, 0x9a, 0x99, 0x26, 0xa6, + 0x9b, 0x5c, 0x32, 0xbf, 0xc0, 0xd8, 0xd3, 0xe6, 0x07, 0x2c, 0x60, 0x20, 0x97, 0x1c, 0xfd, 0x13, + 0x72, 0x34, 0x72, 0xf2, 0x31, 0x08, 0x90, 0x41, 0xc0, 0x3d, 0x18, 0xd0, 0x51, 0xf7, 0x00, 0x41, + 0x3f, 0xf8, 0x94, 0x2c, 0x2b, 0x17, 0xaa, 0xab, 0xba, 0xea, 0xfb, 0xaa, 0xaa, 0x6b, 0xfa, 0x21, + 0x50, 0x21, 0xbc, 0x45, 0x92, 0x28, 0x88, 0xf9, 0x36, 0xe9, 0x46, 0xdb, 0xdd, 0x1d, 0xf1, 0x67, + 0xab, 0x9d, 0x50, 0x4e, 0xa1, 0x35, 0x9a, 0xdb, 0x12, 0xca, 0xee, 0x4e, 0x65, 0x15, 0x47, 0x41, + 0x4c, 0xb7, 0xe5, 0xaf, 0x32, 0xaa, 0x94, 0x9a, 0xb4, 0x49, 0xe5, 0x70, 0x5b, 0x8c, 0x94, 0xd6, + 0x79, 0x6d, 0x80, 0xa5, 0x33, 0x9c, 0xe0, 0x88, 0xc1, 0x1d, 0x90, 0x25, 0xdd, 0xc8, 0xf5, 0x49, + 0x4c, 0xa3, 0x72, 0x66, 0x33, 0xf3, 0x28, 0x5b, 0x2d, 0x5d, 0xa5, 0xb6, 0xd5, 0xc7, 0x51, 0xf8, + 0xcc, 0x19, 0x4d, 0x39, 0xc8, 0x24, 0xdd, 0xe8, 0x48, 0x0c, 0xe1, 0x01, 0x00, 0xa4, 0xc7, 0x13, + 0xec, 0x92, 0xa0, 0xcd, 0xca, 0xc6, 0xe6, 0xc2, 0xa3, 0x6c, 0xd5, 0x19, 0xa4, 0x76, 0xb6, 0x26, + 0xb4, 0xb5, 0xe3, 0x33, 0x76, 0x95, 0xda, 0xab, 0x1a, 0x60, 0x64, 0xe8, 0xa0, 0xac, 0x14, 0x6a, + 0x41, 0x9b, 0xc1, 0x06, 0xc8, 0x7b, 0x2d, 0x1c, 0xc4, 0xae, 0x47, 0xe3, 0x4f, 0x83, 0x66, 0x79, + 0x71, 0x33, 0xf3, 0x28, 0xb7, 0xfb, 0xbd, 0xad, 0xd9, 0x94, 0xb6, 0x0e, 0x85, 0xd5, 0xa1, 0x34, + 0xaa, 0x6e, 0x7e, 0x95, 0xda, 0x73, 0x57, 0xa9, 0xbd, 0xa6, 0xa0, 0x27, 0x01, 0x9c, 0xbf, 0x7d, + 0xf3, 0xe5, 0xe3, 0x0c, 0xca, 0x79, 0x63, 0x73, 0xb8, 0x0b, 0xd6, 0x71, 0x18, 0xd2, 0x97, 0x6e, + 0x27, 0x16, 0x59, 0x13, 0x8f, 0x13, 0xdf, 0xe5, 0x3d, 0x56, 0x5e, 0xda, 0xcc, 0x3c, 0x32, 0xd1, + 0x9a, 0x9c, 0xfc, 0x68, 0x3c, 0x77, 0xde, 0x63, 0x70, 0x17, 0xe4, 0x45, 0xca, 0x5e, 0x0b, 0xc7, + 0x31, 0x09, 0x59, 0xd9, 0x94, 0xc9, 0x15, 0x07, 0xa9, 0x9d, 0xab, 0xfd, 0xfe, 0xf9, 0xa1, 0x56, + 0xa3, 0x1c, 0xe9, 0x46, 0x43, 0x01, 0xfe, 0x09, 0x14, 0xb0, 0xe7, 0x11, 0xc6, 0x44, 0x2c, 0x3c, + 0xa1, 0x61, 0x39, 0x2b, 0xb3, 0xb1, 0xaf, 0x67, 0x73, 0x20, 0xed, 0x0e, 0x95, 0x59, 0x75, 0x5d, + 0xe4, 0x33, 0x48, 0xed, 0x95, 0x29, 0x35, 0x5a, 0xc1, 0x93, 0x22, 0x7c, 0x06, 0x1e, 0x60, 0x8f, + 0x07, 0x5d, 0xe2, 0x32, 0x8e, 0x79, 0xe0, 0xb9, 0xed, 0x84, 0x78, 0x34, 0x6a, 0x07, 0x21, 0x61, + 0x65, 0x20, 0xe2, 0x43, 0xf7, 0x95, 0x41, 0x5d, 0xce, 0x9f, 0x8d, 0xa7, 0x9f, 0xdd, 0x7f, 0xf5, + 0xcd, 0x97, 0x8f, 0x21, 0xe9, 0x46, 0x94, 0x6d, 0xf7, 0x64, 0x07, 0xa9, 0x55, 0x3f, 0x31, 0xcc, + 0x79, 0x6b, 0xe1, 0xc4, 0x30, 0x17, 0x2c, 0xe3, 0xc4, 0x30, 0x97, 0x2d, 0xd3, 0xf9, 0x4b, 0x06, + 0x4c, 0xc7, 0x01, 0x0f, 0xc0, 0x92, 0x97, 0x10, 0xcc, 0x89, 0x6c, 0x8b, 0xdc, 0xee, 0x0f, 0xbe, + 0x23, 0x9f, 0xf3, 0x7e, 0x9b, 0x54, 0x0d, 0x91, 0x13, 0xd2, 0x8e, 0xf0, 0x17, 0xc0, 0xf0, 0x70, + 0x18, 0x96, 0xe7, 0xff, 0x5f, 0x00, 0xe9, 0xe6, 0xfc, 0x3b, 0x03, 0x56, 0xaf, 0x59, 0x40, 0x0f, + 0xe4, 0x74, 0xbd, 0x79, 0xbf, 0xad, 0x82, 0x2b, 0xec, 0xbe, 0xf3, 0x6d, 0xd8, 0x12, 0xf4, 0x87, + 0x83, 0xd4, 0x06, 0x63, 0xf9, 0x2a, 0xb5, 0xa1, 0xea, 0xa1, 0x09, 0x20, 0x07, 0x01, 0x3c, 0xb2, + 0x80, 0x1e, 0x58, 0x9b, 0x5e, 0x54, 0x37, 0x0c, 0x18, 0x2f, 0xcf, 0xcb, 0x7e, 0x78, 0x3a, 0x48, + 0xed, 0xe9, 0xc0, 0x4e, 0x03, 0xc6, 0xaf, 0x52, 0xbb, 0x32, 0x85, 0x3a, 0xe9, 0xe9, 0xa0, 0x55, + 0x3c, 0xeb, 0xe0, 0xfc, 0xb7, 0x00, 0x72, 0x13, 0x0d, 0x0e, 0xff, 0x08, 0x8a, 0x2d, 0x1a, 0x11, + 0xc6, 0x09, 0xf6, 0xdd, 0x46, 0x48, 0xbd, 0x0b, 0xfd, 0x45, 0x3e, 0xfd, 0x57, 0x6a, 0xaf, 0x7b, + 0x94, 0x45, 0x94, 0x31, 0xff, 0x62, 0x2b, 0xa0, 0xdb, 0x11, 0xe6, 0xad, 0xad, 0xe3, 0x58, 0x90, + 0xde, 0x53, 0xa4, 0x33, 0x9e, 0x0e, 0x2a, 0x8c, 0x34, 0x55, 0xa1, 0x80, 0x2d, 0x50, 0xf0, 0x31, + 0x75, 0x3f, 0xa5, 0xc9, 0x85, 0x06, 0x9f, 0x97, 0xe0, 0xd5, 0x6f, 0x05, 0x1f, 0xa4, 0x76, 0xfe, + 0xe8, 0xe0, 0xc3, 0x0f, 0x68, 0x72, 0x21, 0x21, 0xae, 0x52, 0x7b, 0x5d, 0x91, 0x4d, 0x03, 0x39, + 0x28, 0xef, 0x63, 0x3a, 0x32, 0x83, 0x1f, 0x03, 0x6b, 0x64, 0xc0, 0x3a, 0xed, 0x36, 0x4d, 0x78, + 0x79, 0x41, 0x7c, 0x74, 0xd5, 0x9f, 0x0c, 0x52, 0xbb, 0xa0, 0x21, 0xeb, 0x6a, 0xe6, 0x2a, 0xb5, + 0xef, 0xcf, 0x80, 0x6a, 0x1f, 0x07, 0x15, 0x34, 0xac, 0x36, 0x15, 0xdb, 0x06, 0x09, 0xda, 0x3b, + 0x7b, 0x4f, 0x74, 0x02, 0x86, 0x4c, 0xe0, 0x57, 0xb7, 0x25, 0x90, 0xab, 0x1d, 0x9f, 0xed, 0xec, + 0x3d, 0x19, 0xc6, 0xaf, 0xf7, 0x8e, 0x49, 0x14, 0x07, 0xe5, 0x94, 0xa8, 0x82, 0x3f, 0x06, 0x5a, + 0x74, 0x5b, 0x98, 0xb5, 0xe4, 0xce, 0x94, 0xad, 0x3e, 0x12, 0x0d, 0xa4, 0x90, 0x7e, 0x8b, 0x59, + 0x6b, 0x5c, 0xf5, 0x46, 0xff, 0xcf, 0x38, 0xe6, 0x41, 0x27, 0x1a, 0x62, 0x01, 0xe5, 0x2c, 0xac, + 0x46, 0xe1, 0xee, 0xe9, 0x70, 0x97, 0xee, 0x1a, 0xee, 0xde, 0x4d, 0xe1, 0xee, 0x4d, 0x87, 0xab, + 0x6c, 0x46, 0x1c, 0xfb, 0x9a, 0x63, 0xf9, 0xae, 0x1c, 0xfb, 0x37, 0x71, 0xec, 0x4f, 0x73, 0x28, + 0x1b, 0xd1, 0x97, 0x33, 0x79, 0x96, 0xcd, 0x3b, 0xf7, 0xe5, 0xb5, 0x0a, 0x15, 0x46, 0x1a, 0x85, + 0x7e, 0x01, 0x4a, 0x1e, 0x8d, 0x19, 0x17, 0xba, 0x98, 0xb6, 0x43, 0xa2, 0x29, 0xb2, 0x92, 0x62, + 0xff, 0x36, 0x8a, 0x87, 0xfa, 0x24, 0xb8, 0xc1, 0xdd, 0x41, 0x6b, 0xd3, 0x6a, 0x45, 0xe6, 0x02, + 0xab, 0x4d, 0x38, 0x49, 0x58, 0xa3, 0x93, 0x34, 0x35, 0x11, 0x90, 0x44, 0xef, 0xdd, 0x46, 0xa4, + 0x3b, 0x74, 0xd6, 0xd5, 0x41, 0xc5, 0xb1, 0x4a, 0x11, 0x7c, 0x02, 0x0a, 0x81, 0x60, 0x6d, 0x74, + 0x42, 0x0d, 0x9f, 0x93, 0xf0, 0xbb, 0xb7, 0xc1, 0xeb, 0xaf, 0x6a, 0xda, 0xd1, 0x41, 0x2b, 0x43, + 0x85, 0x82, 0xf6, 0x01, 0x8c, 0x3a, 0x41, 0xe2, 0x36, 0x43, 0xec, 0x05, 0x24, 0xd1, 0xf0, 0x79, + 0x09, 0xff, 0xd3, 0xdb, 0xe0, 0x1f, 0x28, 0xf8, 0xeb, 0xce, 0x0e, 0xb2, 0x84, 0xf2, 0x37, 0x4a, + 0xa7, 0x58, 0xea, 0x20, 0xdf, 0x20, 0x49, 0x18, 0xc4, 0x1a, 0x7f, 0x45, 0xe2, 0x3f, 0xb9, 0x0d, + 0x5f, 0x77, 0xd0, 0xa4, 0x9b, 0x83, 0x72, 0x4a, 0x1c, 0x81, 0x86, 0x34, 0xf6, 0xe9, 0x10, 0x74, + 0xf5, 0xce, 0xa0, 0x93, 0x6e, 0x0e, 0xca, 0x29, 0x51, 0x81, 0x36, 0xc1, 0x1a, 0x4e, 0x12, 0xfa, + 0x72, 0xa6, 0x20, 0x50, 0x62, 0xff, 0xec, 0x36, 0xec, 0xe1, 0x3e, 0x7d, 0xdd, 0x5b, 0xec, 0xd3, + 0x42, 0x3b, 0x55, 0x12, 0x1f, 0xc0, 0x66, 0x82, 0xfb, 0x33, 0x3c, 0xa5, 0x3b, 0x17, 0xfe, 0xba, + 0xb3, 0x83, 0x2c, 0xa1, 0x9c, 0x62, 0xf9, 0x0c, 0x94, 0x22, 0x92, 0x34, 0x89, 0x1b, 0x13, 0xce, + 0xda, 0x61, 0xc0, 0x35, 0xcf, 0xfa, 0x9d, 0xbf, 0x83, 0x9b, 0xdc, 0x1d, 0x04, 0xa5, 0xfa, 0x85, + 0xd6, 0x8e, 0xba, 0x94, 0xb5, 0x70, 0xdc, 0x6c, 0xe1, 0x40, 0xb3, 0xdc, 0xbb, 0x73, 0x97, 0x4e, + 0x3b, 0x3a, 0x68, 0x65, 0xa8, 0x18, 0x2d, 0xb5, 0x87, 0x63, 0xaf, 0x33, 0x5c, 0xea, 0xfb, 0x77, + 0x5e, 0xea, 0x49, 0x37, 0x07, 0xe5, 0x94, 0x28, 0x41, 0x4f, 0x0c, 0xb3, 0x60, 0x15, 0x4f, 0x0c, + 0xb3, 0x68, 0x59, 0x27, 0x86, 0x69, 0x59, 0xab, 0x27, 0x86, 0xb9, 0x66, 0x95, 0xd0, 0x4a, 0x9f, + 0x86, 0xd4, 0xed, 0x3e, 0x55, 0x4e, 0x28, 0x47, 0x5e, 0x62, 0xa6, 0x37, 0x1a, 0x54, 0xf0, 0x30, + 0xc7, 0x61, 0x9f, 0xe9, 0x42, 0x20, 0x4b, 0x95, 0x67, 0xe2, 0xd8, 0xda, 0x06, 0x8b, 0xe2, 0xce, + 0x44, 0xa0, 0x05, 0x16, 0x2e, 0x48, 0x5f, 0x1d, 0xb6, 0x48, 0x0c, 0x61, 0x09, 0x2c, 0x76, 0x71, + 0xd8, 0x21, 0xea, 0x8c, 0x44, 0x4a, 0x70, 0xce, 0x40, 0xf1, 0x3c, 0xc1, 0x31, 0x13, 0xf7, 0x2d, + 0x1a, 0x9f, 0xd2, 0x26, 0x83, 0x10, 0x18, 0xf2, 0x9c, 0x50, 0xbe, 0x72, 0x0c, 0x7f, 0x0c, 0x8c, + 0x90, 0x36, 0x99, 0xbc, 0x2d, 0xe4, 0x76, 0xd7, 0xaf, 0x5f, 0x4d, 0x4e, 0x69, 0x13, 0x49, 0x13, + 0xe7, 0x1f, 0xf3, 0x60, 0xe1, 0x94, 0x36, 0x61, 0x19, 0x2c, 0x63, 0xdf, 0x4f, 0x08, 0x63, 0x1a, + 0x69, 0x28, 0xc2, 0x7b, 0x60, 0x89, 0xd3, 0x76, 0xe0, 0x29, 0xb8, 0x2c, 0xd2, 0x92, 0x20, 0xf6, + 0x31, 0xc7, 0xf2, 0x60, 0xcd, 0x23, 0x39, 0x16, 0xd7, 0x57, 0x99, 0x99, 0x1b, 0x77, 0xa2, 0x06, + 0x49, 0xe4, 0xf9, 0x68, 0x54, 0x8b, 0x97, 0xa9, 0x9d, 0x93, 0xfa, 0x17, 0x52, 0x8d, 0x26, 0x05, + 0xf8, 0x2e, 0x58, 0xe6, 0xbd, 0xc9, 0xb3, 0x6e, 0xed, 0x32, 0xb5, 0x8b, 0x7c, 0x9c, 0xa6, 0x38, + 0xca, 0xd0, 0x12, 0xef, 0xc9, 0x23, 0x6d, 0x1b, 0x98, 0xbc, 0xe7, 0x06, 0xb1, 0x4f, 0x7a, 0xf2, + 0x38, 0x33, 0xaa, 0xa5, 0xcb, 0xd4, 0xb6, 0x26, 0xcc, 0x8f, 0xc5, 0x1c, 0x5a, 0xe6, 0x3d, 0x39, + 0x80, 0xef, 0x02, 0xa0, 0x42, 0x92, 0x0c, 0xea, 0x74, 0x5a, 0xb9, 0x4c, 0xed, 0xac, 0xd4, 0x4a, + 0xec, 0xf1, 0x10, 0x3a, 0x60, 0x51, 0x61, 0x9b, 0x12, 0x3b, 0x7f, 0x99, 0xda, 0x66, 0x48, 0x9b, + 0x0a, 0x53, 0x4d, 0x89, 0x52, 0x25, 0x24, 0xa2, 0x5d, 0xe2, 0xcb, 0x23, 0xc2, 0x44, 0x43, 0xd1, + 0x79, 0x3d, 0x0f, 0xcc, 0xf3, 0x1e, 0x22, 0xac, 0x13, 0x72, 0xf8, 0x01, 0xb0, 0xe4, 0x05, 0x0c, + 0x7b, 0xdc, 0x9d, 0x2a, 0x6d, 0xf5, 0xe1, 0x78, 0x43, 0x9f, 0xb5, 0x70, 0x50, 0x71, 0xa8, 0x3a, + 0xd0, 0xf5, 0x2f, 0x81, 0xc5, 0x46, 0x48, 0x69, 0x24, 0x3b, 0x21, 0x8f, 0x94, 0x00, 0x3f, 0x96, + 0x55, 0x93, 0xab, 0xbc, 0x20, 0x2f, 0xb7, 0xdf, 0xbf, 0xbe, 0xca, 0x33, 0xad, 0x52, 0x7d, 0xa8, + 0xdf, 0x2f, 0x05, 0xc5, 0xad, 0xfd, 0xf5, 0xd3, 0x65, 0x89, 0xf7, 0x64, 0x3f, 0x59, 0x60, 0x21, + 0x21, 0x5c, 0xae, 0x5c, 0x1e, 0x89, 0x21, 0xac, 0x00, 0x33, 0x21, 0x5d, 0x92, 0x70, 0xe2, 0xcb, + 0x15, 0x32, 0xd1, 0x48, 0x86, 0x0f, 0x80, 0xd9, 0xc4, 0xcc, 0xed, 0x30, 0xe2, 0xab, 0xe5, 0x40, + 0xcb, 0x4d, 0xcc, 0x3e, 0x62, 0xc4, 0x7f, 0x66, 0x7c, 0xfe, 0x85, 0x3d, 0xe7, 0x60, 0x90, 0xd3, + 0xf7, 0xde, 0x4e, 0x3b, 0x24, 0xb7, 0xb4, 0xd9, 0x2e, 0xc8, 0x33, 0x4e, 0x13, 0xdc, 0x24, 0xee, + 0x05, 0xe9, 0xeb, 0x66, 0x53, 0xad, 0xa3, 0xf5, 0xbf, 0x23, 0x7d, 0x86, 0x26, 0x05, 0x4d, 0xf1, + 0x85, 0x01, 0x72, 0xe7, 0x09, 0xf6, 0x88, 0xbe, 0xc5, 0x8a, 0x86, 0x15, 0x62, 0xa2, 0x29, 0xb4, + 0x24, 0xb8, 0x79, 0x10, 0x11, 0xda, 0xe1, 0xfa, 0xa3, 0x1a, 0x8a, 0xc2, 0x23, 0x21, 0xa4, 0x47, + 0x3c, 0x59, 0x4b, 0x03, 0x69, 0x09, 0xee, 0x81, 0x15, 0x3f, 0x60, 0xb8, 0x11, 0xca, 0xb7, 0x8f, + 0x77, 0xa1, 0xd2, 0xaf, 0x5a, 0x97, 0xa9, 0x9d, 0xd7, 0x13, 0x75, 0xa1, 0x47, 0x53, 0x12, 0x7c, + 0x1f, 0x14, 0xc7, 0x6e, 0x32, 0x5a, 0xf5, 0xe4, 0xab, 0xc2, 0xcb, 0xd4, 0x2e, 0x8c, 0x4c, 0xe5, + 0x0c, 0x9a, 0x91, 0xc5, 0x72, 0xfb, 0xa4, 0xd1, 0x69, 0xca, 0x0e, 0x34, 0x91, 0x12, 0x84, 0x36, + 0x0c, 0xa2, 0x80, 0xcb, 0x8e, 0x5b, 0x44, 0x4a, 0x80, 0xef, 0x83, 0x2c, 0xed, 0x92, 0x24, 0x09, + 0x7c, 0xf9, 0x14, 0xfb, 0xee, 0x27, 0x2c, 0x1a, 0xdb, 0x8b, 0xe4, 0x48, 0x2c, 0x83, 0x8c, 0x48, + 0x44, 0x93, 0xbe, 0xbc, 0x27, 0xe8, 0xe4, 0xd4, 0xc4, 0x73, 0xa9, 0x47, 0x53, 0x12, 0xac, 0x02, + 0xa8, 0xdd, 0x12, 0xc2, 0x3b, 0x49, 0xec, 0xca, 0x4d, 0x20, 0x2f, 0x7d, 0xe5, 0xa7, 0xa8, 0x66, + 0x91, 0x9c, 0x3c, 0xc2, 0x1c, 0xa3, 0x6b, 0x1a, 0xf8, 0x4b, 0x00, 0xd5, 0x9a, 0xb8, 0x9f, 0x31, + 0x3a, 0x7a, 0x83, 0xab, 0x83, 0x5e, 0xf2, 0xab, 0x59, 0x1d, 0xb3, 0xa5, 0xa4, 0x13, 0x46, 0x75, + 0x16, 0x27, 0x86, 0x69, 0x58, 0x8b, 0xea, 0xdd, 0x38, 0xaa, 0x9f, 0xce, 0x02, 0xad, 0x0d, 0xe5, + 0x89, 0xf0, 0x1e, 0xff, 0x3d, 0x03, 0x26, 0x9e, 0x5f, 0xf0, 0xe7, 0xa0, 0x72, 0x70, 0x78, 0x58, + 0xab, 0xd7, 0xdd, 0xf3, 0x4f, 0xce, 0x6a, 0xee, 0x59, 0x0d, 0x3d, 0x3f, 0xae, 0xd7, 0x8f, 0x3f, + 0x7c, 0x71, 0x5a, 0xab, 0xd7, 0xad, 0xb9, 0xca, 0x3b, 0xaf, 0xde, 0x6c, 0x96, 0xc7, 0xf6, 0x67, + 0xa2, 0x9e, 0x8c, 0x05, 0x34, 0x0e, 0x45, 0xa7, 0xbe, 0x07, 0xee, 0x4d, 0x7a, 0xa3, 0x5a, 0xfd, + 0x1c, 0x1d, 0x1f, 0x9e, 0xd7, 0x8e, 0xac, 0x4c, 0xa5, 0xfc, 0xea, 0xcd, 0x66, 0x69, 0xec, 0x89, + 0x08, 0xe3, 0x49, 0x20, 0x1e, 0xf7, 0x70, 0x1f, 0x94, 0x6f, 0xe6, 0xac, 0x1d, 0x59, 0xf3, 0x95, + 0xca, 0xab, 0x37, 0x9b, 0xf7, 0x6e, 0x62, 0x24, 0x7e, 0xc5, 0xf8, 0xfc, 0xaf, 0x1b, 0x73, 0xd5, + 0x5f, 0x7f, 0x35, 0xd8, 0xc8, 0x7c, 0x3d, 0xd8, 0xc8, 0xfc, 0x67, 0xb0, 0x91, 0x79, 0xfd, 0x76, + 0x63, 0xee, 0xeb, 0xb7, 0x1b, 0x73, 0xff, 0x7c, 0xbb, 0x31, 0xf7, 0x87, 0x1f, 0x35, 0x03, 0xde, + 0xea, 0x34, 0xb6, 0x3c, 0x1a, 0x6d, 0xab, 0xa7, 0xb6, 0xfa, 0xed, 0xee, 0x3e, 0xd1, 0x8f, 0x6e, + 0xf1, 0xbc, 0x64, 0x8d, 0x25, 0xf9, 0xbf, 0x97, 0xa7, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x80, + 0xcf, 0xeb, 0x91, 0xd4, 0x11, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ActiveStaticPrecompiles) > 0 { + for iNdEx := len(m.ActiveStaticPrecompiles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ActiveStaticPrecompiles[iNdEx]) + copy(dAtA[i:], m.ActiveStaticPrecompiles[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ActiveStaticPrecompiles[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + { + size, err := m.AccessControl.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + if len(m.EVMChannels) > 0 { + for iNdEx := len(m.EVMChannels) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EVMChannels[iNdEx]) + copy(dAtA[i:], m.EVMChannels[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.EVMChannels[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if m.AllowUnprotectedTxs { + i-- + if m.AllowUnprotectedTxs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + { + size, err := m.ChainConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.ExtraEIPs) > 0 { + for iNdEx := len(m.ExtraEIPs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ExtraEIPs[iNdEx]) + copy(dAtA[i:], m.ExtraEIPs[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ExtraEIPs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.EvmDenom) > 0 { + i -= len(m.EvmDenom) + copy(dAtA[i:], m.EvmDenom) + i = encodeVarintEvm(dAtA, i, uint64(len(m.EvmDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccessControl) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessControl) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessControl) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Call.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Create.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *AccessControlType) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessControlType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessControlType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccessControlList) > 0 { + for iNdEx := len(m.AccessControlList) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccessControlList[iNdEx]) + copy(dAtA[i:], m.AccessControlList[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.AccessControlList[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.AccessType != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.AccessType)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ChainConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChainConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CancunBlock != nil { + { + size := m.CancunBlock.Size() + i -= size + if _, err := m.CancunBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + if m.ShanghaiBlock != nil { + { + size := m.ShanghaiBlock.Size() + i -= size + if _, err := m.ShanghaiBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if m.MergeNetsplitBlock != nil { + { + size := m.MergeNetsplitBlock.Size() + i -= size + if _, err := m.MergeNetsplitBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + if m.GrayGlacierBlock != nil { + { + size := m.GrayGlacierBlock.Size() + i -= size + if _, err := m.GrayGlacierBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if m.ArrowGlacierBlock != nil { + { + size := m.ArrowGlacierBlock.Size() + i -= size + if _, err := m.ArrowGlacierBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if m.LondonBlock != nil { + { + size := m.LondonBlock.Size() + i -= size + if _, err := m.LondonBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if m.BerlinBlock != nil { + { + size := m.BerlinBlock.Size() + i -= size + if _, err := m.BerlinBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + if m.MuirGlacierBlock != nil { + { + size := m.MuirGlacierBlock.Size() + i -= size + if _, err := m.MuirGlacierBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.IstanbulBlock != nil { + { + size := m.IstanbulBlock.Size() + i -= size + if _, err := m.IstanbulBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.PetersburgBlock != nil { + { + size := m.PetersburgBlock.Size() + i -= size + if _, err := m.PetersburgBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.ConstantinopleBlock != nil { + { + size := m.ConstantinopleBlock.Size() + i -= size + if _, err := m.ConstantinopleBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if m.ByzantiumBlock != nil { + { + size := m.ByzantiumBlock.Size() + i -= size + if _, err := m.ByzantiumBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.EIP158Block != nil { + { + size := m.EIP158Block.Size() + i -= size + if _, err := m.EIP158Block.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.EIP155Block != nil { + { + size := m.EIP155Block.Size() + i -= size + if _, err := m.EIP155Block.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.EIP150Hash) > 0 { + i -= len(m.EIP150Hash) + copy(dAtA[i:], m.EIP150Hash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.EIP150Hash))) + i-- + dAtA[i] = 0x2a + } + if m.EIP150Block != nil { + { + size := m.EIP150Block.Size() + i -= size + if _, err := m.EIP150Block.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.DAOForkSupport { + i-- + if m.DAOForkSupport { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.DAOForkBlock != nil { + { + size := m.DAOForkBlock.Size() + i -= size + if _, err := m.DAOForkBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.HomesteadBlock != nil { + { + size := m.HomesteadBlock.Size() + i -= size + if _, err := m.HomesteadBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *State) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *State) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TransactionLogs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionLogs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransactionLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Logs) > 0 { + for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Log) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Log) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Removed { + i-- + if m.Removed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.Index != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x40 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x3a + } + if m.TxIndex != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x30 + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x2a + } + if m.BlockNumber != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x20 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x1a + } + if len(m.Topics) > 0 { + for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Topics[iNdEx]) + copy(dAtA[i:], m.Topics[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Topics[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TxResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasUsed != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if m.Reverted { + i-- + if m.Reverted { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.Ret) > 0 { + i -= len(m.Ret) + copy(dAtA[i:], m.Ret) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Ret))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.TxLogs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Bloom) > 0 { + i -= len(m.Bloom) + copy(dAtA[i:], m.Bloom) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Bloom))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccessTuple) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessTuple) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StorageKeys) > 0 { + for iNdEx := len(m.StorageKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.StorageKeys[iNdEx]) + copy(dAtA[i:], m.StorageKeys[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.StorageKeys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TraceConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TraceConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TracerJsonConfig) > 0 { + i -= len(m.TracerJsonConfig) + copy(dAtA[i:], m.TracerJsonConfig) + i = encodeVarintEvm(dAtA, i, uint64(len(m.TracerJsonConfig))) + i-- + dAtA[i] = 0x6a + } + if m.EnableReturnData { + i-- + if m.EnableReturnData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.EnableMemory { + i-- + if m.EnableMemory { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.Overrides != nil { + { + size, err := m.Overrides.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.Limit != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x48 + } + if m.Debug { + i-- + if m.Debug { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.DisableStorage { + i-- + if m.DisableStorage { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.DisableStack { + i-- + if m.DisableStack { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Reexec != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Reexec)) + i-- + dAtA[i] = 0x18 + } + if len(m.Timeout) > 0 { + i -= len(m.Timeout) + copy(dAtA[i:], m.Timeout) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Timeout))) + i-- + dAtA[i] = 0x12 + } + if len(m.Tracer) > 0 { + i -= len(m.Tracer) + copy(dAtA[i:], m.Tracer) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Tracer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { + offset -= sovEvm(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EvmDenom) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.ExtraEIPs) > 0 { + for _, s := range m.ExtraEIPs { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + l = m.ChainConfig.Size() + n += 1 + l + sovEvm(uint64(l)) + if m.AllowUnprotectedTxs { + n += 2 + } + if len(m.EVMChannels) > 0 { + for _, s := range m.EVMChannels { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + l = m.AccessControl.Size() + n += 1 + l + sovEvm(uint64(l)) + if len(m.ActiveStaticPrecompiles) > 0 { + for _, s := range m.ActiveStaticPrecompiles { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *AccessControl) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Create.Size() + n += 1 + l + sovEvm(uint64(l)) + l = m.Call.Size() + n += 1 + l + sovEvm(uint64(l)) + return n +} + +func (m *AccessControlType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AccessType != 0 { + n += 1 + sovEvm(uint64(m.AccessType)) + } + if len(m.AccessControlList) > 0 { + for _, s := range m.AccessControlList { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *ChainConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HomesteadBlock != nil { + l = m.HomesteadBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.DAOForkBlock != nil { + l = m.DAOForkBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.DAOForkSupport { + n += 2 + } + if m.EIP150Block != nil { + l = m.EIP150Block.Size() + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.EIP150Hash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.EIP155Block != nil { + l = m.EIP155Block.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.EIP158Block != nil { + l = m.EIP158Block.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.ByzantiumBlock != nil { + l = m.ByzantiumBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.ConstantinopleBlock != nil { + l = m.ConstantinopleBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.PetersburgBlock != nil { + l = m.PetersburgBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.IstanbulBlock != nil { + l = m.IstanbulBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.MuirGlacierBlock != nil { + l = m.MuirGlacierBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.BerlinBlock != nil { + l = m.BerlinBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.LondonBlock != nil { + l = m.LondonBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.ArrowGlacierBlock != nil { + l = m.ArrowGlacierBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.GrayGlacierBlock != nil { + l = m.GrayGlacierBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.MergeNetsplitBlock != nil { + l = m.MergeNetsplitBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.ShanghaiBlock != nil { + l = m.ShanghaiBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.CancunBlock != nil { + l = m.CancunBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + return n +} + +func (m *State) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + return n +} + +func (m *TransactionLogs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.Logs) > 0 { + for _, e := range m.Logs { + l = e.Size() + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *Log) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.Topics) > 0 { + for _, s := range m.Topics { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.BlockNumber != 0 { + n += 1 + sovEvm(uint64(m.BlockNumber)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.TxIndex != 0 { + n += 1 + sovEvm(uint64(m.TxIndex)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.Index != 0 { + n += 1 + sovEvm(uint64(m.Index)) + } + if m.Removed { + n += 2 + } + return n +} + +func (m *TxResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Bloom) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = m.TxLogs.Size() + n += 1 + l + sovEvm(uint64(l)) + l = len(m.Ret) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.Reverted { + n += 2 + } + if m.GasUsed != 0 { + n += 1 + sovEvm(uint64(m.GasUsed)) + } + return n +} + +func (m *AccessTuple) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.StorageKeys) > 0 { + for _, s := range m.StorageKeys { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *TraceConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Tracer) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Timeout) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.Reexec != 0 { + n += 1 + sovEvm(uint64(m.Reexec)) + } + if m.DisableStack { + n += 2 + } + if m.DisableStorage { + n += 2 + } + if m.Debug { + n += 2 + } + if m.Limit != 0 { + n += 1 + sovEvm(uint64(m.Limit)) + } + if m.Overrides != nil { + l = m.Overrides.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.EnableMemory { + n += 2 + } + if m.EnableReturnData { + n += 2 + } + l = len(m.TracerJsonConfig) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + return n +} + +func sovEvm(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvm(x uint64) (n int) { + return sovEvm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvmDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvmDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtraEIPs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExtraEIPs = append(m.ExtraEIPs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ChainConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowUnprotectedTxs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowUnprotectedTxs = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EVMChannels", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EVMChannels = append(m.EVMChannels, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessControl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AccessControl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveStaticPrecompiles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ActiveStaticPrecompiles = append(m.ActiveStaticPrecompiles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessControl) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessControl: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessControl: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Create", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Create.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Call", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Call.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessControlType) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessControlType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessControlType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessType", wireType) + } + m.AccessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccessType |= AccessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessControlList", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccessControlList = append(m.AccessControlList, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChainConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HomesteadBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.HomesteadBlock = &v + if err := m.HomesteadBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DAOForkBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.DAOForkBlock = &v + if err := m.DAOForkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DAOForkSupport", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DAOForkSupport = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP150Block", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.EIP150Block = &v + if err := m.EIP150Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP150Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EIP150Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP155Block", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.EIP155Block = &v + if err := m.EIP155Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP158Block", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.EIP158Block = &v + if err := m.EIP158Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByzantiumBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ByzantiumBlock = &v + if err := m.ByzantiumBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstantinopleBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ConstantinopleBlock = &v + if err := m.ConstantinopleBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PetersburgBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.PetersburgBlock = &v + if err := m.PetersburgBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IstanbulBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.IstanbulBlock = &v + if err := m.IstanbulBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MuirGlacierBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.MuirGlacierBlock = &v + if err := m.MuirGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BerlinBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.BerlinBlock = &v + if err := m.BerlinBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LondonBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.LondonBlock = &v + if err := m.LondonBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ArrowGlacierBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ArrowGlacierBlock = &v + if err := m.ArrowGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrayGlacierBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GrayGlacierBlock = &v + if err := m.GrayGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MergeNetsplitBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.MergeNetsplitBlock = &v + if err := m.MergeNetsplitBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShanghaiBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ShanghaiBlock = &v + if err := m.ShanghaiBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CancunBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.CancunBlock = &v + if err := m.CancunBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *State) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: State: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionLogs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionLogs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionLogs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = append(m.Logs, &Log{}) + if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Log) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Log: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Topics = append(m.Topics, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Removed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Removed = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TxResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bloom", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bloom = append(m.Bloom[:0], dAtA[iNdEx:postIndex]...) + if m.Bloom == nil { + m.Bloom = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxLogs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TxLogs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) + if m.Ret == nil { + m.Ret = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reverted", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Reverted = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessTuple) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessTuple: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessTuple: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageKeys = append(m.StorageKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tracer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tracer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timeout = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reexec", wireType) + } + m.Reexec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Reexec |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableStack", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableStack = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableStorage", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableStorage = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Debug = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Overrides == nil { + m.Overrides = &ChainConfig{} + } + if err := m.Overrides.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableMemory", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableMemory = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableReturnData", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableReturnData = bool(v != 0) + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TracerJsonConfig", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TracerJsonConfig = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvm(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvm + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvm + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvm + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvm = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvm = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvm = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/evm/types/genesis.go b/legacy/evm/types/genesis.go new file mode 100644 index 0000000..f3cc121 --- /dev/null +++ b/legacy/evm/types/genesis.go @@ -0,0 +1,51 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "fmt" + + "github.com/evmos/evmos/v20/types" +) + +// Validate performs a basic validation of a GenesisAccount fields. +func (ga GenesisAccount) Validate() error { + if err := types.ValidateAddress(ga.Address); err != nil { + return err + } + return ga.Storage.Validate() +} + +// DefaultGenesisState sets default evm genesis state with empty accounts and default params and +// chain config values. +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + Accounts: []GenesisAccount{}, + Params: DefaultParams(), + } +} + +// NewGenesisState creates a new genesis state. +func NewGenesisState(params Params, accounts []GenesisAccount) *GenesisState { + return &GenesisState{ + Accounts: accounts, + Params: params, + } +} + +// Validate performs basic genesis state validation returning an error upon any +// failure. +func (gs GenesisState) Validate() error { + seenAccounts := make(map[string]bool) + for _, acc := range gs.Accounts { + if seenAccounts[acc.Address] { + return fmt.Errorf("duplicated genesis account %s", acc.Address) + } + if err := acc.Validate(); err != nil { + return fmt.Errorf("invalid genesis account %s: %w", acc.Address, err) + } + seenAccounts[acc.Address] = true + } + + return gs.Params.Validate() +} diff --git a/legacy/evm/types/genesis.pb.go b/legacy/evm/types/genesis.pb.go new file mode 100644 index 0000000..64c04f2 --- /dev/null +++ b/legacy/evm/types/genesis.pb.go @@ -0,0 +1,683 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the evm module's genesis state. +type GenesisState struct { + // accounts is an array containing the ethereum genesis accounts. + Accounts []GenesisAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_9bcdec50cc9d156d, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetAccounts() []GenesisAccount { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// GenesisAccount defines an account to be initialized in the genesis state. +// Its main difference between with Geth's GenesisAccount is that it uses a +// custom storage type and that it doesn't contain the private key field. +type GenesisAccount struct { + // address defines an ethereum hex formated address of an account + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // code defines the hex bytes of the account code. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // storage defines the set of state key values for the account. + Storage Storage `protobuf:"bytes,3,rep,name=storage,proto3,castrepeated=Storage" json:"storage"` +} + +func (m *GenesisAccount) Reset() { *m = GenesisAccount{} } +func (m *GenesisAccount) String() string { return proto.CompactTextString(m) } +func (*GenesisAccount) ProtoMessage() {} +func (*GenesisAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_9bcdec50cc9d156d, []int{1} +} +func (m *GenesisAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisAccount.Merge(m, src) +} +func (m *GenesisAccount) XXX_Size() int { + return m.Size() +} +func (m *GenesisAccount) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisAccount proto.InternalMessageInfo + +func (m *GenesisAccount) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *GenesisAccount) GetCode() string { + if m != nil { + return m.Code + } + return "" +} + +func (m *GenesisAccount) GetStorage() Storage { + if m != nil { + return m.Storage + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "ethermint.evm.v1.GenesisState") + proto.RegisterType((*GenesisAccount)(nil), "ethermint.evm.v1.GenesisAccount") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/genesis.proto", fileDescriptor_9bcdec50cc9d156d) } + +var fileDescriptor_9bcdec50cc9d156d = []byte{ + // 321 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x2d, 0xcb, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, + 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xcb, 0xeb, 0xa5, + 0x96, 0xe5, 0xea, 0x95, 0x19, 0x4a, 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, + 0x22, 0x29, 0x29, 0x0c, 0x43, 0x40, 0x6a, 0x21, 0x72, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, + 0x3e, 0x88, 0x05, 0x11, 0x55, 0x9a, 0xc2, 0xc8, 0xc5, 0xe3, 0x0e, 0xb1, 0x28, 0xb8, 0x24, 0xb1, + 0x24, 0x55, 0xc8, 0x9d, 0x8b, 0x23, 0x31, 0x39, 0x39, 0xbf, 0x34, 0xaf, 0xa4, 0x58, 0x82, 0x51, + 0x81, 0x59, 0x83, 0xdb, 0x48, 0x41, 0x0f, 0xdd, 0x6a, 0x3d, 0xa8, 0x0e, 0x47, 0x88, 0x42, 0x27, + 0xce, 0x13, 0xf7, 0xe4, 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, 0xd7, 0x2c, 0x64, 0xcd, + 0xc5, 0x56, 0x90, 0x58, 0x94, 0x98, 0x5b, 0x2c, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0x81, + 0x69, 0x4c, 0x00, 0x58, 0x1e, 0x59, 0x3b, 0x54, 0x8b, 0x52, 0x3b, 0x23, 0x17, 0x1f, 0xaa, 0x25, + 0x42, 0x12, 0x5c, 0xec, 0x89, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0x20, 0x77, 0x31, 0x6a, 0x70, 0x06, + 0xc1, 0xb8, 0x42, 0x42, 0x5c, 0x2c, 0xc9, 0xf9, 0x29, 0xa9, 0x60, 0x7b, 0x38, 0x83, 0xc0, 0x6c, + 0x21, 0x77, 0x2e, 0xf6, 0xe2, 0x92, 0xfc, 0xa2, 0xc4, 0xf4, 0x54, 0x09, 0x66, 0xb0, 0x2f, 0xc4, + 0x31, 0xad, 0x07, 0x7b, 0xd8, 0x49, 0x04, 0x64, 0xfb, 0xaa, 0xfb, 0xf2, 0xec, 0xc1, 0x10, 0xf5, + 0x10, 0x87, 0xc0, 0x74, 0x3b, 0x39, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, + 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, + 0x94, 0x5a, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0x28, 0x98, 0xf3, 0x8b, + 0xa1, 0x64, 0x99, 0x91, 0x81, 0x7e, 0x05, 0x38, 0xfc, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, + 0xc0, 0x21, 0x6d, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe2, 0xca, 0x72, 0xe8, 0xe2, 0x01, 0x00, + 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GenesisAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Storage) > 0 { + for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *GenesisAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.Storage) > 0 { + for _, e := range m.Storage { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, GenesisAccount{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Storage = append(m.Storage, State{}) + if err := m.Storage[len(m.Storage)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/evm/types/genesis_test.go b/legacy/evm/types/genesis_test.go new file mode 100644 index 0000000..8a0f1a3 --- /dev/null +++ b/legacy/evm/types/genesis_test.go @@ -0,0 +1,225 @@ +package types + +import ( + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/suite" + + "github.com/evmos/evmos/v20/crypto/ethsecp256k1" +) + +type GenesisTestSuite struct { + suite.Suite + + address string + hash common.Hash + code string +} + +func (suite *GenesisTestSuite) SetupTest() { + priv, err := ethsecp256k1.GenerateKey() + suite.Require().NoError(err) + + suite.address = common.BytesToAddress(priv.PubKey().Address().Bytes()).String() + suite.hash = common.BytesToHash([]byte("hash")) + suite.code = common.Bytes2Hex([]byte{1, 2, 3}) +} + +func TestGenesisTestSuite(t *testing.T) { + suite.Run(t, new(GenesisTestSuite)) +} + +func (suite *GenesisTestSuite) TestValidateGenesisAccount() { + testCases := []struct { + name string + genesisAccount GenesisAccount + expPass bool + }{ + { + "valid genesis account", + GenesisAccount{ + Address: suite.address, + Code: suite.code, + Storage: Storage{ + NewState(suite.hash, suite.hash), + }, + }, + true, + }, + { + "empty account address bytes", + GenesisAccount{ + Address: "", + Code: suite.code, + Storage: Storage{ + NewState(suite.hash, suite.hash), + }, + }, + false, + }, + { + "empty code bytes", + GenesisAccount{ + Address: suite.address, + Code: "", + Storage: Storage{ + NewState(suite.hash, suite.hash), + }, + }, + true, + }, + } + + for _, tc := range testCases { + tc := tc + err := tc.genesisAccount.Validate() + if tc.expPass { + suite.Require().NoError(err, tc.name) + } else { + suite.Require().Error(err, tc.name) + } + } +} + +func (suite *GenesisTestSuite) TestValidateGenesis() { + testCases := []struct { + name string + genState *GenesisState + expPass bool + }{ + { + name: "default", + genState: DefaultGenesisState(), + expPass: true, + }, + { + name: "valid genesis", + genState: &GenesisState{ + Accounts: []GenesisAccount{ + { + Address: suite.address, + + Code: suite.code, + Storage: Storage{ + {Key: suite.hash.String()}, + }, + }, + }, + Params: DefaultParams(), + }, + expPass: true, + }, + { + name: "empty genesis", + genState: &GenesisState{}, + expPass: false, + }, + { + name: "copied genesis", + genState: NewGenesisState(DefaultGenesisState().Params, DefaultGenesisState().Accounts), + expPass: true, + }, + { + name: "invalid genesis", + genState: &GenesisState{ + Accounts: []GenesisAccount{ + { + Address: common.Address{}.String(), + }, + }, + }, + expPass: false, + }, + { + name: "invalid genesis account", + genState: &GenesisState{ + Accounts: []GenesisAccount{ + { + Address: "123456", + + Code: suite.code, + Storage: Storage{ + {Key: suite.hash.String()}, + }, + }, + }, + Params: DefaultParams(), + }, + expPass: false, + }, + { + name: "duplicated genesis account", + genState: &GenesisState{ + Accounts: []GenesisAccount{ + { + Address: suite.address, + + Code: suite.code, + Storage: Storage{ + NewState(suite.hash, suite.hash), + }, + }, + { + Address: suite.address, + + Code: suite.code, + Storage: Storage{ + NewState(suite.hash, suite.hash), + }, + }, + }, + }, + expPass: false, + }, + { + name: "duplicated tx log", + genState: &GenesisState{ + Accounts: []GenesisAccount{ + { + Address: suite.address, + + Code: suite.code, + Storage: Storage{ + {Key: suite.hash.String()}, + }, + }, + }, + }, + expPass: false, + }, + { + name: "invalid tx log", + genState: &GenesisState{ + Accounts: []GenesisAccount{ + { + Address: suite.address, + + Code: suite.code, + Storage: Storage{ + {Key: suite.hash.String()}, + }, + }, + }, + }, + expPass: false, + }, + { + name: "invalid params", + genState: &GenesisState{ + Params: Params{}, + }, + expPass: false, + }, + } + + for _, tc := range testCases { + tc := tc + err := tc.genState.Validate() + if tc.expPass { + suite.Require().NoError(err, tc.name) + } else { + suite.Require().Error(err, tc.name) + } + } +} diff --git a/legacy/evm/types/interfaces.go b/legacy/evm/types/interfaces.go new file mode 100644 index 0000000..7a8bf43 --- /dev/null +++ b/legacy/evm/types/interfaces.go @@ -0,0 +1,69 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + context "context" + "math/big" + + "cosmossdk.io/core/address" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/ethereum/go-ethereum/common" + + 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" + "github.com/evmos/evmos/v20/x/evm/core/vm" + + feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" +) + +// AccountKeeper defines the expected account keeper interface +type AccountKeeper interface { + NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAddress(moduleName string) sdk.AccAddress + IterateAccounts(ctx context.Context, cb func(account sdk.AccountI) bool) + 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) + GetSequence(ctx context.Context, account sdk.AccAddress) (uint64, error) + AddressCodec() address.Codec +} + +// BankKeeper defines the expected interface needed to retrieve account balances. +type BankKeeper interface { + authtypes.BankKeeper + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error +} + +// StakingKeeper returns the historical headers kept in store. +type StakingKeeper interface { + GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, error) + GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (stakingtypes.Validator, error) + ValidatorAddressCodec() address.Codec +} + +// FeeMarketKeeper +type FeeMarketKeeper interface { + GetBaseFee(ctx sdk.Context) *big.Int + GetParams(ctx sdk.Context) feemarkettypes.Params + CalculateBaseFee(ctx sdk.Context) *big.Int +} + +// Erc20Keeper defines the expected interface needed to instantiate ERC20 precompiles. +type Erc20Keeper interface { + GetERC20PrecompileInstance(ctx sdk.Context, address common.Address) (contract vm.PrecompiledContract, found bool, err error) +} + +type ( + LegacyParams = paramtypes.ParamSet + // Subspace defines an interface that implements the legacy Cosmos SDK x/params Subspace type. + // NOTE: This is used solely for migration of the Cosmos SDK x/params managed parameters. + Subspace interface { + GetParamSetIfExists(ctx sdk.Context, ps LegacyParams) + } +) diff --git a/legacy/evm/types/key.go b/legacy/evm/types/key.go new file mode 100644 index 0000000..2b35d6b --- /dev/null +++ b/legacy/evm/types/key.go @@ -0,0 +1,64 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "github.com/ethereum/go-ethereum/common" +) + +const ( + // ModuleName string name of module + ModuleName = "evm" + + // StoreKey key for ethereum storage data, account code (StateDB) or block + // related data for Web3. + // The EVM module should use a prefix store. + StoreKey = ModuleName + + // TransientKey is the key to access the EVM transient store, that is reset + // during the Commit phase. + TransientKey = "transient_" + ModuleName + + // RouterKey uses module name for routing + RouterKey = ModuleName +) + +// prefix bytes for the EVM persistent store +const ( + prefixCode = iota + 1 + prefixStorage + prefixParams +) + +// prefix bytes for the EVM transient store +const ( + prefixTransientBloom = iota + 1 + prefixTransientTxIndex + prefixTransientLogSize + prefixTransientGasUsed +) + +// KVStore key prefixes +var ( + KeyPrefixCode = []byte{prefixCode} + KeyPrefixStorage = []byte{prefixStorage} + KeyPrefixParams = []byte{prefixParams} +) + +// Transient Store key prefixes +var ( + KeyPrefixTransientBloom = []byte{prefixTransientBloom} + KeyPrefixTransientTxIndex = []byte{prefixTransientTxIndex} + KeyPrefixTransientLogSize = []byte{prefixTransientLogSize} + KeyPrefixTransientGasUsed = []byte{prefixTransientGasUsed} +) + +// AddressStoragePrefix returns a prefix to iterate over a given account storage. +func AddressStoragePrefix(address common.Address) []byte { + return append(KeyPrefixStorage, address.Bytes()...) +} + +// StateKey defines the full key under which an account state is stored. +func StateKey(address common.Address, key []byte) []byte { + return append(AddressStoragePrefix(address), key...) +} diff --git a/legacy/evm/types/legacy_tx.go b/legacy/evm/types/legacy_tx.go new file mode 100644 index 0000000..fe1969b --- /dev/null +++ b/legacy/evm/types/legacy_tx.go @@ -0,0 +1,229 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math/big" + + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + + errorsmod "cosmossdk.io/errors" + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/evmos/evmos/v20/types" + ethutils "github.com/evmos/evmos/v20/utils/eth" +) + +func NewLegacyTx(tx *ethtypes.Transaction) (*LegacyTx, error) { + txData := &LegacyTx{ + Nonce: tx.Nonce(), + Data: tx.Data(), + GasLimit: tx.Gas(), + } + + v, r, s := tx.RawSignatureValues() + if to := tx.To(); to != nil { + txData.To = to.Hex() + } + + if tx.Value() != nil { + amountInt, err := types.SafeNewIntFromBigInt(tx.Value()) + if err != nil { + return nil, err + } + txData.Amount = &amountInt + } + + if tx.GasPrice() != nil { + gasPriceInt, err := types.SafeNewIntFromBigInt(tx.GasPrice()) + if err != nil { + return nil, err + } + txData.GasPrice = &gasPriceInt + } + + txData.SetSignatureValues(tx.ChainId(), v, r, s) + return txData, nil +} + +// TxType returns the tx type +func (tx *LegacyTx) TxType() uint8 { + return ethtypes.LegacyTxType +} + +// Copy returns an instance with the same field values +func (tx *LegacyTx) Copy() TxData { + return &LegacyTx{ + Nonce: tx.Nonce, + GasPrice: tx.GasPrice, + GasLimit: tx.GasLimit, + To: tx.To, + Amount: tx.Amount, + Data: common.CopyBytes(tx.Data), + V: common.CopyBytes(tx.V), + R: common.CopyBytes(tx.R), + S: common.CopyBytes(tx.S), + } +} + +// GetChainID returns the chain id field from the derived signature values +func (tx *LegacyTx) GetChainID() *big.Int { + v, _, _ := tx.GetRawSignatureValues() + return ethutils.DeriveChainID(v) +} + +// GetAccessList returns nil +func (tx *LegacyTx) GetAccessList() ethtypes.AccessList { + return nil +} + +// GetData returns the a copy of the input data bytes. +func (tx *LegacyTx) GetData() []byte { + return common.CopyBytes(tx.Data) +} + +// GetGas returns the gas limit. +func (tx *LegacyTx) GetGas() uint64 { + return tx.GasLimit +} + +// GetGasPrice returns the gas price field. +func (tx *LegacyTx) GetGasPrice() *big.Int { + if tx.GasPrice == nil { + return nil + } + return tx.GasPrice.BigInt() +} + +// GetGasTipCap returns the gas price field. +func (tx *LegacyTx) GetGasTipCap() *big.Int { + return tx.GetGasPrice() +} + +// GetGasFeeCap returns the gas price field. +func (tx *LegacyTx) GetGasFeeCap() *big.Int { + return tx.GetGasPrice() +} + +// GetValue returns the tx amount. +func (tx *LegacyTx) GetValue() *big.Int { + if tx.Amount == nil { + return nil + } + return tx.Amount.BigInt() +} + +// GetNonce returns the account sequence for the transaction. +func (tx *LegacyTx) GetNonce() uint64 { return tx.Nonce } + +// GetTo returns the pointer to the recipient address. +func (tx *LegacyTx) GetTo() *common.Address { + if tx.To == "" { + return nil + } + to := common.HexToAddress(tx.To) + return &to +} + +// AsEthereumData returns an LegacyTx transaction tx from the proto-formatted +// TxData defined on the Cosmos EVM. +func (tx *LegacyTx) AsEthereumData() ethtypes.TxData { + v, r, s := tx.GetRawSignatureValues() + return ðtypes.LegacyTx{ + Nonce: tx.GetNonce(), + GasPrice: tx.GetGasPrice(), + Gas: tx.GetGas(), + To: tx.GetTo(), + Value: 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) +} + +// SetSignatureValues sets the signature values to the transaction. +func (tx *LegacyTx) SetSignatureValues(_, v, r, s *big.Int) { + if v != nil { + tx.V = v.Bytes() + } + if r != nil { + tx.R = r.Bytes() + } + if s != nil { + tx.S = s.Bytes() + } +} + +// Validate performs a stateless validation of the tx fields. +func (tx LegacyTx) Validate() error { + gasPrice := tx.GetGasPrice() + if gasPrice == nil { + return errorsmod.Wrap(ErrInvalidGasPrice, "gas price cannot be nil") + } + + if gasPrice.Sign() == -1 { + return errorsmod.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice) + } + if !types.IsValidInt256(gasPrice) { + return errorsmod.Wrap(ErrInvalidGasPrice, "out of bound") + } + if !types.IsValidInt256(tx.Fee()) { + return errorsmod.Wrap(ErrInvalidGasFee, "out of bound") + } + + amount := tx.GetValue() + // Amount can be 0 + if amount != nil && amount.Sign() == -1 { + return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount) + } + if !types.IsValidInt256(amount) { + return errorsmod.Wrap(ErrInvalidAmount, "out of bound") + } + + if tx.To != "" { + if err := types.ValidateAddress(tx.To); err != nil { + return errorsmod.Wrap(err, "invalid to address") + } + } + + if tx.GetChainID() == nil { + return errorsmod.Wrap( + errortypes.ErrInvalidChainID, + "chain ID must be derived from LegacyTx txs", + ) + } + + return nil +} + +// Fee returns gasprice * gaslimit. +func (tx LegacyTx) Fee() *big.Int { + return fee(tx.GetGasPrice(), tx.GetGas()) +} + +// Cost returns amount + gasprice * gaslimit. +func (tx LegacyTx) Cost() *big.Int { + return cost(tx.Fee(), tx.GetValue()) +} + +// EffectiveGasPrice is the same as GasPrice for LegacyTx +func (tx LegacyTx) EffectiveGasPrice(_ *big.Int) *big.Int { + return tx.GetGasPrice() +} + +// EffectiveFee is the same as Fee for LegacyTx +func (tx LegacyTx) EffectiveFee(_ *big.Int) *big.Int { + return tx.Fee() +} + +// EffectiveCost is the same as Cost for LegacyTx +func (tx LegacyTx) EffectiveCost(_ *big.Int) *big.Int { + return tx.Cost() +} diff --git a/legacy/evm/types/legacy_tx_test.go b/legacy/evm/types/legacy_tx_test.go new file mode 100644 index 0000000..1b0eab8 --- /dev/null +++ b/legacy/evm/types/legacy_tx_test.go @@ -0,0 +1,434 @@ +package types_test + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/evmos/evmos/v20/x/evm/types" +) + +func (suite *TxDataTestSuite) TestNewLegacyTx() { + testCases := []struct { + name string + tx *ethtypes.Transaction + }{ + { + "non-empty Transaction", + ethtypes.NewTx(ðtypes.AccessListTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + Value: big.NewInt(1), + AccessList: ethtypes.AccessList{}, + To: &suite.addr, + V: big.NewInt(1), + R: big.NewInt(1), + S: big.NewInt(1), + }), + }, + } + + for _, tc := range testCases { + tx, err := types.NewLegacyTx(tc.tx) + suite.Require().NoError(err) + + suite.Require().NotEmpty(tc.tx) + suite.Require().Equal(uint8(0), tx.TxType()) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxTxType() { + tx := types.LegacyTx{} + actual := tx.TxType() + + suite.Require().Equal(uint8(0), actual) +} + +func (suite *TxDataTestSuite) TestLegacyTxCopy() { + tx := &types.LegacyTx{} + txData := tx.Copy() + + suite.Require().Equal(&types.LegacyTx{}, txData) + // TODO: Test for different pointers +} + +func (suite *TxDataTestSuite) TestLegacyTxGetChainID() { + tx := types.LegacyTx{} + actual := tx.GetChainID() + + suite.Require().Nil(actual) +} + +func (suite *TxDataTestSuite) TestLegacyTxGetAccessList() { + tx := types.LegacyTx{} + actual := tx.GetAccessList() + + suite.Require().Nil(actual) +} + +func (suite *TxDataTestSuite) TestLegacyTxGetData() { + testCases := []struct { + name string + tx types.LegacyTx + }{ + { + "non-empty transaction", + types.LegacyTx{ + Data: nil, + }, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetData() + + suite.Require().Equal(tc.tx.Data, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxGetGas() { + testCases := []struct { + name string + tx types.LegacyTx + exp uint64 + }{ + { + "non-empty gas", + types.LegacyTx{ + GasLimit: suite.uint64, + }, + suite.uint64, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGas() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxGetGasPrice() { + testCases := []struct { + name string + tx types.LegacyTx + exp *big.Int + }{ + { + "empty gasPrice", + types.LegacyTx{ + GasPrice: nil, + }, + nil, + }, + { + "non-empty gasPrice", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasFeeCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxGetGasTipCap() { + testCases := []struct { + name string + tx types.LegacyTx + exp *big.Int + }{ + { + "non-empty gasPrice", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasTipCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxGetGasFeeCap() { + testCases := []struct { + name string + tx types.LegacyTx + exp *big.Int + }{ + { + "non-empty gasPrice", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasFeeCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxGetValue() { + testCases := []struct { + name string + tx types.LegacyTx + exp *big.Int + }{ + { + "empty amount", + types.LegacyTx{ + Amount: nil, + }, + nil, + }, + { + "non-empty amount", + types.LegacyTx{ + Amount: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetValue() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxGetNonce() { + testCases := []struct { + name string + tx types.LegacyTx + exp uint64 + }{ + { + "none-empty nonce", + types.LegacyTx{ + Nonce: suite.uint64, + }, + suite.uint64, + }, + } + for _, tc := range testCases { + actual := tc.tx.GetNonce() + + suite.Require().Equal(tc.exp, actual) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxGetTo() { + testCases := []struct { + name string + tx types.LegacyTx + exp *common.Address + }{ + { + "empty address", + types.LegacyTx{ + To: "", + }, + nil, + }, + { + "non-empty address", + types.LegacyTx{ + To: suite.hexAddr, + }, + &suite.addr, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetTo() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxAsEthereumData() { + tx := &types.LegacyTx{} + txData := tx.AsEthereumData() + + suite.Require().Equal(ðtypes.LegacyTx{}, txData) +} + +func (suite *TxDataTestSuite) TestLegacyTxSetSignatureValues() { + testCases := []struct { + name string + v *big.Int + r *big.Int + s *big.Int + }{ + { + "non-empty values", + suite.bigInt, + suite.bigInt, + suite.bigInt, + }, + } + for _, tc := range testCases { + tx := &types.LegacyTx{} + tx.SetSignatureValues(nil, tc.v, tc.r, tc.s) + + v, r, s := tx.GetRawSignatureValues() + + suite.Require().Equal(tc.v, v, tc.name) + suite.Require().Equal(tc.r, r, tc.name) + suite.Require().Equal(tc.s, s, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxValidate() { + testCases := []struct { + name string + tx types.LegacyTx + expError bool + }{ + { + "empty", + types.LegacyTx{}, + true, + }, + { + "gas price is nil", + types.LegacyTx{ + GasPrice: nil, + }, + true, + }, + { + "gas price is negative", + types.LegacyTx{ + GasPrice: &suite.sdkMinusOneInt, + }, + true, + }, + { + "amount is negative", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + Amount: &suite.sdkMinusOneInt, + }, + true, + }, + { + "to address is invalid", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.invalidAddr, + }, + true, + }, + } + + for _, tc := range testCases { + err := tc.tx.Validate() + + if tc.expError { + suite.Require().Error(err, tc.name) + continue + } + + suite.Require().NoError(err, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxEffectiveGasPrice() { + testCases := []struct { + name string + tx types.LegacyTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty legacy tx", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveGasPrice(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxEffectiveFee() { + testCases := []struct { + name string + tx types.LegacyTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty legacy tx", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + GasLimit: uint64(1), + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveFee(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxEffectiveCost() { + testCases := []struct { + name string + tx types.LegacyTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty legacy tx", + types.LegacyTx{ + GasPrice: &suite.sdkInt, + GasLimit: uint64(1), + Amount: &suite.sdkZeroInt, + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveCost(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *TxDataTestSuite) TestLegacyTxFeeCost() { + tx := &types.LegacyTx{} + + suite.Require().Panics(func() { tx.Fee() }, "should panic") + suite.Require().Panics(func() { tx.Cost() }, "should panic") +} diff --git a/legacy/evm/types/logs.go b/legacy/evm/types/logs.go new file mode 100644 index 0000000..9fa1484 --- /dev/null +++ b/legacy/evm/types/logs.go @@ -0,0 +1,129 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "errors" + "fmt" + + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + evmostypes "github.com/evmos/evmos/v20/types" +) + +// NewTransactionLogs creates a new NewTransactionLogs instance. +func NewTransactionLogs(hash common.Hash, logs []*Log) TransactionLogs { + return TransactionLogs{ + Hash: hash.String(), + Logs: logs, + } +} + +// NewTransactionLogsFromEth creates a new NewTransactionLogs instance using []*ethtypes.Log. +func NewTransactionLogsFromEth(hash common.Hash, ethlogs []*ethtypes.Log) TransactionLogs { + return TransactionLogs{ + Hash: hash.String(), + Logs: NewLogsFromEth(ethlogs), + } +} + +// Validate performs a basic validation of a GenesisAccount fields. +func (tx TransactionLogs) Validate() error { + if evmostypes.IsEmptyHash(tx.Hash) { + return fmt.Errorf("hash cannot be the empty %s", tx.Hash) + } + + for i, log := range tx.Logs { + if log == nil { + return fmt.Errorf("log %d cannot be nil", i) + } + if err := log.Validate(); err != nil { + return fmt.Errorf("invalid log %d: %w", i, err) + } + if log.TxHash != tx.Hash { + return fmt.Errorf("log tx hash mismatch (%s ≠ %s)", log.TxHash, tx.Hash) + } + } + return nil +} + +// EthLogs returns the Ethereum type Logs from the Transaction Logs. +func (tx TransactionLogs) EthLogs() []*ethtypes.Log { + return LogsToEthereum(tx.Logs) +} + +// Validate performs a basic validation of an ethereum Log fields. +func (log *Log) Validate() error { + if err := evmostypes.ValidateAddress(log.Address); err != nil { + return fmt.Errorf("invalid log address %w", err) + } + if evmostypes.IsEmptyHash(log.BlockHash) { + return fmt.Errorf("block hash cannot be the empty %s", log.BlockHash) + } + if log.BlockNumber == 0 { + return errors.New("block number cannot be zero") + } + if evmostypes.IsEmptyHash(log.TxHash) { + return fmt.Errorf("tx hash cannot be the empty %s", log.TxHash) + } + return nil +} + +// ToEthereum returns the Ethereum type Log from a Ethermint proto compatible Log. +func (log *Log) ToEthereum() *ethtypes.Log { + topics := make([]common.Hash, len(log.Topics)) + for i, topic := range log.Topics { + topics[i] = common.HexToHash(topic) + } + + return ðtypes.Log{ + Address: common.HexToAddress(log.Address), + Topics: topics, + Data: log.Data, + BlockNumber: log.BlockNumber, + TxHash: common.HexToHash(log.TxHash), + TxIndex: uint(log.TxIndex), + Index: uint(log.Index), + BlockHash: common.HexToHash(log.BlockHash), + Removed: log.Removed, + } +} + +func NewLogsFromEth(ethlogs []*ethtypes.Log) []*Log { + var logs []*Log //nolint: prealloc + for _, ethlog := range ethlogs { + logs = append(logs, NewLogFromEth(ethlog)) + } + + return logs +} + +// LogsToEthereum casts the Ethermint Logs to a slice of Ethereum Logs. +func LogsToEthereum(logs []*Log) []*ethtypes.Log { + var ethLogs []*ethtypes.Log //nolint: prealloc + for i := range logs { + ethLogs = append(ethLogs, logs[i].ToEthereum()) + } + return ethLogs +} + +// NewLogFromEth creates a new Log instance from a Ethereum type Log. +func NewLogFromEth(log *ethtypes.Log) *Log { + topics := make([]string, len(log.Topics)) + for i, topic := range log.Topics { + topics[i] = topic.String() + } + + return &Log{ + Address: log.Address.String(), + Topics: topics, + Data: log.Data, + BlockNumber: log.BlockNumber, + TxHash: log.TxHash.String(), + TxIndex: uint64(log.TxIndex), + Index: uint64(log.Index), + BlockHash: log.BlockHash.String(), + Removed: log.Removed, + } +} diff --git a/legacy/evm/types/logs_test.go b/legacy/evm/types/logs_test.go new file mode 100644 index 0000000..8a87558 --- /dev/null +++ b/legacy/evm/types/logs_test.go @@ -0,0 +1,201 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + utiltx "github.com/evmos/evmos/v20/testutil/tx" + "github.com/evmos/evmos/v20/x/evm/types" + + "github.com/ethereum/go-ethereum/common" +) + +func TestTransactionLogsValidate(t *testing.T) { + addr := utiltx.GenerateAddress().String() + + testCases := []struct { + name string + txLogs types.TransactionLogs + expPass bool + }{ + { + "valid log", + types.TransactionLogs{ + Hash: common.BytesToHash([]byte("tx_hash")).String(), + Logs: []*types.Log{ + { + Address: addr, + Topics: []string{common.BytesToHash([]byte("topic")).String()}, + Data: []byte("data"), + BlockNumber: 1, + TxHash: common.BytesToHash([]byte("tx_hash")).String(), + TxIndex: 1, + BlockHash: common.BytesToHash([]byte("block_hash")).String(), + Index: 1, + Removed: false, + }, + }, + }, + true, + }, + { + "empty hash", + types.TransactionLogs{ + Hash: common.Hash{}.String(), + }, + false, + }, + { + "nil log", + types.TransactionLogs{ + Hash: common.BytesToHash([]byte("tx_hash")).String(), + Logs: []*types.Log{nil}, + }, + false, + }, + { + "invalid log", + types.TransactionLogs{ + Hash: common.BytesToHash([]byte("tx_hash")).String(), + Logs: []*types.Log{{}}, + }, + false, + }, + { + "hash mismatch log", + types.TransactionLogs{ + Hash: common.BytesToHash([]byte("tx_hash")).String(), + Logs: []*types.Log{ + { + Address: addr, + Topics: []string{common.BytesToHash([]byte("topic")).String()}, + Data: []byte("data"), + BlockNumber: 1, + TxHash: common.BytesToHash([]byte("other_hash")).String(), + TxIndex: 1, + BlockHash: common.BytesToHash([]byte("block_hash")).String(), + Index: 1, + Removed: false, + }, + }, + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + err := tc.txLogs.Validate() + if tc.expPass { + require.NoError(t, err, tc.name) + } else { + require.Error(t, err, tc.name) + } + } +} + +func TestValidateLog(t *testing.T) { + addr := utiltx.GenerateAddress().String() + + testCases := []struct { + name string + log *types.Log + expPass bool + }{ + { + "valid log", + &types.Log{ + Address: addr, + Topics: []string{common.BytesToHash([]byte("topic")).String()}, + Data: []byte("data"), + BlockNumber: 1, + TxHash: common.BytesToHash([]byte("tx_hash")).String(), + TxIndex: 1, + BlockHash: common.BytesToHash([]byte("block_hash")).String(), + Index: 1, + Removed: false, + }, + true, + }, + { + "empty log", &types.Log{}, false, + }, + { + "zero address", + &types.Log{ + Address: common.Address{}.String(), + }, + false, + }, + { + "empty block hash", + &types.Log{ + Address: addr, + BlockHash: common.Hash{}.String(), + }, + false, + }, + { + "zero block number", + &types.Log{ + Address: addr, + BlockHash: common.BytesToHash([]byte("block_hash")).String(), + BlockNumber: 0, + }, + false, + }, + { + "empty tx hash", + &types.Log{ + Address: addr, + BlockHash: common.BytesToHash([]byte("block_hash")).String(), + BlockNumber: 1, + TxHash: common.Hash{}.String(), + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + err := tc.log.Validate() + if tc.expPass { + require.NoError(t, err, tc.name) + } else { + require.Error(t, err, tc.name) + } + } +} + +func TestConversionFunctions(t *testing.T) { + addr := utiltx.GenerateAddress().String() + + txLogs := types.TransactionLogs{ + Hash: common.BytesToHash([]byte("tx_hash")).String(), + Logs: []*types.Log{ + { + Address: addr, + Topics: []string{common.BytesToHash([]byte("topic")).String()}, + Data: []byte("data"), + BlockNumber: 1, + TxHash: common.BytesToHash([]byte("tx_hash")).String(), + TxIndex: 1, + BlockHash: common.BytesToHash([]byte("block_hash")).String(), + Index: 1, + Removed: false, + }, + }, + } + + // convert valid log to eth logs and back (and validate) + conversionLogs := types.NewTransactionLogsFromEth(common.BytesToHash([]byte("tx_hash")), txLogs.EthLogs()) + conversionErr := conversionLogs.Validate() + + // create new transaction logs as copy of old valid one (and validate) + copyLogs := types.NewTransactionLogs(common.BytesToHash([]byte("tx_hash")), txLogs.Logs) + copyErr := copyLogs.Validate() + + require.Nil(t, conversionErr) + require.Nil(t, copyErr) +} diff --git a/legacy/evm/types/msg.go b/legacy/evm/types/msg.go new file mode 100644 index 0000000..e60fe24 --- /dev/null +++ b/legacy/evm/types/msg.go @@ -0,0 +1,377 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "errors" + "fmt" + "math/big" + + protov2 "google.golang.org/protobuf/proto" + + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + 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" + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + + evmapi "github.com/evmos/evmos/v20/api/ethermint/evm/v1" + "github.com/evmos/evmos/v20/types" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + ethtypes "github.com/ethereum/go-ethereum/core/types" +) + +var ( + _ sdk.Msg = &MsgEthereumTx{} + _ sdk.Tx = &MsgEthereumTx{} + _ ante.GasTx = &MsgEthereumTx{} + _ sdk.Msg = &MsgUpdateParams{} + + _ 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: evmapi.GetSigners, +} + +// NewTx returns a reference to a new Ethereum transaction message. +func NewTx( + tx *EvmTxArgs, +) *MsgEthereumTx { + return newMsgEthereumTx(tx) +} + +func newMsgEthereumTx( + tx *EvmTxArgs, +) *MsgEthereumTx { + var ( + cid, amt, gp *sdkmath.Int + toAddr string + txData TxData + ) + + if tx.To != nil { + toAddr = tx.To.Hex() + } + + if tx.Amount != nil { + amountInt := sdkmath.NewIntFromBigInt(tx.Amount) + amt = &amountInt + } + + if tx.ChainID != nil { + chainIDInt := sdkmath.NewIntFromBigInt(tx.ChainID) + cid = &chainIDInt + } + + if tx.GasPrice != nil { + gasPriceInt := sdkmath.NewIntFromBigInt(tx.GasPrice) + gp = &gasPriceInt + } + + switch { + case tx.GasFeeCap != nil: + gtc := sdkmath.NewIntFromBigInt(tx.GasTipCap) + gfc := sdkmath.NewIntFromBigInt(tx.GasFeeCap) + + txData = &DynamicFeeTx{ + ChainID: cid, + Amount: amt, + To: toAddr, + GasTipCap: >c, + GasFeeCap: &gfc, + Nonce: tx.Nonce, + GasLimit: tx.GasLimit, + Data: tx.Input, + Accesses: NewAccessList(tx.Accesses), + } + case tx.Accesses != nil: + txData = &AccessListTx{ + ChainID: cid, + Nonce: tx.Nonce, + To: toAddr, + Amount: amt, + GasLimit: tx.GasLimit, + GasPrice: gp, + Data: tx.Input, + Accesses: NewAccessList(tx.Accesses), + } + default: + txData = &LegacyTx{ + To: toAddr, + Amount: amt, + GasPrice: gp, + Nonce: tx.Nonce, + GasLimit: tx.GasLimit, + Data: tx.Input, + } + } + + dataAny, err := PackTxData(txData) + if err != nil { + panic(err) + } + + msg := MsgEthereumTx{Data: dataAny} + msg.Hash = msg.AsTransaction().Hash().Hex() + return &msg +} + +// FromEthereumTx populates the message fields from the given ethereum transaction +func (msg *MsgEthereumTx) FromEthereumTx(tx *ethtypes.Transaction) error { + txData, err := NewTxDataFromTx(tx) + if err != nil { + return err + } + + anyTxData, err := PackTxData(txData) + if err != nil { + return err + } + + msg.Data = anyTxData + msg.Hash = tx.Hash().Hex() + return nil +} + +// Route returns the route value of an MsgEthereumTx. +func (msg MsgEthereumTx) Route() string { return RouterKey } + +// Type returns the type value of an MsgEthereumTx. +func (msg MsgEthereumTx) Type() string { return TypeMsgEthereumTx } + +// ValidateBasic implements the sdk.Msg interface. It performs basic validation +// checks of a Transaction. If returns an error if validation fails. +func (msg MsgEthereumTx) ValidateBasic() error { + if msg.From != "" { + if err := types.ValidateAddress(msg.From); err != nil { + return errorsmod.Wrap(err, "invalid from address") + } + } + + // Validate Size_ field, should be kept empty + if msg.Size_ != 0 { + return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "tx size is deprecated") + } + + txData, err := UnpackTxData(msg.Data) + if err != nil { + return errorsmod.Wrap(err, "failed to unpack tx data") + } + + gas := txData.GetGas() + + // prevent txs with 0 gas to fill up the mempool + if gas == 0 { + return errorsmod.Wrap(ErrInvalidGasLimit, "gas limit must not be zero") + } + + // prevent gas limit from overflow + if g := new(big.Int).SetUint64(gas); !g.IsInt64() { + return errorsmod.Wrap(ErrGasOverflow, "gas limit must be less than math.MaxInt64") + } + + if err := txData.Validate(); err != nil { + return err + } + + // Validate Hash field after validated txData to avoid panic + txHash := msg.AsTransaction().Hash().Hex() + if msg.Hash != txHash { + return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "invalid tx hash %s, expected: %s", msg.Hash, txHash) + } + + return nil +} + +// GetMsgs returns a single MsgEthereumTx as an sdk.Msg. +func (msg *MsgEthereumTx) GetMsgs() []sdk.Msg { + return []sdk.Msg{msg} +} + +func (msg *MsgEthereumTx) GetMsgsV2() ([]protov2.Message, error) { + return nil, errors.New("not implemented") +} + +// GetSignBytes returns the Amino bytes of an Ethereum transaction message used +// for signing. +// +// NOTE: This method cannot be used as a chain ID is needed to create valid bytes +// to sign over. Use 'RLPSignBytes' instead. +func (msg MsgEthereumTx) GetSignBytes() []byte { + panic("must use 'RLPSignBytes' with a chain ID to get the valid bytes to sign") +} + +// Sign calculates a secp256k1 ECDSA signature and signs the transaction. It +// takes a keyring signer and the chainID to sign an Ethereum transaction according to +// EIP155 standard. +// This method mutates the transaction as it populates the V, R, S +// fields of the Transaction's Signature. +// The function will fail if the sender address is not defined for the msg or if +// the sender is not registered on the keyring +func (msg *MsgEthereumTx) Sign(ethSigner ethtypes.Signer, keyringSigner keyring.Signer) error { + from := msg.GetFrom() + if from.Empty() { + return fmt.Errorf("sender address not defined for message") + } + + tx := msg.AsTransaction() + txHash := ethSigner.Hash(tx) + + sig, _, err := keyringSigner.SignByAddress(from, txHash.Bytes(), signingtypes.SignMode_SIGN_MODE_TEXTUAL) + if err != nil { + return err + } + + tx, err = tx.WithSignature(ethSigner, sig) + if err != nil { + return err + } + + return msg.FromEthereumTx(tx) +} + +// GetGas implements the GasTx interface. It returns the GasLimit of the transaction. +func (msg MsgEthereumTx) GetGas() uint64 { + txData, err := UnpackTxData(msg.Data) + if err != nil { + return 0 + } + return txData.GetGas() +} + +// GetFee returns the fee for non dynamic fee tx +func (msg MsgEthereumTx) GetFee() *big.Int { + txData, err := UnpackTxData(msg.Data) + if err != nil { + return nil + } + return txData.Fee() +} + +// GetEffectiveFee returns the fee for dynamic fee tx +func (msg MsgEthereumTx) GetEffectiveFee(baseFee *big.Int) *big.Int { + txData, err := UnpackTxData(msg.Data) + if err != nil { + return nil + } + return txData.EffectiveFee(baseFee) +} + +// GetFrom loads the ethereum sender address from the sigcache and returns an +// sdk.AccAddress from its bytes +func (msg *MsgEthereumTx) GetFrom() sdk.AccAddress { + if msg.From == "" { + return nil + } + + return common.HexToAddress(msg.From).Bytes() +} + +// AsTransaction creates an Ethereum Transaction type from the msg fields +func (msg MsgEthereumTx) AsTransaction() *ethtypes.Transaction { + txData, err := UnpackTxData(msg.Data) + if err != nil { + return nil + } + + return ethtypes.NewTx(txData.AsEthereumData()) +} + +// AsMessage creates an Ethereum core.Message from the msg fields +func (msg MsgEthereumTx) AsMessage(signer ethtypes.Signer, baseFee *big.Int) (core.Message, error) { + return msg.AsTransaction().AsMessage(signer, baseFee) +} + +// GetSender extracts the sender address from the signature values using the latest signer for the given chainID. +func (msg *MsgEthereumTx) GetSender(chainID *big.Int) (common.Address, error) { + signer := ethtypes.LatestSignerForChainID(chainID) + from, err := signer.Sender(msg.AsTransaction()) + if err != nil { + return common.Address{}, err + } + + msg.From = from.Hex() + return from, nil +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (msg MsgEthereumTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return unpacker.UnpackAny(msg.Data, new(TxData)) +} + +// UnmarshalBinary decodes the canonical encoding of transactions. +func (msg *MsgEthereumTx) UnmarshalBinary(b []byte) error { + tx := ðtypes.Transaction{} + if err := tx.UnmarshalBinary(b); err != nil { + return err + } + return msg.FromEthereumTx(tx) +} + +// BuildTx builds the canonical cosmos tx from ethereum msg +func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (signing.Tx, error) { + builder, ok := b.(authtx.ExtensionOptionsTxBuilder) + if !ok { + return nil, errors.New("unsupported builder") + } + + option, err := codectypes.NewAnyWithValue(&ExtensionOptionsEthereumTx{}) + if err != nil { + return nil, err + } + + txData, err := UnpackTxData(msg.Data) + if err != nil { + return nil, err + } + fees := make(sdk.Coins, 0) + feeAmt := sdkmath.NewIntFromBigInt(txData.Fee()) + if feeAmt.Sign() > 0 { + fees = append(fees, sdk.NewCoin(evmDenom, feeAmt)) + } + + builder.SetExtensionOptions(option) + + // A valid msg should have empty `From` + msg.From = "" + + err = builder.SetMsgs(msg) + if err != nil { + return nil, err + } + builder.SetFeeAmount(fees) + builder.SetGasLimit(msg.GetGas()) + tx := builder.GetTx() + return tx, nil +} + +// ValidateBasic does a sanity check of the provided data +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return errorsmod.Wrap(err, "invalid authority address") + } + + return m.Params.Validate() +} + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) +} diff --git a/legacy/evm/types/msg_test.go b/legacy/evm/types/msg_test.go new file mode 100644 index 0000000..b10b887 --- /dev/null +++ b/legacy/evm/types/msg_test.go @@ -0,0 +1,909 @@ +package types_test + +import ( + "fmt" + "math" + "math/big" + "reflect" + "strings" + "testing" + + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/evmos/evmos/v20/crypto/ethsecp256k1" + utiltx "github.com/evmos/evmos/v20/testutil/tx" + + "github.com/evmos/evmos/v20/encoding" + "github.com/evmos/evmos/v20/x/evm/types" +) + +const invalidAddress = "0x0000" + +type MsgsTestSuite struct { + suite.Suite + + signer keyring.Signer + from common.Address + to common.Address + chainID *big.Int + hundredBigInt *big.Int + + clientCtx client.Context +} + +func TestMsgsTestSuite(t *testing.T) { + suite.Run(t, new(MsgsTestSuite)) +} + +func (suite *MsgsTestSuite) SetupTest() { + from, privFrom := utiltx.NewAddrKey() + + suite.signer = utiltx.NewSigner(privFrom) + suite.from = from + suite.to = utiltx.GenerateAddress() + suite.chainID = big.NewInt(1) + suite.hundredBigInt = big.NewInt(100) + + encodingConfig := encoding.MakeConfig() + suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) +} + +func (suite *MsgsTestSuite) TestMsgEthereumTx_Constructor() { + evmTx := &types.EvmTxArgs{ + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + Input: []byte("test"), + } + msg := types.NewTx(evmTx) + + // suite.Require().Equal(msg.Data.To, suite.to.Hex()) + suite.Require().Equal(msg.Route(), types.RouterKey) + suite.Require().Equal(msg.Type(), types.TypeMsgEthereumTx) + // suite.Require().NotNil(msg.To()) + suite.Require().Equal(msg.GetMsgs(), []sdk.Msg{msg}) + suite.Require().Panics(func() { msg.GetSignBytes() }) + + evmTx2 := &types.EvmTxArgs{ + Nonce: 0, + GasLimit: 100000, + Input: []byte("test"), + } + msg = types.NewTx(evmTx2) + suite.Require().NotNil(msg) + // suite.Require().Empty(msg.Data.To) + // suite.Require().Nil(msg.To()) +} + +func (suite *MsgsTestSuite) TestMsgEthereumTx_BuildTx() { + evmTx := &types.EvmTxArgs{ + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + GasPrice: big.NewInt(1), + GasFeeCap: big.NewInt(1), + GasTipCap: big.NewInt(0), + Input: []byte("test"), + } + testCases := []struct { + name string + msg *types.MsgEthereumTx + expError bool + }{ + { + "build tx - pass", + types.NewTx(evmTx), + false, + }, + { + "build tx - fail: nil data", + types.NewTx(evmTx), + true, + }, + } + + for _, tc := range testCases { + if strings.Contains(tc.name, "nil data") { + tc.msg.Data = nil + } + + tx, err := tc.msg.BuildTx(suite.clientCtx.TxConfig.NewTxBuilder(), types.DefaultEVMDenom) + if tc.expError { + suite.Require().Error(err) + } else { + suite.Require().NoError(err) + + suite.Require().Empty(tx.GetMemo()) + suite.Require().Empty(tx.GetTimeoutHeight()) + suite.Require().Equal(uint64(100000), tx.GetGas()) + suite.Require().Equal(sdk.NewCoins(sdk.NewCoin(types.DefaultEVMDenom, sdkmath.NewInt(100000))), tx.GetFee()) + } + } +} + +func (suite *MsgsTestSuite) TestMsgEthereumTx_ValidateBasic() { + var ( + hundredInt = big.NewInt(100) + validChainID = big.NewInt(9000) + zeroInt = big.NewInt(0) + minusOneInt = big.NewInt(-1) + //nolint:all + exp_2_255 = new(big.Int).Exp(big.NewInt(2), big.NewInt(255), nil) + ) + testCases := []struct { + msg string + to string + amount *big.Int + gasLimit uint64 + gasPrice *big.Int + gasFeeCap *big.Int + gasTipCap *big.Int + from string + accessList *ethtypes.AccessList + chainID *big.Int + expectPass bool + errMsg string + }{ + { + msg: "pass with recipient - Legacy Tx", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: true, + }, + { + msg: "pass with recipient - AccessList Tx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: true, + }, + { + msg: "pass with recipient - DynamicFee Tx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: hundredInt, + gasTipCap: zeroInt, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: true, + }, + { + msg: "pass contract - Legacy Tx", + to: "", + from: suite.from.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: true, + }, + { + msg: "maxInt64 gas limit overflow", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: hundredInt, + gasLimit: math.MaxInt64 + 1, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: false, + errMsg: "gas limit must be less than math.MaxInt64", + }, + { + msg: "nil amount - Legacy Tx", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: nil, + gasLimit: 1000, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: true, + }, + { + msg: "negative amount - Legacy Tx", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: minusOneInt, + gasLimit: 1000, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: false, + errMsg: "amount cannot be negative", + }, + { + msg: "zero gas limit - Legacy Tx", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: hundredInt, + gasLimit: 0, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: false, + errMsg: "gas limit must not be zero", + }, + { + msg: "nil gas price - Legacy Tx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: nil, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: false, + errMsg: "gas price cannot be nil", + }, + { + msg: "negative gas price - Legacy Tx", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: minusOneInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: false, + errMsg: "gas price cannot be negative", + }, + { + msg: "zero gas price - Legacy Tx", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: true, + }, + { + msg: "invalid from address - Legacy Tx", + to: suite.to.Hex(), + from: invalidAddress, + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: false, + errMsg: "invalid from address", + }, + { + msg: "out of bound gas fee - Legacy Tx", + to: suite.to.Hex(), + from: suite.from.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: exp_2_255, + gasFeeCap: nil, + gasTipCap: nil, + chainID: validChainID, + expectPass: false, + errMsg: "out of bound", + }, + { + msg: "nil amount - AccessListTx", + to: suite.to.Hex(), + amount: nil, + gasLimit: 1000, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: true, + }, + { + msg: "negative amount - AccessListTx", + to: suite.to.Hex(), + amount: minusOneInt, + gasLimit: 1000, + gasPrice: hundredInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: false, + errMsg: "amount cannot be negative", + }, + { + msg: "zero gas limit - AccessListTx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 0, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: false, + errMsg: "gas limit must not be zero", + }, + { + msg: "nil gas price - AccessListTx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: nil, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: false, + errMsg: "cannot be nil: invalid gas price", + }, + { + msg: "negative gas price - AccessListTx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: minusOneInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: false, + errMsg: "gas price cannot be negative", + }, + { + msg: "zero gas price - AccessListTx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: true, + }, + { + msg: "invalid from address - AccessListTx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + from: invalidAddress, + accessList: ðtypes.AccessList{}, + chainID: validChainID, + expectPass: false, + errMsg: "invalid from address", + }, + { + msg: "chain ID not set on AccessListTx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + chainID: nil, + expectPass: false, + errMsg: "chain ID must be present on AccessList txs", + }, + { + msg: "nil tx.Data - AccessList Tx", + to: suite.to.Hex(), + amount: hundredInt, + gasLimit: 1000, + gasPrice: zeroInt, + gasFeeCap: nil, + gasTipCap: nil, + accessList: ðtypes.AccessList{}, + expectPass: false, + errMsg: "failed to unpack tx data", + }, + } + + for _, tc := range testCases { + suite.Run(tc.msg, func() { + to := common.HexToAddress(tc.to) + evmTx := &types.EvmTxArgs{ + ChainID: tc.chainID, + Nonce: 1, + To: &to, + Amount: tc.amount, + GasLimit: tc.gasLimit, + GasPrice: tc.gasPrice, + GasFeeCap: tc.gasFeeCap, + Accesses: tc.accessList, + } + tx := types.NewTx(evmTx) + tx.From = tc.from + + // apply nil assignment here to test ValidateBasic function instead of NewTx + if strings.Contains(tc.msg, "nil tx.Data") { + tx.Data = nil + } + + // for legacy_Tx need to sign tx because the chainID is derived + // from signature + if tc.accessList == nil && tc.from == suite.from.Hex() { + ethSigner := ethtypes.LatestSignerForChainID(tc.chainID) + err := tx.Sign(ethSigner, suite.signer) + suite.Require().NoError(err) + } + + err := tx.ValidateBasic() + + if tc.expectPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.errMsg) + } + }) + } +} + +func (suite *MsgsTestSuite) TestMsgEthereumTx_ValidateBasicAdvanced() { + hundredInt := big.NewInt(100) + evmTx := &types.EvmTxArgs{ + ChainID: hundredInt, + Nonce: 1, + Amount: big.NewInt(10), + GasLimit: 100000, + GasPrice: big.NewInt(150), + GasFeeCap: big.NewInt(200), + } + + testCases := []struct { + msg string + msgBuilder func() *types.MsgEthereumTx + expectPass bool + }{ + { + "fails - invalid tx hash", + func() *types.MsgEthereumTx { + msg := types.NewTx(evmTx) + msg.Hash = "0x00" + return msg + }, + false, + }, + { + "fails - invalid size", + func() *types.MsgEthereumTx { + msg := types.NewTx(evmTx) + msg.Size_ = 1 + return msg + }, + false, + }, + } + + for _, tc := range testCases { + suite.Run(tc.msg, func() { + err := tc.msgBuilder().ValidateBasic() + if tc.expectPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *MsgsTestSuite) TestMsgEthereumTx_Sign() { + testCases := []struct { + msg string + txParams *types.EvmTxArgs + ethSigner ethtypes.Signer + malleate func(tx *types.MsgEthereumTx) + expectPass bool + }{ + { + "pass - EIP2930 signer", + &types.EvmTxArgs{ + ChainID: suite.chainID, + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + Input: []byte("test"), + Accesses: ðtypes.AccessList{}, + }, + ethtypes.NewEIP2930Signer(suite.chainID), + func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, + true, + }, + { + "pass - EIP155 signer", + &types.EvmTxArgs{ + ChainID: suite.chainID, + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + Input: []byte("test"), + }, + ethtypes.NewEIP155Signer(suite.chainID), + func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, + true, + }, + { + "pass - Homestead signer", + &types.EvmTxArgs{ + ChainID: suite.chainID, + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + Input: []byte("test"), + }, + ethtypes.HomesteadSigner{}, + func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, + true, + }, + { + "pass - Frontier signer", + &types.EvmTxArgs{ + ChainID: suite.chainID, + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + Input: []byte("test"), + }, + ethtypes.FrontierSigner{}, + func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, + true, + }, + { + "no from address ", + &types.EvmTxArgs{ + ChainID: suite.chainID, + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + Input: []byte("test"), + Accesses: ðtypes.AccessList{}, + }, + ethtypes.NewEIP2930Signer(suite.chainID), + func(tx *types.MsgEthereumTx) { tx.From = "" }, + false, + }, + { + "from address ≠ signer address", + &types.EvmTxArgs{ + ChainID: suite.chainID, + Nonce: 0, + To: &suite.to, + GasLimit: 100000, + Input: []byte("test"), + Accesses: ðtypes.AccessList{}, + }, + ethtypes.NewEIP2930Signer(suite.chainID), + func(tx *types.MsgEthereumTx) { tx.From = suite.to.Hex() }, + false, + }, + } + + for i, tc := range testCases { + tx := types.NewTx(tc.txParams) + tc.malleate(tx) + err := tx.Sign(tc.ethSigner, suite.signer) + if tc.expectPass { + suite.Require().NoError(err, "valid test %d failed: %s", i, tc.msg) + + sender, err := tx.GetSender(suite.chainID) + suite.Require().NoError(err, tc.msg) + suite.Require().Equal(tx.From, sender.Hex(), tc.msg) + } else { + suite.Require().Error(err, "invalid test %d passed: %s", i, tc.msg) + } + } +} + +func (suite *MsgsTestSuite) TestMsgEthereumTx_Getters() { + evmTx := &types.EvmTxArgs{ + ChainID: suite.chainID, + Nonce: 0, + To: &suite.to, + GasLimit: 50, + GasPrice: suite.hundredBigInt, + Accesses: ðtypes.AccessList{}, + } + testCases := []struct { + name string + ethSigner ethtypes.Signer + exp *big.Int + }{ + { + "get fee - pass", + + ethtypes.NewEIP2930Signer(suite.chainID), + big.NewInt(5000), + }, + { + "get fee - fail: nil data", + ethtypes.NewEIP2930Signer(suite.chainID), + nil, + }, + { + "get effective fee - pass", + + ethtypes.NewEIP2930Signer(suite.chainID), + big.NewInt(5000), + }, + { + "get effective fee - fail: nil data", + ethtypes.NewEIP2930Signer(suite.chainID), + nil, + }, + { + "get gas - pass", + ethtypes.NewEIP2930Signer(suite.chainID), + big.NewInt(50), + }, + { + "get gas - fail: nil data", + ethtypes.NewEIP2930Signer(suite.chainID), + big.NewInt(0), + }, + } + + var fee, effFee *big.Int + for _, tc := range testCases { + tx := types.NewTx(evmTx) + if strings.Contains(tc.name, "nil data") { + tx.Data = nil + } + switch { + case strings.Contains(tc.name, "get fee"): + fee = tx.GetFee() + suite.Require().Equal(tc.exp, fee) + case strings.Contains(tc.name, "get effective fee"): + effFee = tx.GetEffectiveFee(big.NewInt(0)) + suite.Require().Equal(tc.exp, effFee) + case strings.Contains(tc.name, "get gas"): + gas := tx.GetGas() + suite.Require().Equal(tc.exp.Uint64(), gas) + } + } +} + +func (suite *MsgsTestSuite) TestFromEthereumTx() { + privkey, _ := ethsecp256k1.GenerateKey() + ethPriv, err := privkey.ToECDSA() + suite.Require().NoError(err) + + // 10^80 is more than 256 bits + //nolint:all + exp_10_80 := new(big.Int).Mul(big.NewInt(1), new(big.Int).Exp(big.NewInt(10), big.NewInt(80), nil)) + + testCases := []struct { + msg string + expectPass bool + buildTx func() *ethtypes.Transaction + }{ + {"success, normal tx", true, func() *ethtypes.Transaction { + tx := ethtypes.NewTx(ðtypes.AccessListTx{ + Nonce: 0, + Data: nil, + To: &suite.to, + Value: big.NewInt(10), + GasPrice: big.NewInt(1), + Gas: 21000, + }) + tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) + suite.Require().NoError(err) + return tx + }}, + {"success, DynamicFeeTx", true, func() *ethtypes.Transaction { + tx := ethtypes.NewTx(ðtypes.DynamicFeeTx{ + Nonce: 0, + Data: nil, + To: &suite.to, + Value: big.NewInt(10), + Gas: 21000, + }) + tx, err := ethtypes.SignTx(tx, ethtypes.NewLondonSigner(suite.chainID), ethPriv) + suite.Require().NoError(err) + return tx + }}, + {"fail, value bigger than 256bits - AccessListTx", false, func() *ethtypes.Transaction { + tx := ethtypes.NewTx(ðtypes.AccessListTx{ + Nonce: 0, + Data: nil, + To: &suite.to, + Value: exp_10_80, + GasPrice: big.NewInt(1), + Gas: 21000, + }) + tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) + suite.Require().NoError(err) + return tx + }}, + {"fail, gas price bigger than 256bits - AccessListTx", false, func() *ethtypes.Transaction { + tx := ethtypes.NewTx(ðtypes.AccessListTx{ + Nonce: 0, + Data: nil, + To: &suite.to, + Value: big.NewInt(1), + GasPrice: exp_10_80, + Gas: 21000, + }) + tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) + suite.Require().NoError(err) + return tx + }}, + {"fail, value bigger than 256bits - LegacyTx", false, func() *ethtypes.Transaction { + tx := ethtypes.NewTx(ðtypes.LegacyTx{ + Nonce: 0, + Data: nil, + To: &suite.to, + Value: exp_10_80, + GasPrice: big.NewInt(1), + Gas: 21000, + }) + tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) + suite.Require().NoError(err) + return tx + }}, + {"fail, gas price bigger than 256bits - LegacyTx", false, func() *ethtypes.Transaction { + tx := ethtypes.NewTx(ðtypes.LegacyTx{ + Nonce: 0, + Data: nil, + To: &suite.to, + Value: big.NewInt(1), + GasPrice: exp_10_80, + Gas: 21000, + }) + tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) + suite.Require().NoError(err) + return tx + }}, + } + + for _, tc := range testCases { + ethTx := tc.buildTx() + tx := &types.MsgEthereumTx{} + err := tx.FromEthereumTx(ethTx) + if tc.expectPass { + suite.Require().NoError(err) + + // round-trip test + suite.Require().NoError(assertEqual(tx.AsTransaction(), ethTx)) + } else { + suite.Require().Error(err) + } + } +} + +// TestTransactionCoding tests serializing/de-serializing to/from rlp and JSON. +// adapted from go-ethereum +func (suite *MsgsTestSuite) TestTransactionCoding() { + key, err := crypto.GenerateKey() + if err != nil { + suite.T().Fatalf("could not generate key: %v", err) + } + var ( + signer = ethtypes.NewEIP2930Signer(common.Big1) + addr = common.HexToAddress("0x0000000000000000000000000000000000000001") + recipient = common.HexToAddress("095e7baea6a6c7c4c2dfeb977efac326af552d87") + accesses = ethtypes.AccessList{{Address: addr, StorageKeys: []common.Hash{{0}}}} + ) + for i := uint64(0); i < 500; i++ { + var txdata ethtypes.TxData + switch i % 5 { + case 0: + // Legacy tx. + txdata = ðtypes.LegacyTx{ + Nonce: i, + To: &recipient, + Gas: 1, + GasPrice: big.NewInt(2), + Data: []byte("abcdef"), + } + case 1: + // Legacy tx contract creation. + txdata = ðtypes.LegacyTx{ + Nonce: i, + Gas: 1, + GasPrice: big.NewInt(2), + Data: []byte("abcdef"), + } + case 2: + // Tx with non-zero access list. + txdata = ðtypes.AccessListTx{ + ChainID: big.NewInt(1), + Nonce: i, + To: &recipient, + Gas: 123457, + GasPrice: big.NewInt(10), + AccessList: accesses, + Data: []byte("abcdef"), + } + case 3: + // Tx with empty access list. + txdata = ðtypes.AccessListTx{ + ChainID: big.NewInt(1), + Nonce: i, + To: &recipient, + Gas: 123457, + GasPrice: big.NewInt(10), + Data: []byte("abcdef"), + } + case 4: + // Contract creation with access list. + txdata = ðtypes.AccessListTx{ + ChainID: big.NewInt(1), + Nonce: i, + Gas: 123457, + GasPrice: big.NewInt(10), + AccessList: accesses, + } + } + tx, err := ethtypes.SignNewTx(key, signer, txdata) + if err != nil { + suite.T().Fatalf("could not sign transaction: %v", err) + } + // RLP + parsedTx, err := encodeDecodeBinary(tx) + if err != nil { + suite.T().Fatal(err) + } + err = assertEqual(parsedTx.AsTransaction(), tx) + suite.Require().NoError(err) + } +} + +func encodeDecodeBinary(tx *ethtypes.Transaction) (*types.MsgEthereumTx, error) { + data, err := tx.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("rlp encoding failed: %v", err) + } + parsedTx := &types.MsgEthereumTx{} + if err := parsedTx.UnmarshalBinary(data); err != nil { + return nil, fmt.Errorf("rlp decoding failed: %v", err) + } + return parsedTx, nil +} + +func assertEqual(orig *ethtypes.Transaction, cpy *ethtypes.Transaction) error { + // compare nonce, price, gaslimit, recipient, amount, payload, V, R, S + if want, got := orig.Hash(), cpy.Hash(); want != got { + return fmt.Errorf("parsed tx differs from original tx, want %v, got %v", want, got) + } + if want, got := orig.ChainId(), cpy.ChainId(); want.Cmp(got) != 0 { + return fmt.Errorf("invalid chain id, want %d, got %d", want, got) + } + if orig.AccessList() != nil { + if !reflect.DeepEqual(orig.AccessList(), cpy.AccessList()) { + return fmt.Errorf("access list wrong") + } + } + return nil +} diff --git a/legacy/evm/types/opcodes_hooks.go b/legacy/evm/types/opcodes_hooks.go new file mode 100644 index 0000000..a3595a1 --- /dev/null +++ b/legacy/evm/types/opcodes_hooks.go @@ -0,0 +1,70 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package types + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/evmos/evmos/v20/x/evm/core/vm" +) + +// OpCodeHooks extends the geth OpCodeHooks interface to add custom hooks for EVM operations. +// The hooks run before the respective opcode execution every time they are called. +type OpCodeHooks interface { + vm.OpCodeHooks + AddCallHooks(hooks ...CallHook) + AddCreateHooks(hooks ...CreateHook) +} + +// DefaultOpCodesHooks is the default implementation of OpCodeHooks for EVMOS chain +// The hooks are used to enforce access control policies on EVM operations. +// They are ran BEFORE the respective opcode execution every time they are called. +type DefaultOpCodesHooks struct { + callHooks []CallHook + createHooks []CreateHook +} + +// Make sure we comply with geth's OpCodeHooks interface +var _ OpCodeHooks = (*DefaultOpCodesHooks)(nil) + +type ( + CreateHook func(ev *vm.EVM, caller common.Address) error + CallHook func(ev *vm.EVM, caller common.Address, recipient common.Address) error +) + +// NewDefaultOpCodesHooks creates a new DefaultOpCodesHooks instance +func NewDefaultOpCodesHooks() OpCodeHooks { + return &DefaultOpCodesHooks{} +} + +// AddCallHooks adds one or more hooks to the queue to be executed before the CALL opcode. +// Hooks will be executed in the order they are added. +func (h *DefaultOpCodesHooks) AddCallHooks(hooks ...CallHook) { + h.callHooks = append(h.callHooks, hooks...) +} + +// AddCreateHooks adds one or more hooks to the queue to be executed before the CREATE opcode. +// Hooks will be executed in the order they are added. +func (h *DefaultOpCodesHooks) AddCreateHooks(hooks ...CreateHook) { + h.createHooks = append(h.createHooks, hooks...) +} + +// CreateHook checks if the caller has permission to deploy contracts +func (h *DefaultOpCodesHooks) CreateHook(evm *vm.EVM, caller common.Address) error { + for _, hook := range h.createHooks { + if err := hook(evm, caller); err != nil { + return err + } + } + return nil +} + +// CallHook checks if the caller has permission to perform a call +func (h *DefaultOpCodesHooks) CallHook(evm *vm.EVM, caller common.Address, recipient common.Address) error { + for _, hook := range h.callHooks { + if err := hook(evm, caller, recipient); err != nil { + return err + } + } + return nil +} diff --git a/legacy/evm/types/params.go b/legacy/evm/types/params.go new file mode 100644 index 0000000..d416318 --- /dev/null +++ b/legacy/evm/types/params.go @@ -0,0 +1,300 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "fmt" + "math/big" + "slices" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + 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/common" + "github.com/ethereum/go-ethereum/params" + "github.com/evmos/evmos/v20/types" + "github.com/evmos/evmos/v20/utils" + "github.com/evmos/evmos/v20/x/evm/core/vm" +) + +var ( + // DefaultEVMDenom defines the default EVM denomination on Evmos + DefaultEVMDenom = utils.BaseDenom + // DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false) + DefaultAllowUnprotectedTxs = false + // DefaultStaticPrecompiles defines the default active precompiles + DefaultStaticPrecompiles = []string{ + P256PrecompileAddress, // P256 precompile + Bech32PrecompileAddress, // Bech32 precompile + StakingPrecompileAddress, // Staking precompile + DistributionPrecompileAddress, // Distribution precompile + ICS20PrecompileAddress, // ICS20 transfer precompile + VestingPrecompileAddress, // Vesting precompile + BankPrecompileAddress, // Bank precompile + GovPrecompileAddress, // Gov precompile + } + // DefaultExtraEIPs defines the default extra EIPs to be included + // On v15, EIP 3855 was enabled + DefaultExtraEIPs = []string{"ethereum_3855"} + DefaultEVMChannels = []string{ + "channel-10", // Injective + "channel-31", // Cronos + "channel-83", // Kava + } + DefaultCreateAllowlistAddresses []string + DefaultCallAllowlistAddresses []string + DefaultAccessControl = AccessControl{ + Create: AccessControlType{ + AccessType: AccessTypePermissionless, + AccessControlList: DefaultCreateAllowlistAddresses, + }, + Call: AccessControlType{ + AccessType: AccessTypePermissionless, + AccessControlList: DefaultCreateAllowlistAddresses, + }, + } +) + +// NewParams creates a new Params instance +func NewParams( + evmDenom string, + allowUnprotectedTxs bool, + config ChainConfig, + extraEIPs []string, + activeStaticPrecompiles, + evmChannels []string, + accessControl AccessControl, +) Params { + return Params{ + EvmDenom: evmDenom, + AllowUnprotectedTxs: allowUnprotectedTxs, + ExtraEIPs: extraEIPs, + ChainConfig: config, + ActiveStaticPrecompiles: activeStaticPrecompiles, + EVMChannels: evmChannels, + AccessControl: accessControl, + } +} + +// DefaultParams returns default evm parameters +func DefaultParams() Params { + return Params{ + EvmDenom: DefaultEVMDenom, + ChainConfig: DefaultChainConfig(), + ExtraEIPs: DefaultExtraEIPs, + AllowUnprotectedTxs: DefaultAllowUnprotectedTxs, + ActiveStaticPrecompiles: DefaultStaticPrecompiles, + EVMChannels: DefaultEVMChannels, + AccessControl: DefaultAccessControl, + } +} + +// validateChannels checks if channels ids are valid +func validateChannels(i interface{}) error { + channels, ok := i.([]string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + for _, channel := range channels { + if err := host.ChannelIdentifierValidator(channel); err != nil { + return errorsmod.Wrap( + channeltypes.ErrInvalidChannelIdentifier, err.Error(), + ) + } + } + + return nil +} + +// Validate performs basic validation on evm parameters. +func (p Params) Validate() error { + if err := validateEVMDenom(p.EvmDenom); err != nil { + return err + } + + if err := validateEIPs(p.ExtraEIPs); err != nil { + return err + } + + if err := validateBool(p.AllowUnprotectedTxs); err != nil { + return err + } + + if err := validateChainConfig(p.ChainConfig); err != nil { + return err + } + + if err := ValidatePrecompiles(p.ActiveStaticPrecompiles); err != nil { + return err + } + + if err := p.AccessControl.Validate(); err != nil { + return err + } + + return validateChannels(p.EVMChannels) +} + +// EIPs returns the ExtraEIPS as a slice. +func (p Params) EIPs() []string { + eips := make([]string, len(p.ExtraEIPs)) + copy(eips, p.ExtraEIPs) + return eips +} + +// GetActiveStaticPrecompilesAddrs is a util function that the Active Precompiles +// as a slice of addresses. +func (p Params) GetActiveStaticPrecompilesAddrs() []common.Address { + precompiles := make([]common.Address, len(p.ActiveStaticPrecompiles)) + for i, precompile := range p.ActiveStaticPrecompiles { + precompiles[i] = common.HexToAddress(precompile) + } + return precompiles +} + +// IsEVMChannel returns true if the channel provided is in the list of +// EVM channels +func (p Params) IsEVMChannel(channel string) bool { + return slices.Contains(p.EVMChannels, channel) +} + +func (ac AccessControl) Validate() error { + if err := ac.Create.Validate(); err != nil { + return err + } + + if err := ac.Call.Validate(); err != nil { + return err + } + + return nil +} + +func (act AccessControlType) Validate() error { + if err := validateAccessType(act.AccessType); err != nil { + return err + } + + if err := validateAllowlistAddresses(act.AccessControlList); err != nil { + return err + } + return nil +} + +func validateAccessType(i interface{}) error { + accessType, ok := i.(AccessType) + if !ok { + return fmt.Errorf("invalid access type type: %T", i) + } + + switch accessType { + case AccessTypePermissionless, AccessTypeRestricted, AccessTypePermissioned: + return nil + default: + return fmt.Errorf("invalid access type: %s", accessType) + } +} + +func validateAllowlistAddresses(i interface{}) error { + addresses, ok := i.([]string) + if !ok { + return fmt.Errorf("invalid whitelist addresses type: %T", i) + } + + for _, address := range addresses { + if err := types.ValidateAddress(address); err != nil { + return fmt.Errorf("invalid whitelist address: %s", address) + } + } + return nil +} + +func validateEVMDenom(i interface{}) error { + denom, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter EVM denom type: %T", i) + } + + return sdk.ValidateDenom(denom) +} + +func validateBool(i interface{}) error { + _, ok := i.(bool) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + +func validateEIPs(i interface{}) error { + eips, ok := i.([]string) + if !ok { + return fmt.Errorf("invalid EIP slice type: %T", i) + } + + uniqueEIPs := make(map[string]struct{}) + + for _, eip := range eips { + if !vm.ExistsEipActivator(eip) { + return fmt.Errorf("EIP %s is not activateable, valid EIPs are: %s", eip, vm.ActivateableEips()) + } + + if err := vm.ValidateEIPName(eip); err != nil { + return fmt.Errorf("EIP %s name is not valid", eip) + } + + if _, ok := uniqueEIPs[eip]; ok { + return fmt.Errorf("found duplicate EIP: %s", eip) + } + uniqueEIPs[eip] = struct{}{} + + } + + return nil +} + +func validateChainConfig(i interface{}) error { + cfg, ok := i.(ChainConfig) + if !ok { + return fmt.Errorf("invalid chain config type: %T", i) + } + + return cfg.Validate() +} + +// ValidatePrecompiles checks if the precompile addresses are valid and unique. +func ValidatePrecompiles(i interface{}) error { + precompiles, ok := i.([]string) + if !ok { + return fmt.Errorf("invalid precompile slice type: %T", i) + } + + seenPrecompiles := make(map[string]struct{}) + for _, precompile := range precompiles { + if _, ok := seenPrecompiles[precompile]; ok { + return fmt.Errorf("duplicate precompile %s", precompile) + } + + if err := types.ValidateAddress(precompile); err != nil { + return fmt.Errorf("invalid precompile %s", precompile) + } + + seenPrecompiles[precompile] = struct{}{} + } + + // NOTE: Check that the precompiles are sorted. This is required + // to ensure determinism + if !slices.IsSorted(precompiles) { + return fmt.Errorf("precompiles need to be sorted: %s", precompiles) + } + + return nil +} + +// IsLondon returns if london hardfork is enabled. +func IsLondon(ethConfig *params.ChainConfig, height int64) bool { + return ethConfig.IsLondon(big.NewInt(height)) +} diff --git a/legacy/evm/types/params_legacy.go b/legacy/evm/types/params_legacy.go new file mode 100644 index 0000000..4cf1b76 --- /dev/null +++ b/legacy/evm/types/params_legacy.go @@ -0,0 +1,36 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + +// Parameter keys +var ( + ParamStoreKeyEVMDenom = []byte("EVMDenom") + ParamStoreKeyEnableCreate = []byte("EnableCreate") + ParamStoreKeyEnableCall = []byte("EnableCall") + ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs") + ParamStoreKeyChainConfig = []byte("ChainConfig") + ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs") +) + +// Deprecated: ParamKeyTable returns the parameter key table. +// Usage of x/params to manage parameters is deprecated in favor of x/gov +// controlled execution of MsgUpdateParams messages. These types remain solely +// for migration purposes and will be removed in a future release. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// Deprecated: ParamSetPairs returns the parameter set pairs. +// Usage of x/params to manage parameters is deprecated in favor of x/gov +// controlled execution of MsgUpdateParams messages. These types remain solely +// for migration purposes and will be removed in a future release. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom), + paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs), + paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig), + paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool), + } +} diff --git a/legacy/evm/types/params_test.go b/legacy/evm/types/params_test.go new file mode 100644 index 0000000..52045cf --- /dev/null +++ b/legacy/evm/types/params_test.go @@ -0,0 +1,166 @@ +package types + +import ( + "testing" + + ethparams "github.com/ethereum/go-ethereum/params" + + "github.com/stretchr/testify/require" +) + +func TestParamsValidate(t *testing.T) { + t.Parallel() + + extraEips := []string{"ethereum_2929", "ethereum_1884", "ethereum_1344"} + testCases := []struct { + name string + params Params + expPass bool + errContains string + }{ + { + name: "default", + params: DefaultParams(), + expPass: true, + }, + { + name: "valid", + params: NewParams(DefaultEVMDenom, false, DefaultChainConfig(), extraEips, nil, nil, DefaultAccessControl), + expPass: true, + }, + { + name: "empty", + params: Params{}, + errContains: "invalid denom: ", // NOTE: this returns the first error that occurs + }, + { + name: "invalid evm denom", + params: Params{ + EvmDenom: "@!#!@$!@5^32", + }, + errContains: "invalid denom: @!#!@$!@5^32", + }, + { + name: "invalid eip", + params: Params{ + EvmDenom: DefaultEVMDenom, + ExtraEIPs: []string{"os_1000000"}, + }, + errContains: "EIP os_1000000 is not activateable, valid EIPs are", + }, + { + name: "unsorted precompiles", + params: Params{ + EvmDenom: DefaultEVMDenom, + ActiveStaticPrecompiles: []string{ + "0x0000000000000000000000000000000000000801", + "0x0000000000000000000000000000000000000800", + }, + }, + errContains: "precompiles need to be sorted", + }, + } + + for _, tc := range testCases { + tc := tc + + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + if !tc.expPass { + // NOTE: check that the necessary information is provided. Otherwise, a false + // error message could be accepted when checking for an empty string. + require.NotEmpty(t, tc.errContains, "expected test case to provide expected error message") + } + + err := tc.params.Validate() + + if tc.expPass { + require.NoError(t, err, "expected parameters to be valid") + } else { + require.Error(t, err, "expected parameters to be invalid") + require.ErrorContains(t, err, tc.errContains, "expected different error message") + } + }) + } +} + +func TestParamsEIPs(t *testing.T) { + extraEips := []string{"ethereum_2929", "ethereum_1884", "ethereum_1344"} + params := NewParams("ara", false, DefaultChainConfig(), extraEips, nil, nil, DefaultAccessControl) + actual := params.EIPs() + + require.Equal(t, []string{"ethereum_2929", "ethereum_1884", "ethereum_1344"}, actual) +} + +func TestParamsValidatePriv(t *testing.T) { + require.Error(t, validateEVMDenom(false)) + require.NoError(t, validateEVMDenom("inj")) + require.Error(t, validateBool("")) + require.NoError(t, validateBool(true)) + require.Error(t, validateEIPs("")) + require.Error(t, validateEIPs([]int64{1884})) + require.NoError(t, validateEIPs([]string{"ethereum_1884"})) + require.ErrorContains(t, validateEIPs([]string{"ethereum_1884", "ethereum_1884", "ethereum_1885"}), "duplicate EIP: ethereum_1884") + require.NoError(t, validateChannels([]string{"channel-0"})) + require.Error(t, validateChannels(false)) + require.Error(t, validateChannels(int64(123))) + require.Error(t, validateChannels("")) +} + +func TestValidateChainConfig(t *testing.T) { + testCases := []struct { + name string + i interface{} + expError bool + }{ + { + "invalid chain config type", + "string", + true, + }, + { + "valid chain config type", + DefaultChainConfig(), + false, + }, + } + for _, tc := range testCases { + err := validateChainConfig(tc.i) + + if tc.expError { + require.Error(t, err, tc.name) + } else { + require.NoError(t, err, tc.name) + } + } +} + +func TestIsLondon(t *testing.T) { + testCases := []struct { + name string + height int64 + result bool + }{ + { + "Before london block", + 5, + false, + }, + { + "After london block", + 12_965_001, + true, + }, + { + "london block", + 12_965_000, + true, + }, + } + + for _, tc := range testCases { + ethConfig := ethparams.MainnetChainConfig + require.Equal(t, IsLondon(ethConfig, tc.height), tc.result) + } +} diff --git a/legacy/evm/types/permissions.go b/legacy/evm/types/permissions.go new file mode 100644 index 0000000..a5fbafe --- /dev/null +++ b/legacy/evm/types/permissions.go @@ -0,0 +1,144 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package types + +import ( + "fmt" + "slices" + + "github.com/ethereum/go-ethereum/common" + "github.com/evmos/evmos/v20/x/evm/core/vm" +) + +// PermissionPolicy is the interface that defines the permission policy for contract creation and calls. +// It is used to enforce access control policies on EVM operations. +// The policy is ran BEFORE the respective opcode execution every time they are called. +type PermissionPolicy interface { + // CanCreate checks if the contract creation is allowed. + CanCreate(signer, caller common.Address) bool + // CanCall checks if the any type of CALL opcode execution is allowed. This includes + // contract calls and transfers. + CanCall(signer, caller, recipient common.Address) bool + + // GetCallHook returns a CallHook that checks if the caller is allowed to perform a call. + // This is used by the EVM opcode hooks to enforce access control policies. + GetCallHook(signer common.Address) CallHook + // GetCreateHook returns a CreateHook that checks if the caller is allowed to deploy contracts. + // This is used by the EVM opcode hooks to enforce access control policies. + GetCreateHook(signer common.Address) CreateHook +} + +// RestrictedPermissionPolicy is a permission policy that restricts contract creation and calls based on a set of accessControl. +// Note that all the properties are private, this enforces the permissions not to be modified +// anywhere else within the code. +// For users that require a custom permission policy, they can implement the PermissionPolicy interface. +type RestrictedPermissionPolicy struct { + accessControl *AccessControl + canCreate callerFn + canCall callerFn +} + +func NewRestrictedPermissionPolicy(accessControl *AccessControl, signer common.Address) PermissionPolicy { + // generate create function at instantiation for signer address to be check only once + // since it remains constant + canCreate := getCanCreateFn(accessControl, signer) + canCall := getCanCallFn(accessControl, signer) + return RestrictedPermissionPolicy{ + accessControl: accessControl, + canCreate: canCreate, + canCall: canCall, + } +} + +var _ PermissionPolicy = RestrictedPermissionPolicy{} + +// GetCallHook returns a CallHook that checks if the caller is allowed to perform a call. +func (p RestrictedPermissionPolicy) GetCallHook(signer common.Address) CallHook { + return func(_ *vm.EVM, caller, recipient common.Address) error { + if p.CanCall(signer, caller, recipient) { + return nil + } + return fmt.Errorf("caller address %s does not have permission to perform a call", caller) + } +} + +// GetCreateHook returns a CreateHook that checks if the caller is allowed to deploy contracts. +func (p RestrictedPermissionPolicy) GetCreateHook(signer common.Address) CreateHook { + return func(_ *vm.EVM, caller common.Address) error { + if p.CanCreate(signer, caller) { + return nil + } + return fmt.Errorf("caller address %s does not have permission to deploy contracts", caller) + } +} + +// CanCreate implements the PermissionPolicy interface. +// It allows contract creation if access type is set to everybody. +// Otherwise, it checks if: +// - The signer is allowed to do so. +// - If the signer is not allowed, then we check if the caller is allowed to do so. +func (p RestrictedPermissionPolicy) CanCreate(_, caller common.Address) bool { + return p.canCreate(caller) +} + +type callerFn = func(caller common.Address) bool + +func getCanCreateFn(accessControl *AccessControl, signer common.Address) callerFn { + addresses := accessControl.Create.AccessControlList + + switch accessControl.Create.AccessType { + case AccessTypePermissionless: + return permissionlessCheckFn(addresses, signer) + case AccessTypeRestricted: + return func(_ common.Address) bool { return false } + case AccessTypePermissioned: + return permissionedCheckFn(addresses, signer) + } + return func(_ common.Address) bool { return false } +} + +// CanCreate implements the PermissionPolicy interface. +// It allows calls if access type is set to everybody. +// Otherwise, it checks if: +// - The signer is allowed to do so. +// - If the signer is not allowed, then we check if the caller is allowed to do so. +func (p RestrictedPermissionPolicy) CanCall(_, caller, _ common.Address) bool { + return p.canCall(caller) +} + +func getCanCallFn(accessControl *AccessControl, signer common.Address) callerFn { + addresses := accessControl.Call.AccessControlList + + switch accessControl.Call.AccessType { + case AccessTypePermissionless: + return permissionlessCheckFn(addresses, signer) + case AccessTypeRestricted: + return func(_ common.Address) bool { return false } + case AccessTypePermissioned: + return permissionedCheckFn(addresses, signer) + } + return func(_ common.Address) bool { return false } +} + +// permissionlessCheckFn returns a callerFn that returns true unless the signer or the caller is +// within the addresses slice. +func permissionlessCheckFn(addresses []string, signer common.Address) callerFn { + strSigner := signer.String() + isSignerBlocked := !slices.Contains(addresses, strSigner) + return func(caller common.Address) bool { + strCaller := caller.String() + return isSignerBlocked && !slices.Contains(addresses, strCaller) + } +} + +// permissionedCheckFn returns a callerFn that returns true if the signer or caller +// is within the addresses slice. +func permissionedCheckFn(addresses []string, signer common.Address) callerFn { + strSigner := signer.String() + isSignerAllowed := slices.Contains(addresses, strSigner) + return func(caller common.Address) bool { + strCaller := caller.String() + return isSignerAllowed || slices.Contains(addresses, strCaller) + } +} diff --git a/legacy/evm/types/permissions_test.go b/legacy/evm/types/permissions_test.go new file mode 100644 index 0000000..f79b7a2 --- /dev/null +++ b/legacy/evm/types/permissions_test.go @@ -0,0 +1,233 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package types_test + +import ( + "testing" + + "github.com/ethereum/go-ethereum/common" + testkeyring "github.com/evmos/evmos/v20/testutil/integration/evmos/keyring" + "github.com/evmos/evmos/v20/x/evm/types" + "github.com/stretchr/testify/suite" +) + +type UnitTestSuite struct { + suite.Suite +} + +func TestPermissionsSuite(t *testing.T) { + suite.Run(t, new(UnitTestSuite)) +} + +func (suite *UnitTestSuite) TestAccessControl() { + keyring := testkeyring.New(2) + + testCases := []struct { + name string + getAccessControl func() types.AccessControl + canCall bool + canCreate bool + signer common.Address + caller common.Address + recipient common.Address + }{ + { + name: "should allow call and create with default accessControl", + getAccessControl: func() types.AccessControl { + return types.DefaultParams().AccessControl + }, + canCall: true, + canCreate: true, + signer: keyring.GetAddr(0), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(0), + }, + { + name: "should not allow call and create with nobody accessControl", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Create.AccessType = types.AccessTypeRestricted + p.Call.AccessType = types.AccessTypeRestricted + return p + }, + canCall: false, + canCreate: false, + signer: keyring.GetAddr(0), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(0), + }, + { + name: "should not allow call with permissionless policy and signer in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Call.AccessType = types.AccessTypePermissionless + p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} + return p + }, + canCall: false, + canCreate: true, + signer: keyring.GetAddr(0), + caller: keyring.GetAddr(1), + recipient: keyring.GetAddr(1), + }, + { + name: "should not allow call with permissionless policy and signer not in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Call.AccessType = types.AccessTypePermissionless + p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} + return p + }, + canCall: false, + canCreate: true, + signer: keyring.GetAddr(1), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(1), + }, + { + name: "should allow call with permissionless policy while caller nor signer are in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Call.AccessType = types.AccessTypePermissionless + p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} + return p + }, + canCall: true, + canCreate: true, + signer: keyring.GetAddr(1), + caller: keyring.GetAddr(1), + recipient: keyring.GetAddr(1), + }, + { + name: "should allow call with permissionless policy and caller not in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Call.AccessType = types.AccessTypePermissionless + p.Call.AccessControlList = []string{keyring.GetAddr(1).String()} + return p + }, + canCall: false, + canCreate: true, + signer: keyring.GetAddr(1), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(1), + }, + { + name: "should not allow create with permissionless policy and signer in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Create.AccessType = types.AccessTypePermissionless + p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} + return p + }, + canCall: true, + canCreate: false, + signer: keyring.GetAddr(0), + caller: keyring.GetAddr(1), + recipient: keyring.GetAddr(1), + }, + { + name: "should not allow create with permissionless policy and signer not in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Create.AccessType = types.AccessTypePermissionless + p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} + return p + }, + canCall: true, + canCreate: false, + signer: keyring.GetAddr(1), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(1), + }, + { + name: "should allow create with permissionless policy while caller nor signer are in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Create.AccessType = types.AccessTypePermissionless + p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} + return p + }, + canCall: true, + canCreate: true, + signer: keyring.GetAddr(1), + caller: keyring.GetAddr(1), + recipient: keyring.GetAddr(1), + }, + { + name: "should allow create with permissionless policy and caller not in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Create.AccessType = types.AccessTypePermissionless + p.Create.AccessControlList = []string{keyring.GetAddr(1).String()} + return p + }, + canCall: true, + canCreate: false, + signer: keyring.GetAddr(1), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(1), + }, + { + name: "should not allow call with permissioned policy and not in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Call.AccessType = types.AccessTypePermissioned + p.Call.AccessControlList = []string{keyring.GetAddr(1).String()} + return p + }, + canCall: false, + canCreate: true, + signer: keyring.GetAddr(0), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(0), + }, + { + name: "should not allow create with permissioned policy and not in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Create.AccessType = types.AccessTypePermissioned + p.Create.AccessControlList = []string{keyring.GetAddr(1).String()} + return p + }, + canCall: true, + canCreate: false, + signer: keyring.GetAddr(0), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(0), + }, + { + name: "should allow call and create with permissioned policy and address in AccessControlList", + getAccessControl: func() types.AccessControl { + p := types.DefaultParams().AccessControl + p.Create.AccessType = types.AccessTypePermissioned + p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} + p.Call.AccessType = types.AccessTypePermissioned + p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} + return p + }, + canCall: true, + canCreate: true, + signer: keyring.GetAddr(0), + caller: keyring.GetAddr(0), + recipient: keyring.GetAddr(0), + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + accessControl := tc.getAccessControl() + permissionPolicy := types.NewRestrictedPermissionPolicy( + &accessControl, + tc.signer, + ) + + canCreate := permissionPolicy.CanCreate(tc.signer, tc.caller) + suite.Require().Equal(tc.canCreate, canCreate, "expected %v, got %v", tc.canCreate, canCreate) + + canCall := permissionPolicy.CanCall(tc.signer, tc.caller, tc.recipient) + suite.Require().Equal(tc.canCall, canCall, "expected %v, got %v", tc.canCall, canCall) + }) + } +} diff --git a/legacy/evm/types/precompiles.go b/legacy/evm/types/precompiles.go new file mode 100644 index 0000000..27e838d --- /dev/null +++ b/legacy/evm/types/precompiles.go @@ -0,0 +1,33 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package types + +const ( + P256PrecompileAddress = "0x0000000000000000000000000000000000000100" + Bech32PrecompileAddress = "0x0000000000000000000000000000000000000400" +) + +const ( + StakingPrecompileAddress = "0x0000000000000000000000000000000000000800" + DistributionPrecompileAddress = "0x0000000000000000000000000000000000000801" + ICS20PrecompileAddress = "0x0000000000000000000000000000000000000802" + VestingPrecompileAddress = "0x0000000000000000000000000000000000000803" + BankPrecompileAddress = "0x0000000000000000000000000000000000000804" + GovPrecompileAddress = "0x0000000000000000000000000000000000000805" +) + +// AvailableStaticPrecompiles defines the full list of all available EVM extension addresses. +// +// NOTE: To be explicit, this list does not include the dynamically registered EVM extensions +// like the ERC-20 extensions. +var AvailableStaticPrecompiles = []string{ + P256PrecompileAddress, + Bech32PrecompileAddress, + StakingPrecompileAddress, + DistributionPrecompileAddress, + ICS20PrecompileAddress, + VestingPrecompileAddress, + BankPrecompileAddress, + GovPrecompileAddress, +} diff --git a/legacy/evm/types/query.go b/legacy/evm/types/query.go new file mode 100644 index 0000000..7fb4b0e --- /dev/null +++ b/legacy/evm/types/query.go @@ -0,0 +1,31 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" +) + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + for _, msg := range m.Predecessors { + if err := msg.UnpackInterfaces(unpacker); err != nil { + return err + } + } + return m.Msg.UnpackInterfaces(unpacker) +} + +func (m QueryTraceBlockRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + for _, msg := range m.Txs { + if err := msg.UnpackInterfaces(unpacker); err != nil { + return err + } + } + return nil +} + +// Failed returns if the contract execution failed in vm errors +func (egr EstimateGasResponse) Failed() bool { + return len(egr.VmError) > 0 +} diff --git a/legacy/evm/types/query.pb.go b/legacy/evm/types/query.pb.go new file mode 100644 index 0000000..57f8e1d --- /dev/null +++ b/legacy/evm/types/query.pb.go @@ -0,0 +1,6102 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/query.proto + +package types + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryAccountRequest is the request type for the Query/Account RPC method. +type QueryAccountRequest struct { + // address is the ethereum hex address to query the account for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryAccountRequest) Reset() { *m = QueryAccountRequest{} } +func (m *QueryAccountRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountRequest) ProtoMessage() {} +func (*QueryAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{0} +} +func (m *QueryAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountRequest.Merge(m, src) +} +func (m *QueryAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo + +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { + // balance is the balance of the EVM denomination. + Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` + // code_hash is the hex-formatted code bytes from the EOA. + CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` + // nonce is the account's sequence number. + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } +func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{1} +} +func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountResponse.Merge(m, src) +} +func (m *QueryAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo + +func (m *QueryAccountResponse) GetBalance() string { + if m != nil { + return m.Balance + } + return "" +} + +func (m *QueryAccountResponse) GetCodeHash() string { + if m != nil { + return m.CodeHash + } + return "" +} + +func (m *QueryAccountResponse) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + +// QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC +// method. +type QueryCosmosAccountRequest struct { + // address is the ethereum hex address to query the account for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryCosmosAccountRequest) Reset() { *m = QueryCosmosAccountRequest{} } +func (m *QueryCosmosAccountRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCosmosAccountRequest) ProtoMessage() {} +func (*QueryCosmosAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{2} +} +func (m *QueryCosmosAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCosmosAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCosmosAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCosmosAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCosmosAccountRequest.Merge(m, src) +} +func (m *QueryCosmosAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCosmosAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCosmosAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCosmosAccountRequest proto.InternalMessageInfo + +// QueryCosmosAccountResponse is the response type for the Query/CosmosAccount +// RPC method. +type QueryCosmosAccountResponse struct { + // cosmos_address is the cosmos address of the account. + CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"` + // sequence is the account's sequence number. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // account_number is the account number + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` +} + +func (m *QueryCosmosAccountResponse) Reset() { *m = QueryCosmosAccountResponse{} } +func (m *QueryCosmosAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCosmosAccountResponse) ProtoMessage() {} +func (*QueryCosmosAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{3} +} +func (m *QueryCosmosAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCosmosAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCosmosAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCosmosAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCosmosAccountResponse.Merge(m, src) +} +func (m *QueryCosmosAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCosmosAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCosmosAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCosmosAccountResponse proto.InternalMessageInfo + +func (m *QueryCosmosAccountResponse) GetCosmosAddress() string { + if m != nil { + return m.CosmosAddress + } + return "" +} + +func (m *QueryCosmosAccountResponse) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *QueryCosmosAccountResponse) GetAccountNumber() uint64 { + if m != nil { + return m.AccountNumber + } + return 0 +} + +// QueryValidatorAccountRequest is the request type for the +// Query/ValidatorAccount RPC method. +type QueryValidatorAccountRequest struct { + // cons_address is the validator cons address to query the account for. + ConsAddress string `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3" json:"cons_address,omitempty"` +} + +func (m *QueryValidatorAccountRequest) Reset() { *m = QueryValidatorAccountRequest{} } +func (m *QueryValidatorAccountRequest) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorAccountRequest) ProtoMessage() {} +func (*QueryValidatorAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{4} +} +func (m *QueryValidatorAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorAccountRequest.Merge(m, src) +} +func (m *QueryValidatorAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorAccountRequest proto.InternalMessageInfo + +// QueryValidatorAccountResponse is the response type for the +// Query/ValidatorAccount RPC method. +type QueryValidatorAccountResponse struct { + // account_address is the cosmos address of the account in bech32 format. + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // sequence is the account's sequence number. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // account_number is the account number + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` +} + +func (m *QueryValidatorAccountResponse) Reset() { *m = QueryValidatorAccountResponse{} } +func (m *QueryValidatorAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorAccountResponse) ProtoMessage() {} +func (*QueryValidatorAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{5} +} +func (m *QueryValidatorAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorAccountResponse.Merge(m, src) +} +func (m *QueryValidatorAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorAccountResponse proto.InternalMessageInfo + +func (m *QueryValidatorAccountResponse) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + +func (m *QueryValidatorAccountResponse) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *QueryValidatorAccountResponse) GetAccountNumber() uint64 { + if m != nil { + return m.AccountNumber + } + return 0 +} + +// QueryBalanceRequest is the request type for the Query/Balance RPC method. +type QueryBalanceRequest struct { + // address is the ethereum hex address to query the balance for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } +func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceRequest) ProtoMessage() {} +func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{6} +} +func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceRequest.Merge(m, src) +} +func (m *QueryBalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo + +// QueryBalanceResponse is the response type for the Query/Balance RPC method. +type QueryBalanceResponse struct { + // balance is the balance of the EVM denomination. + Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } +func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceResponse) ProtoMessage() {} +func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{7} +} +func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceResponse.Merge(m, src) +} +func (m *QueryBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo + +func (m *QueryBalanceResponse) GetBalance() string { + if m != nil { + return m.Balance + } + return "" +} + +// QueryStorageRequest is the request type for the Query/Storage RPC method. +type QueryStorageRequest struct { + // address is the ethereum hex address to query the storage state for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // key defines the key of the storage state + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *QueryStorageRequest) Reset() { *m = QueryStorageRequest{} } +func (m *QueryStorageRequest) String() string { return proto.CompactTextString(m) } +func (*QueryStorageRequest) ProtoMessage() {} +func (*QueryStorageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{8} +} +func (m *QueryStorageRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStorageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStorageRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryStorageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStorageRequest.Merge(m, src) +} +func (m *QueryStorageRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryStorageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStorageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStorageRequest proto.InternalMessageInfo + +// QueryStorageResponse is the response type for the Query/Storage RPC +// method. +type QueryStorageResponse struct { + // value defines the storage state value hash associated with the given key. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *QueryStorageResponse) Reset() { *m = QueryStorageResponse{} } +func (m *QueryStorageResponse) String() string { return proto.CompactTextString(m) } +func (*QueryStorageResponse) ProtoMessage() {} +func (*QueryStorageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{9} +} +func (m *QueryStorageResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStorageResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryStorageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStorageResponse.Merge(m, src) +} +func (m *QueryStorageResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryStorageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStorageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStorageResponse proto.InternalMessageInfo + +func (m *QueryStorageResponse) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// QueryCodeRequest is the request type for the Query/Code RPC method. +type QueryCodeRequest struct { + // address is the ethereum hex address to query the code for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryCodeRequest) Reset() { *m = QueryCodeRequest{} } +func (m *QueryCodeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCodeRequest) ProtoMessage() {} +func (*QueryCodeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{10} +} +func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCodeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCodeRequest.Merge(m, src) +} +func (m *QueryCodeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCodeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCodeRequest proto.InternalMessageInfo + +// QueryCodeResponse is the response type for the Query/Code RPC +// method. +type QueryCodeResponse struct { + // code represents the code bytes from an ethereum address. + Code []byte `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` +} + +func (m *QueryCodeResponse) Reset() { *m = QueryCodeResponse{} } +func (m *QueryCodeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCodeResponse) ProtoMessage() {} +func (*QueryCodeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{11} +} +func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCodeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCodeResponse.Merge(m, src) +} +func (m *QueryCodeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCodeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCodeResponse proto.InternalMessageInfo + +func (m *QueryCodeResponse) GetCode() []byte { + if m != nil { + return m.Code + } + return nil +} + +// QueryTxLogsRequest is the request type for the Query/TxLogs RPC method. +type QueryTxLogsRequest struct { + // hash is the ethereum transaction hex hash to query the logs for. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTxLogsRequest) Reset() { *m = QueryTxLogsRequest{} } +func (m *QueryTxLogsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTxLogsRequest) ProtoMessage() {} +func (*QueryTxLogsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{12} +} +func (m *QueryTxLogsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTxLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTxLogsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTxLogsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTxLogsRequest.Merge(m, src) +} +func (m *QueryTxLogsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTxLogsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTxLogsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTxLogsRequest proto.InternalMessageInfo + +// QueryTxLogsResponse is the response type for the Query/TxLogs RPC method. +type QueryTxLogsResponse struct { + // logs represents the ethereum logs generated from the given transaction. + Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTxLogsResponse) Reset() { *m = QueryTxLogsResponse{} } +func (m *QueryTxLogsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTxLogsResponse) ProtoMessage() {} +func (*QueryTxLogsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{13} +} +func (m *QueryTxLogsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTxLogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTxLogsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTxLogsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTxLogsResponse.Merge(m, src) +} +func (m *QueryTxLogsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTxLogsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTxLogsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTxLogsResponse proto.InternalMessageInfo + +func (m *QueryTxLogsResponse) GetLogs() []*Log { + if m != nil { + return m.Logs + } + return nil +} + +func (m *QueryTxLogsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryParamsRequest defines the request type for querying x/evm parameters. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{14} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse defines the response type for querying x/evm parameters. +type QueryParamsResponse struct { + // params define the evm module parameters. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{15} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// EthCallRequest defines EthCall request +type EthCallRequest struct { + // args uses the same json format as the json rpc api. + Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"` + // gas_cap defines the default gas cap to be used + GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"` + // proposer_address of the requested block in hex format + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` + // chain_id is the eip155 chain id parsed from the requested block header + ChainId int64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +} + +func (m *EthCallRequest) Reset() { *m = EthCallRequest{} } +func (m *EthCallRequest) String() string { return proto.CompactTextString(m) } +func (*EthCallRequest) ProtoMessage() {} +func (*EthCallRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{16} +} +func (m *EthCallRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthCallRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EthCallRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthCallRequest.Merge(m, src) +} +func (m *EthCallRequest) XXX_Size() int { + return m.Size() +} +func (m *EthCallRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EthCallRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EthCallRequest proto.InternalMessageInfo + +func (m *EthCallRequest) GetArgs() []byte { + if m != nil { + return m.Args + } + return nil +} + +func (m *EthCallRequest) GetGasCap() uint64 { + if m != nil { + return m.GasCap + } + return 0 +} + +func (m *EthCallRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *EthCallRequest) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +// EstimateGasResponse defines EstimateGas response +type EstimateGasResponse struct { + // gas returns the estimated gas + Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"` + // ret is the returned data from evm function (result or data supplied with revert + // opcode) + Ret []byte `protobuf:"bytes,2,opt,name=ret,proto3" json:"ret,omitempty"` + // vm_error is the error returned by vm execution + VmError string `protobuf:"bytes,3,opt,name=vm_error,json=vmError,proto3" json:"vm_error,omitempty"` +} + +func (m *EstimateGasResponse) Reset() { *m = EstimateGasResponse{} } +func (m *EstimateGasResponse) String() string { return proto.CompactTextString(m) } +func (*EstimateGasResponse) ProtoMessage() {} +func (*EstimateGasResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{17} +} +func (m *EstimateGasResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EstimateGasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EstimateGasResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EstimateGasResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EstimateGasResponse.Merge(m, src) +} +func (m *EstimateGasResponse) XXX_Size() int { + return m.Size() +} +func (m *EstimateGasResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EstimateGasResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EstimateGasResponse proto.InternalMessageInfo + +func (m *EstimateGasResponse) GetGas() uint64 { + if m != nil { + return m.Gas + } + return 0 +} + +func (m *EstimateGasResponse) GetRet() []byte { + if m != nil { + return m.Ret + } + return nil +} + +func (m *EstimateGasResponse) GetVmError() string { + if m != nil { + return m.VmError + } + return "" +} + +// QueryTraceTxRequest defines TraceTx request +type QueryTraceTxRequest struct { + // msg is the MsgEthereumTx for the requested transaction + Msg *MsgEthereumTx `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + // trace_config holds extra parameters to trace functions. + TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + // predecessors is an array of transactions included in the same block + // need to be replayed first to get correct context for tracing. + Predecessors []*MsgEthereumTx `protobuf:"bytes,4,rep,name=predecessors,proto3" json:"predecessors,omitempty"` + // block_number of requested transaction + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // block_hash of requested transaction + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // block_time of requested transaction + BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` + // proposer_address is the proposer of the requested block + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` + // chain_id is the eip155 chain id parsed from the requested block header + ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // block_max_gas of the block of the requested transaction + BlockMaxGas int64 `protobuf:"varint,10,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` +} + +func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } +func (m *QueryTraceTxRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTraceTxRequest) ProtoMessage() {} +func (*QueryTraceTxRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{18} +} +func (m *QueryTraceTxRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceTxRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceTxRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceTxRequest.Merge(m, src) +} +func (m *QueryTraceTxRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceTxRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceTxRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceTxRequest proto.InternalMessageInfo + +func (m *QueryTraceTxRequest) GetMsg() *MsgEthereumTx { + if m != nil { + return m.Msg + } + return nil +} + +func (m *QueryTraceTxRequest) GetTraceConfig() *TraceConfig { + if m != nil { + return m.TraceConfig + } + return nil +} + +func (m *QueryTraceTxRequest) GetPredecessors() []*MsgEthereumTx { + if m != nil { + return m.Predecessors + } + return nil +} + +func (m *QueryTraceTxRequest) GetBlockNumber() int64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *QueryTraceTxRequest) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *QueryTraceTxRequest) GetBlockTime() time.Time { + if m != nil { + return m.BlockTime + } + return time.Time{} +} + +func (m *QueryTraceTxRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *QueryTraceTxRequest) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *QueryTraceTxRequest) GetBlockMaxGas() int64 { + if m != nil { + return m.BlockMaxGas + } + return 0 +} + +// QueryTraceTxResponse defines TraceTx response +type QueryTraceTxResponse struct { + // data is the response serialized in bytes + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *QueryTraceTxResponse) Reset() { *m = QueryTraceTxResponse{} } +func (m *QueryTraceTxResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTraceTxResponse) ProtoMessage() {} +func (*QueryTraceTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{19} +} +func (m *QueryTraceTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceTxResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceTxResponse.Merge(m, src) +} +func (m *QueryTraceTxResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceTxResponse proto.InternalMessageInfo + +func (m *QueryTraceTxResponse) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +// QueryTraceBlockRequest defines TraceTx request +type QueryTraceBlockRequest struct { + // txs is an array of messages in the block + Txs []*MsgEthereumTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + // trace_config holds extra parameters to trace functions. + TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + // block_number of the traced block + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // block_hash (hex) of the traced block + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // block_time of the traced block + BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` + // proposer_address is the address of the requested block + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` + // chain_id is the eip155 chain id parsed from the requested block header + ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // block_max_gas of the traced block + BlockMaxGas int64 `protobuf:"varint,10,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` +} + +func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} } +func (m *QueryTraceBlockRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTraceBlockRequest) ProtoMessage() {} +func (*QueryTraceBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{20} +} +func (m *QueryTraceBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceBlockRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceBlockRequest.Merge(m, src) +} +func (m *QueryTraceBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceBlockRequest proto.InternalMessageInfo + +func (m *QueryTraceBlockRequest) GetTxs() []*MsgEthereumTx { + if m != nil { + return m.Txs + } + return nil +} + +func (m *QueryTraceBlockRequest) GetTraceConfig() *TraceConfig { + if m != nil { + return m.TraceConfig + } + return nil +} + +func (m *QueryTraceBlockRequest) GetBlockNumber() int64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *QueryTraceBlockRequest) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *QueryTraceBlockRequest) GetBlockTime() time.Time { + if m != nil { + return m.BlockTime + } + return time.Time{} +} + +func (m *QueryTraceBlockRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *QueryTraceBlockRequest) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *QueryTraceBlockRequest) GetBlockMaxGas() int64 { + if m != nil { + return m.BlockMaxGas + } + return 0 +} + +// QueryTraceBlockResponse defines TraceBlock response +type QueryTraceBlockResponse struct { + // data is the response serialized in bytes + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *QueryTraceBlockResponse) Reset() { *m = QueryTraceBlockResponse{} } +func (m *QueryTraceBlockResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTraceBlockResponse) ProtoMessage() {} +func (*QueryTraceBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{21} +} +func (m *QueryTraceBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceBlockResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceBlockResponse.Merge(m, src) +} +func (m *QueryTraceBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceBlockResponse proto.InternalMessageInfo + +func (m *QueryTraceBlockResponse) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +// QueryBaseFeeRequest defines the request type for querying the EIP1559 base +// fee. +type QueryBaseFeeRequest struct { +} + +func (m *QueryBaseFeeRequest) Reset() { *m = QueryBaseFeeRequest{} } +func (m *QueryBaseFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBaseFeeRequest) ProtoMessage() {} +func (*QueryBaseFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{22} +} +func (m *QueryBaseFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBaseFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBaseFeeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBaseFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBaseFeeRequest.Merge(m, src) +} +func (m *QueryBaseFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBaseFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBaseFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo + +// QueryBaseFeeResponse returns the EIP1559 base fee. +type QueryBaseFeeResponse struct { + // base_fee is the EIP1559 base fee + BaseFee *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee,omitempty"` +} + +func (m *QueryBaseFeeResponse) Reset() { *m = QueryBaseFeeResponse{} } +func (m *QueryBaseFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBaseFeeResponse) ProtoMessage() {} +func (*QueryBaseFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{23} +} +func (m *QueryBaseFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBaseFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBaseFeeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBaseFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBaseFeeResponse.Merge(m, src) +} +func (m *QueryBaseFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBaseFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBaseFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBaseFeeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryAccountRequest)(nil), "ethermint.evm.v1.QueryAccountRequest") + proto.RegisterType((*QueryAccountResponse)(nil), "ethermint.evm.v1.QueryAccountResponse") + proto.RegisterType((*QueryCosmosAccountRequest)(nil), "ethermint.evm.v1.QueryCosmosAccountRequest") + proto.RegisterType((*QueryCosmosAccountResponse)(nil), "ethermint.evm.v1.QueryCosmosAccountResponse") + proto.RegisterType((*QueryValidatorAccountRequest)(nil), "ethermint.evm.v1.QueryValidatorAccountRequest") + proto.RegisterType((*QueryValidatorAccountResponse)(nil), "ethermint.evm.v1.QueryValidatorAccountResponse") + proto.RegisterType((*QueryBalanceRequest)(nil), "ethermint.evm.v1.QueryBalanceRequest") + proto.RegisterType((*QueryBalanceResponse)(nil), "ethermint.evm.v1.QueryBalanceResponse") + proto.RegisterType((*QueryStorageRequest)(nil), "ethermint.evm.v1.QueryStorageRequest") + proto.RegisterType((*QueryStorageResponse)(nil), "ethermint.evm.v1.QueryStorageResponse") + proto.RegisterType((*QueryCodeRequest)(nil), "ethermint.evm.v1.QueryCodeRequest") + proto.RegisterType((*QueryCodeResponse)(nil), "ethermint.evm.v1.QueryCodeResponse") + proto.RegisterType((*QueryTxLogsRequest)(nil), "ethermint.evm.v1.QueryTxLogsRequest") + proto.RegisterType((*QueryTxLogsResponse)(nil), "ethermint.evm.v1.QueryTxLogsResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "ethermint.evm.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "ethermint.evm.v1.QueryParamsResponse") + proto.RegisterType((*EthCallRequest)(nil), "ethermint.evm.v1.EthCallRequest") + proto.RegisterType((*EstimateGasResponse)(nil), "ethermint.evm.v1.EstimateGasResponse") + proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest") + proto.RegisterType((*QueryTraceTxResponse)(nil), "ethermint.evm.v1.QueryTraceTxResponse") + proto.RegisterType((*QueryTraceBlockRequest)(nil), "ethermint.evm.v1.QueryTraceBlockRequest") + proto.RegisterType((*QueryTraceBlockResponse)(nil), "ethermint.evm.v1.QueryTraceBlockResponse") + proto.RegisterType((*QueryBaseFeeRequest)(nil), "ethermint.evm.v1.QueryBaseFeeRequest") + proto.RegisterType((*QueryBaseFeeResponse)(nil), "ethermint.evm.v1.QueryBaseFeeResponse") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } + +var fileDescriptor_e15a877459347994 = []byte{ + // 1512 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0x4e, 0xec, 0x8c, 0x93, 0x36, 0x9d, 0xa6, 0xad, 0xb3, 0x4d, 0xe2, 0x74, 0xbf, + 0xdf, 0xfc, 0x68, 0x69, 0x77, 0x9b, 0x80, 0x2a, 0x01, 0x07, 0x5a, 0x47, 0xe9, 0x0f, 0xda, 0xa2, + 0xb2, 0x44, 0x1c, 0x90, 0x90, 0x35, 0x5e, 0x4f, 0xd7, 0xab, 0x78, 0x77, 0xdc, 0x9d, 0xb1, 0xe5, + 0xb4, 0xea, 0x81, 0x0a, 0x01, 0x15, 0x97, 0x4a, 0xdc, 0x38, 0xf5, 0x88, 0xc4, 0x85, 0x5b, 0x8f, + 0x5c, 0x7b, 0xac, 0xc4, 0x05, 0x71, 0x28, 0xa8, 0x45, 0x82, 0xbf, 0x81, 0x13, 0x9a, 0x1f, 0x6b, + 0xef, 0xda, 0xde, 0x38, 0x45, 0xe5, 0xc6, 0xc5, 0xde, 0x99, 0x79, 0xef, 0x7d, 0x3e, 0xf3, 0xe6, + 0xcd, 0xbc, 0x0f, 0x58, 0xc0, 0xac, 0x8e, 0x43, 0xdf, 0x0b, 0x98, 0x85, 0xdb, 0xbe, 0xd5, 0xde, + 0xb0, 0xee, 0xb4, 0x70, 0xb8, 0x67, 0x36, 0x43, 0xc2, 0x08, 0x9c, 0xed, 0xae, 0x9a, 0xb8, 0xed, + 0x9b, 0xed, 0x0d, 0xfd, 0x08, 0xf2, 0xbd, 0x80, 0x58, 0xe2, 0x57, 0x1a, 0xe9, 0x67, 0x1c, 0x42, + 0x7d, 0x42, 0xad, 0x2a, 0xa2, 0x58, 0x7a, 0x5b, 0xed, 0x8d, 0x2a, 0x66, 0x68, 0xc3, 0x6a, 0x22, + 0xd7, 0x0b, 0x10, 0xf3, 0x48, 0xa0, 0x6c, 0xf5, 0x01, 0x38, 0x1e, 0x57, 0xae, 0xcd, 0x0f, 0xac, + 0xb1, 0x8e, 0x5a, 0x9a, 0x73, 0x89, 0x4b, 0xc4, 0xa7, 0xc5, 0xbf, 0xd4, 0xec, 0x82, 0x4b, 0x88, + 0xdb, 0xc0, 0x16, 0x6a, 0x7a, 0x16, 0x0a, 0x02, 0xc2, 0x04, 0x12, 0x55, 0xab, 0x25, 0xb5, 0x2a, + 0x46, 0xd5, 0xd6, 0x6d, 0x8b, 0x79, 0x3e, 0xa6, 0x0c, 0xf9, 0x4d, 0x69, 0x60, 0xbc, 0x0d, 0x8e, + 0x7e, 0xc8, 0xd9, 0x5e, 0x72, 0x1c, 0xd2, 0x0a, 0x98, 0x8d, 0xef, 0xb4, 0x30, 0x65, 0xb0, 0x08, + 0x72, 0xa8, 0x56, 0x0b, 0x31, 0xa5, 0x45, 0x6d, 0x59, 0x5b, 0x9f, 0xb2, 0xa3, 0xe1, 0x3b, 0xf9, + 0xaf, 0x1e, 0x97, 0xc6, 0xfe, 0x7c, 0x5c, 0x1a, 0x33, 0x1c, 0x30, 0x97, 0x74, 0xa5, 0x4d, 0x12, + 0x50, 0xcc, 0x7d, 0xab, 0xa8, 0x81, 0x02, 0x07, 0x47, 0xbe, 0x6a, 0x08, 0x4f, 0x82, 0x29, 0x87, + 0xd4, 0x70, 0xa5, 0x8e, 0x68, 0xbd, 0x38, 0x2e, 0xd6, 0xf2, 0x7c, 0xe2, 0x2a, 0xa2, 0x75, 0x38, + 0x07, 0x26, 0x02, 0xc2, 0x9d, 0x32, 0xcb, 0xda, 0x7a, 0xd6, 0x96, 0x03, 0xe3, 0x3d, 0x30, 0x2f, + 0x40, 0xb6, 0x44, 0x7a, 0xff, 0x01, 0xcb, 0x2f, 0x34, 0xa0, 0x0f, 0x8b, 0xa0, 0xc8, 0xae, 0x80, + 0x43, 0xf2, 0xe4, 0x2a, 0xc9, 0x48, 0x33, 0x72, 0xf6, 0x92, 0x9c, 0x84, 0x3a, 0xc8, 0x53, 0x0e, + 0xca, 0xf9, 0x8d, 0x0b, 0x7e, 0xdd, 0x31, 0x0f, 0x81, 0x64, 0xd4, 0x4a, 0xd0, 0xf2, 0xab, 0x38, + 0x54, 0x3b, 0x98, 0x51, 0xb3, 0x1f, 0x88, 0x49, 0xe3, 0x3a, 0x58, 0x10, 0x3c, 0x3e, 0x46, 0x0d, + 0xaf, 0x86, 0x18, 0x09, 0xfb, 0x36, 0x73, 0x0a, 0x4c, 0x3b, 0x24, 0xe8, 0xe7, 0x51, 0xe0, 0x73, + 0x97, 0x06, 0x76, 0xf5, 0xb5, 0x06, 0x16, 0x53, 0xa2, 0xa9, 0x8d, 0xad, 0x81, 0xc3, 0x11, 0xab, + 0x64, 0xc4, 0x88, 0xec, 0x6b, 0xdc, 0x5a, 0x54, 0x44, 0x65, 0x79, 0xce, 0xaf, 0x72, 0x3c, 0xe7, + 0x55, 0x11, 0x75, 0x5d, 0x47, 0x15, 0x91, 0x71, 0x5d, 0x81, 0x7d, 0xc4, 0x48, 0x88, 0xdc, 0xd1, + 0x60, 0x70, 0x16, 0x64, 0x76, 0xf1, 0x9e, 0xaa, 0x37, 0xfe, 0x19, 0x83, 0x3f, 0xab, 0xe0, 0xbb, + 0xc1, 0x14, 0xfc, 0x1c, 0x98, 0x68, 0xa3, 0x46, 0x2b, 0x02, 0x97, 0x03, 0xe3, 0x02, 0x98, 0x55, + 0xa5, 0x54, 0x7b, 0xa5, 0x4d, 0xae, 0x81, 0x23, 0x31, 0x3f, 0x05, 0x01, 0x41, 0x96, 0xd7, 0xbe, + 0xf0, 0x9a, 0xb6, 0xc5, 0xb7, 0x71, 0x17, 0x40, 0x61, 0xb8, 0xd3, 0xb9, 0x41, 0x5c, 0x1a, 0x41, + 0x40, 0x90, 0x15, 0x37, 0x46, 0xc6, 0x17, 0xdf, 0xf0, 0x32, 0x00, 0xbd, 0x77, 0x45, 0xec, 0xad, + 0xb0, 0xb9, 0x6a, 0xca, 0xa2, 0x35, 0xf9, 0x23, 0x64, 0xca, 0x27, 0x4c, 0x3d, 0x42, 0xe6, 0xad, + 0x5e, 0xaa, 0xec, 0x98, 0x67, 0x8c, 0xe4, 0x43, 0x4d, 0x25, 0x36, 0x02, 0x57, 0x3c, 0x4f, 0x83, + 0x6c, 0x83, 0xb8, 0x7c, 0x77, 0x99, 0xf5, 0xc2, 0xe6, 0x31, 0xb3, 0xff, 0x35, 0x34, 0x6f, 0x10, + 0xd7, 0x16, 0x26, 0xf0, 0xca, 0x10, 0x52, 0x6b, 0x23, 0x49, 0x49, 0x9c, 0x38, 0x2b, 0x63, 0x4e, + 0xe5, 0xe1, 0x16, 0x0a, 0x91, 0x1f, 0xe5, 0xc1, 0xb0, 0x15, 0xc1, 0x68, 0x56, 0x11, 0x7c, 0x17, + 0x4c, 0x36, 0xc5, 0x8c, 0x48, 0x50, 0x61, 0xb3, 0x38, 0x48, 0x51, 0x7a, 0x94, 0xa7, 0x9e, 0x3e, + 0x2f, 0x8d, 0x7d, 0xf7, 0xc7, 0x0f, 0x67, 0x34, 0x5b, 0xb9, 0x18, 0x4f, 0x34, 0x70, 0x68, 0x9b, + 0xd5, 0xb7, 0x50, 0xa3, 0x11, 0x4b, 0x37, 0x0a, 0x5d, 0x1a, 0x1d, 0x0c, 0xff, 0x86, 0x27, 0x40, + 0xce, 0x45, 0xb4, 0xe2, 0xa0, 0xa6, 0xba, 0x23, 0x93, 0x2e, 0xa2, 0x5b, 0xa8, 0x09, 0x3f, 0x05, + 0xb3, 0xcd, 0x90, 0x34, 0x09, 0xc5, 0x61, 0xf7, 0x9e, 0xf1, 0x3b, 0x32, 0x5d, 0xde, 0xfc, 0xeb, + 0x79, 0xc9, 0x74, 0x3d, 0x56, 0x6f, 0x55, 0x4d, 0x87, 0xf8, 0x96, 0x6a, 0x10, 0xf2, 0xef, 0x1c, + 0xad, 0xed, 0x5a, 0x6c, 0xaf, 0x89, 0xa9, 0xb9, 0xd5, 0xbb, 0xe0, 0xf6, 0xe1, 0x28, 0x56, 0x74, + 0x39, 0xe7, 0x41, 0xde, 0xa9, 0x23, 0x2f, 0xa8, 0x78, 0xb5, 0x62, 0x76, 0x59, 0x5b, 0xcf, 0xd8, + 0x39, 0x31, 0xbe, 0x56, 0x33, 0x76, 0xc0, 0xd1, 0x6d, 0xca, 0x3c, 0x1f, 0x31, 0x7c, 0x05, 0xf5, + 0xb2, 0x31, 0x0b, 0x32, 0x2e, 0x92, 0xe4, 0xb3, 0x36, 0xff, 0xe4, 0x33, 0x21, 0x66, 0x82, 0xf7, + 0xb4, 0xcd, 0x3f, 0x79, 0xd4, 0xb6, 0x5f, 0xc1, 0x61, 0x48, 0xe4, 0x85, 0x9e, 0xb2, 0x73, 0x6d, + 0x7f, 0x9b, 0x0f, 0x8d, 0x87, 0xd9, 0xa8, 0x0a, 0x42, 0xe4, 0xe0, 0x9d, 0x4e, 0x94, 0x94, 0x0d, + 0x90, 0xf1, 0xa9, 0xab, 0x32, 0x5c, 0x1a, 0xcc, 0xf0, 0x4d, 0xea, 0x6e, 0xf3, 0x39, 0xdc, 0xf2, + 0x77, 0x3a, 0x36, 0xb7, 0x85, 0x17, 0xc1, 0x34, 0xe3, 0x41, 0x2a, 0x0e, 0x09, 0x6e, 0x7b, 0xae, + 0x40, 0x2a, 0x6c, 0x2e, 0x0e, 0xfa, 0x0a, 0xa8, 0x2d, 0x61, 0x64, 0x17, 0x58, 0x6f, 0x00, 0xb7, + 0xc0, 0x74, 0x33, 0xc4, 0x35, 0xec, 0x60, 0x4a, 0x49, 0x48, 0x8b, 0x59, 0x51, 0x82, 0x23, 0xd1, + 0x13, 0x4e, 0xfc, 0x5d, 0xad, 0x36, 0x88, 0xb3, 0x1b, 0xbd, 0x60, 0x13, 0x22, 0x8d, 0x05, 0x31, + 0x27, 0xdf, 0x2f, 0xb8, 0x08, 0x80, 0x34, 0x11, 0xd7, 0x6c, 0x52, 0x64, 0x64, 0x4a, 0xcc, 0x88, + 0xce, 0x74, 0x35, 0x5a, 0xe6, 0xcd, 0xb3, 0x98, 0x13, 0xdb, 0xd0, 0x4d, 0xd9, 0x59, 0xcd, 0xa8, + 0xb3, 0x9a, 0x3b, 0x51, 0x67, 0x2d, 0xcf, 0xf0, 0x32, 0x7b, 0xf4, 0x6b, 0x49, 0x93, 0xa5, 0x26, + 0x23, 0xf1, 0xe5, 0xa1, 0xd5, 0x92, 0xff, 0x77, 0xaa, 0x65, 0x2a, 0x51, 0x2d, 0xd0, 0x00, 0x33, + 0x72, 0x0f, 0x3e, 0xea, 0x54, 0x78, 0x81, 0x80, 0x58, 0x1a, 0x6e, 0xa2, 0xce, 0x15, 0x44, 0xdf, + 0xcf, 0xe6, 0xc7, 0x67, 0x33, 0x76, 0x9e, 0x75, 0x2a, 0x5e, 0x50, 0xc3, 0x1d, 0xe3, 0x8c, 0x7a, + 0x1c, 0xbb, 0xa5, 0xd0, 0x7b, 0xb9, 0x6a, 0x88, 0xa1, 0xe8, 0x82, 0xf0, 0x6f, 0xe3, 0x49, 0x06, + 0x1c, 0xef, 0x19, 0x97, 0x79, 0xd4, 0x58, 0xe9, 0xb0, 0x4e, 0xf4, 0x7e, 0x8c, 0x2e, 0x1d, 0xd6, + 0xa1, 0xaf, 0xa1, 0x74, 0xfe, 0x3b, 0xf5, 0x03, 0x9e, 0xba, 0x71, 0x0e, 0x9c, 0x18, 0x38, 0xb8, + 0x7d, 0x0e, 0xfa, 0x58, 0xb7, 0xd7, 0x53, 0x7c, 0x19, 0x47, 0x3d, 0xc5, 0xb8, 0xd1, 0xed, 0xe3, + 0x6a, 0x5a, 0x85, 0x78, 0x0b, 0xe4, 0xf9, 0xc3, 0x5f, 0xb9, 0x8d, 0x55, 0x2f, 0x2d, 0xcf, 0xff, + 0xf2, 0xbc, 0x74, 0x4c, 0xee, 0x90, 0xd6, 0x76, 0x4d, 0x8f, 0x58, 0x3e, 0x62, 0x75, 0xf3, 0x5a, + 0xc0, 0x78, 0x8f, 0x17, 0xde, 0x9b, 0x3f, 0x4e, 0x83, 0x09, 0x11, 0x0e, 0x7e, 0xa6, 0x81, 0x9c, + 0x92, 0x36, 0x70, 0x65, 0xf0, 0xfc, 0x87, 0x68, 0x57, 0x7d, 0x75, 0x94, 0x99, 0xa4, 0x66, 0xac, + 0x3d, 0xf8, 0xe9, 0xf7, 0x6f, 0xc6, 0x4f, 0xc1, 0x12, 0x57, 0xda, 0x84, 0x46, 0x7a, 0x5b, 0x49, + 0x1b, 0xeb, 0x9e, 0x3a, 0xaa, 0xfb, 0xf0, 0x5b, 0x0d, 0xcc, 0x24, 0xd4, 0x23, 0x7c, 0x23, 0x05, + 0x62, 0x98, 0x4a, 0xd5, 0xcf, 0x1e, 0xcc, 0x58, 0xb1, 0x32, 0x05, 0xab, 0x75, 0xb8, 0x9a, 0x64, + 0x15, 0x89, 0xd4, 0x01, 0x72, 0xdf, 0x6b, 0x60, 0xb6, 0x5f, 0x04, 0x42, 0x33, 0x05, 0x32, 0x45, + 0x7b, 0xea, 0xd6, 0x81, 0xed, 0x15, 0xcb, 0x0b, 0x82, 0xe5, 0x79, 0x68, 0x26, 0x59, 0xb6, 0x23, + 0xfb, 0x1e, 0xd1, 0xb8, 0xa6, 0xbd, 0x0f, 0x1f, 0x68, 0x20, 0xa7, 0xa4, 0x5e, 0xea, 0x71, 0x26, + 0x55, 0x64, 0xea, 0x71, 0xf6, 0x29, 0x46, 0x63, 0x5d, 0x50, 0x32, 0xe0, 0x72, 0x92, 0x92, 0x92, + 0x8d, 0x34, 0x96, 0xb2, 0x2f, 0x35, 0x90, 0x53, 0x82, 0x2f, 0x95, 0x44, 0x52, 0x5d, 0xa6, 0x92, + 0xe8, 0xd3, 0x8d, 0xc6, 0x39, 0x41, 0x62, 0x0d, 0xae, 0x24, 0x49, 0x50, 0x69, 0xd6, 0xe3, 0x60, + 0xdd, 0xdb, 0xc5, 0x7b, 0xf7, 0x61, 0x1b, 0x64, 0xb9, 0x26, 0x84, 0x46, 0x6a, 0x89, 0x74, 0x85, + 0xa6, 0xfe, 0xbf, 0x7d, 0x6d, 0x14, 0xfe, 0x8a, 0xc0, 0x2f, 0xc1, 0xc5, 0xfe, 0xea, 0xa9, 0x25, + 0x32, 0x40, 0xc1, 0xa4, 0x94, 0x44, 0xf0, 0xff, 0x29, 0x51, 0x13, 0xca, 0x4b, 0x5f, 0x19, 0x61, + 0xa5, 0xd0, 0x17, 0x04, 0xfa, 0x71, 0x38, 0x97, 0x44, 0x97, 0x52, 0x0b, 0x32, 0x90, 0x53, 0x4a, + 0x0b, 0x2e, 0x0f, 0xc6, 0x4b, 0x8a, 0x30, 0x7d, 0x6d, 0x54, 0x9f, 0x88, 0x30, 0x97, 0x04, 0x66, + 0x11, 0x1e, 0x4f, 0x62, 0x62, 0x56, 0xaf, 0x38, 0x1c, 0xea, 0x2e, 0x28, 0xc4, 0x64, 0xd2, 0x01, + 0x90, 0x87, 0xec, 0x75, 0x88, 0xce, 0x32, 0x0c, 0x81, 0xbb, 0x00, 0xf5, 0x3e, 0x5c, 0x65, 0xca, + 0x5f, 0x5b, 0xd8, 0x01, 0x39, 0xd5, 0x3b, 0x53, 0xeb, 0x2c, 0x29, 0xb3, 0x52, 0xeb, 0xac, 0xaf, + 0x05, 0xa7, 0xed, 0x5a, 0x36, 0x4d, 0xd6, 0x81, 0x9f, 0x6b, 0x00, 0xf4, 0x1e, 0x74, 0xb8, 0xbe, + 0x5f, 0xd8, 0x78, 0xb3, 0xd6, 0x4f, 0x1f, 0xc0, 0x52, 0x71, 0x38, 0x25, 0x38, 0x9c, 0x84, 0xf3, + 0xc3, 0x38, 0x88, 0x0e, 0xc3, 0x13, 0xa0, 0x1a, 0xc2, 0x3e, 0xb7, 0x3d, 0xde, 0x47, 0xf6, 0xb9, + 0xed, 0x89, 0xbe, 0x92, 0x96, 0x80, 0xa8, 0xd7, 0x94, 0x2f, 0x3e, 0x7d, 0xb1, 0xa4, 0x3d, 0x7b, + 0xb1, 0xa4, 0xfd, 0xf6, 0x62, 0x49, 0x7b, 0xf4, 0x72, 0x69, 0xec, 0xd9, 0xcb, 0xa5, 0xb1, 0x9f, + 0x5f, 0x2e, 0x8d, 0x7d, 0xb2, 0x1a, 0xeb, 0xb7, 0x5d, 0x5f, 0x42, 0xad, 0xf6, 0xe6, 0x79, 0xab, + 0x23, 0xe2, 0x88, 0x9e, 0x5b, 0x9d, 0x14, 0x3d, 0xfe, 0xcd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x44, 0x79, 0x97, 0x64, 0x1d, 0x12, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Account queries an Ethereum account. + Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) + // CosmosAccount queries an Ethereum account's Cosmos Address. + CosmosAccount(ctx context.Context, in *QueryCosmosAccountRequest, opts ...grpc.CallOption) (*QueryCosmosAccountResponse, error) + // ValidatorAccount queries an Ethereum account's from a validator consensus + // Address. + ValidatorAccount(ctx context.Context, in *QueryValidatorAccountRequest, opts ...grpc.CallOption) (*QueryValidatorAccountResponse, error) + // Balance queries the balance of a the EVM denomination for a single + // EthAccount. + Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) + // Storage queries the balance of all coins for a single account. + Storage(ctx context.Context, in *QueryStorageRequest, opts ...grpc.CallOption) (*QueryStorageResponse, error) + // Code queries the balance of all coins for a single account. + Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) + // Params queries the parameters of x/evm module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // EthCall implements the `eth_call` rpc api + EthCall(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) + // EstimateGas implements the `eth_estimateGas` rpc api + EstimateGas(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) + // TraceTx implements the `debug_traceTransaction` rpc api + TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error) + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) + // BaseFee queries the base fee of the parent block of the current block, + // it's similar to feemarket module's method, but also checks london hardfork status. + BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { + out := new(QueryAccountResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Account", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CosmosAccount(ctx context.Context, in *QueryCosmosAccountRequest, opts ...grpc.CallOption) (*QueryCosmosAccountResponse, error) { + out := new(QueryCosmosAccountResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/CosmosAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorAccount(ctx context.Context, in *QueryValidatorAccountRequest, opts ...grpc.CallOption) (*QueryValidatorAccountResponse, error) { + out := new(QueryValidatorAccountResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/ValidatorAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { + out := new(QueryBalanceResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Balance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Storage(ctx context.Context, in *QueryStorageRequest, opts ...grpc.CallOption) (*QueryStorageResponse, error) { + out := new(QueryStorageResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Storage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) { + out := new(QueryCodeResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Code", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EthCall(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) { + out := new(MsgEthereumTxResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/EthCall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EstimateGas(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) { + out := new(EstimateGasResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/EstimateGas", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error) { + out := new(QueryTraceTxResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) { + out := new(QueryTraceBlockResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) { + out := new(QueryBaseFeeResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/BaseFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Account queries an Ethereum account. + Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) + // CosmosAccount queries an Ethereum account's Cosmos Address. + CosmosAccount(context.Context, *QueryCosmosAccountRequest) (*QueryCosmosAccountResponse, error) + // ValidatorAccount queries an Ethereum account's from a validator consensus + // Address. + ValidatorAccount(context.Context, *QueryValidatorAccountRequest) (*QueryValidatorAccountResponse, error) + // Balance queries the balance of a the EVM denomination for a single + // EthAccount. + Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) + // Storage queries the balance of all coins for a single account. + Storage(context.Context, *QueryStorageRequest) (*QueryStorageResponse, error) + // Code queries the balance of all coins for a single account. + Code(context.Context, *QueryCodeRequest) (*QueryCodeResponse, error) + // Params queries the parameters of x/evm module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // EthCall implements the `eth_call` rpc api + EthCall(context.Context, *EthCallRequest) (*MsgEthereumTxResponse, error) + // EstimateGas implements the `eth_estimateGas` rpc api + EstimateGas(context.Context, *EthCallRequest) (*EstimateGasResponse, error) + // TraceTx implements the `debug_traceTransaction` rpc api + TraceTx(context.Context, *QueryTraceTxRequest) (*QueryTraceTxResponse, error) + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + TraceBlock(context.Context, *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) + // BaseFee queries the base fee of the parent block of the current block, + // it's similar to feemarket module's method, but also checks london hardfork status. + BaseFee(context.Context, *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") +} +func (*UnimplementedQueryServer) CosmosAccount(ctx context.Context, req *QueryCosmosAccountRequest) (*QueryCosmosAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CosmosAccount not implemented") +} +func (*UnimplementedQueryServer) ValidatorAccount(ctx context.Context, req *QueryValidatorAccountRequest) (*QueryValidatorAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorAccount not implemented") +} +func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") +} +func (*UnimplementedQueryServer) Storage(ctx context.Context, req *QueryStorageRequest) (*QueryStorageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Storage not implemented") +} +func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Code not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) EthCall(ctx context.Context, req *EthCallRequest) (*MsgEthereumTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EthCall not implemented") +} +func (*UnimplementedQueryServer) EstimateGas(ctx context.Context, req *EthCallRequest) (*EstimateGasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateGas not implemented") +} +func (*UnimplementedQueryServer) TraceTx(ctx context.Context, req *QueryTraceTxRequest) (*QueryTraceTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraceTx not implemented") +} +func (*UnimplementedQueryServer) TraceBlock(ctx context.Context, req *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraceBlock not implemented") +} +func (*UnimplementedQueryServer) BaseFee(ctx context.Context, req *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BaseFee not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Account(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Account", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CosmosAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCosmosAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CosmosAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/CosmosAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CosmosAccount(ctx, req.(*QueryCosmosAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/ValidatorAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorAccount(ctx, req.(*QueryValidatorAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Balance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Balance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Storage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryStorageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Storage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Storage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Storage(ctx, req.(*QueryStorageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Code_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Code(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Code", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Code(ctx, req.(*QueryCodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EthCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EthCallRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EthCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/EthCall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EthCall(ctx, req.(*EthCallRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EstimateGas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EthCallRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EstimateGas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/EstimateGas", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EstimateGas(ctx, req.(*EthCallRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraceTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraceTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraceTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/TraceTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraceTx(ctx, req.(*QueryTraceTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraceBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraceBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraceBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/TraceBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraceBlock(ctx, req.(*QueryTraceBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BaseFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBaseFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BaseFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/BaseFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BaseFee(ctx, req.(*QueryBaseFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethermint.evm.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Account", + Handler: _Query_Account_Handler, + }, + { + MethodName: "CosmosAccount", + Handler: _Query_CosmosAccount_Handler, + }, + { + MethodName: "ValidatorAccount", + Handler: _Query_ValidatorAccount_Handler, + }, + { + MethodName: "Balance", + Handler: _Query_Balance_Handler, + }, + { + MethodName: "Storage", + Handler: _Query_Storage_Handler, + }, + { + MethodName: "Code", + Handler: _Query_Code_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "EthCall", + Handler: _Query_EthCall_Handler, + }, + { + MethodName: "EstimateGas", + Handler: _Query_EstimateGas_Handler, + }, + { + MethodName: "TraceTx", + Handler: _Query_TraceTx_Handler, + }, + { + MethodName: "TraceBlock", + Handler: _Query_TraceBlock_Handler, + }, + { + MethodName: "BaseFee", + Handler: _Query_BaseFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ethermint/evm/v1/query.proto", +} + +func (m *QueryAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x18 + } + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Balance) > 0 { + i -= len(m.Balance) + copy(dAtA[i:], m.Balance) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCosmosAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCosmosAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCosmosAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCosmosAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCosmosAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCosmosAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AccountNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x10 + } + if len(m.CosmosAddress) > 0 { + i -= len(m.CosmosAddress) + copy(dAtA[i:], m.CosmosAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CosmosAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConsAddress) > 0 { + i -= len(m.ConsAddress) + copy(dAtA[i:], m.ConsAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ConsAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AccountNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x10 + } + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balance) > 0 { + i -= len(m.Balance) + copy(dAtA[i:], m.Balance) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryStorageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryStorageRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStorageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryStorageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryStorageResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStorageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCodeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCodeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCodeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCodeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTxLogsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTxLogsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTxLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTxLogsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTxLogsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTxLogsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Logs) > 0 { + for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EthCallRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EthCallRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x20 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x1a + } + if m.GasCap != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.GasCap)) + i-- + dAtA[i] = 0x10 + } + if len(m.Args) > 0 { + i -= len(m.Args) + copy(dAtA[i:], m.Args) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Args))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EstimateGasResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EstimateGasResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EstimateGasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VmError) > 0 { + i -= len(m.VmError) + copy(dAtA[i:], m.VmError) + i = encodeVarintQuery(dAtA, i, uint64(len(m.VmError))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ret) > 0 { + i -= len(m.Ret) + copy(dAtA[i:], m.Ret) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Ret))) + i-- + dAtA[i] = 0x12 + } + if m.Gas != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Gas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceTxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceTxRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockMaxGas != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockMaxGas)) + i-- + dAtA[i] = 0x50 + } + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x48 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintQuery(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x3a + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.BlockNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x28 + } + if len(m.Predecessors) > 0 { + for iNdEx := len(m.Predecessors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Predecessors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.TraceConfig != nil { + { + size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceTxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceBlockRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockMaxGas != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockMaxGas)) + i-- + dAtA[i] = 0x50 + } + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x48 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintQuery(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x3a + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.BlockNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x28 + } + if m.TraceConfig != nil { + { + size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceBlockResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBaseFeeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBaseFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBaseFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryBaseFeeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBaseFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBaseFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BaseFee != nil { + { + size := m.BaseFee.Size() + i -= size + if _, err := m.BaseFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Balance) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + return n +} + +func (m *QueryCosmosAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCosmosAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CosmosAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) + } + if m.AccountNumber != 0 { + n += 1 + sovQuery(uint64(m.AccountNumber)) + } + return n +} + +func (m *QueryValidatorAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConsAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) + } + if m.AccountNumber != 0 { + n += 1 + sovQuery(uint64(m.AccountNumber)) + } + return n +} + +func (m *QueryBalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Balance) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStorageRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStorageResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Code) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTxLogsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTxLogsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Logs) > 0 { + for _, e := range m.Logs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *EthCallRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Args) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.GasCap != 0 { + n += 1 + sovQuery(uint64(m.GasCap)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + return n +} + +func (m *EstimateGasResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Gas != 0 { + n += 1 + sovQuery(uint64(m.Gas)) + } + l = len(m.Ret) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.VmError) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraceTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TraceConfig != nil { + l = m.TraceConfig.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Predecessors) > 0 { + for _, e := range m.Predecessors { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.BlockNumber != 0 { + n += 1 + sovQuery(uint64(m.BlockNumber)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) + n += 1 + l + sovQuery(uint64(l)) + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + if m.BlockMaxGas != 0 { + n += 1 + sovQuery(uint64(m.BlockMaxGas)) + } + return n +} + +func (m *QueryTraceTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraceBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, e := range m.Txs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.TraceConfig != nil { + l = m.TraceConfig.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockNumber != 0 { + n += 1 + sovQuery(uint64(m.BlockNumber)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) + n += 1 + l + sovQuery(uint64(l)) + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + if m.BlockMaxGas != 0 { + n += 1 + sovQuery(uint64(m.BlockMaxGas)) + } + return n +} + +func (m *QueryTraceBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBaseFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryBaseFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseFee != nil { + l = m.BaseFee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balance = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCosmosAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCosmosAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCosmosAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCosmosAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCosmosAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCosmosAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CosmosAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + m.AccountNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + m.AccountNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balance = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStorageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStorageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStorageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStorageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStorageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStorageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCodeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCodeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = append(m.Code[:0], dAtA[iNdEx:postIndex]...) + if m.Code == nil { + m.Code = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTxLogsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTxLogsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTxLogsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTxLogsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTxLogsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTxLogsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = append(m.Logs, &Log{}) + if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EthCallRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EthCallRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EthCallRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = append(m.Args[:0], dAtA[iNdEx:postIndex]...) + if m.Args == nil { + m.Args = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasCap", wireType) + } + m.GasCap = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasCap |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EstimateGasResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EstimateGasResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EstimateGasResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Gas", wireType) + } + m.Gas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Gas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) + if m.Ret == nil { + m.Ret = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VmError", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VmError = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Msg == nil { + m.Msg = &MsgEthereumTx{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TraceConfig == nil { + m.TraceConfig = &TraceConfig{} + } + if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Predecessors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Predecessors = append(m.Predecessors, &MsgEthereumTx{}) + if err := m.Predecessors[len(m.Predecessors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) + } + m.BlockMaxGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockMaxGas |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, &MsgEthereumTx{}) + if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TraceConfig == nil { + m.TraceConfig = &TraceConfig{} + } + if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) + } + m.BlockMaxGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockMaxGas |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceBlockResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBaseFeeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBaseFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBaseFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBaseFeeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBaseFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBaseFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.BaseFee = &v + if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/evm/types/query.pb.gw.go b/legacy/evm/types/query.pb.gw.go new file mode 100644 index 0000000..a7ba384 --- /dev/null +++ b/legacy/evm/types/query.pb.gw.go @@ -0,0 +1,1178 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ethermint/evm/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Account(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Account(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_CosmosAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCosmosAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.CosmosAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CosmosAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCosmosAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.CosmosAccount(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ValidatorAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["cons_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") + } + + protoReq.ConsAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) + } + + msg, err := client.ValidatorAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValidatorAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["cons_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") + } + + protoReq.ConsAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) + } + + msg, err := server.ValidatorAccount(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Balance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Balance(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Storage_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStorageRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := client.Storage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Storage_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStorageRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := server.Storage(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCodeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Code(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCodeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Code(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_EthCall_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_EthCall_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EthCall_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EthCall(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EthCall_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EthCall_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EthCall(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_EstimateGas_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateGas_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EstimateGas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateGas_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EstimateGas(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_TraceTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceTxRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TraceTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceTxRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TraceTx(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_TraceBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceBlockRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TraceBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceBlockRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TraceBlock(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBaseFeeRequest + var metadata runtime.ServerMetadata + + msg, err := client.BaseFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBaseFeeRequest + var metadata runtime.ServerMetadata + + msg, err := server.BaseFee(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Account_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CosmosAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Storage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EthCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EstimateGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TraceBlock_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Account_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Account_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CosmosAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CosmosAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValidatorAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Balance_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Storage_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Storage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Code_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_EthCall_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EthCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_EstimateGas_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EstimateGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TraceTx_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TraceBlock_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BaseFee_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "account", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CosmosAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "cosmos_account", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ValidatorAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "validator_account", "cons_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Storage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"evmos", "evm", "v1", "storage", "address", "key"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "codes", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Account_0 = runtime.ForwardResponseMessage + + forward_Query_CosmosAccount_0 = runtime.ForwardResponseMessage + + forward_Query_ValidatorAccount_0 = runtime.ForwardResponseMessage + + forward_Query_Balance_0 = runtime.ForwardResponseMessage + + forward_Query_Storage_0 = runtime.ForwardResponseMessage + + forward_Query_Code_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_EthCall_0 = runtime.ForwardResponseMessage + + forward_Query_EstimateGas_0 = runtime.ForwardResponseMessage + + forward_Query_TraceTx_0 = runtime.ForwardResponseMessage + + forward_Query_TraceBlock_0 = runtime.ForwardResponseMessage + + forward_Query_BaseFee_0 = runtime.ForwardResponseMessage +) diff --git a/legacy/evm/types/storage.go b/legacy/evm/types/storage.go new file mode 100644 index 0000000..730c157 --- /dev/null +++ b/legacy/evm/types/storage.go @@ -0,0 +1,68 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "fmt" + "strings" + + errorsmod "cosmossdk.io/errors" + "github.com/ethereum/go-ethereum/common" +) + +// Storage represents the account Storage map as a slice of single key value +// State pairs. This is to prevent non determinism at genesis initialization or export. +type Storage []State + +// Validate performs a basic validation of the Storage fields. +func (s Storage) Validate() error { + seenStorage := make(map[string]bool) + for i, state := range s { + if seenStorage[state.Key] { + return errorsmod.Wrapf(ErrInvalidState, "duplicate state key %d: %s", i, state.Key) + } + + if err := state.Validate(); err != nil { + return err + } + + seenStorage[state.Key] = true + } + return nil +} + +// String implements the stringer interface +func (s Storage) String() string { + var str string + for _, state := range s { + str += fmt.Sprintf("%s\n", state.String()) + } + + return str +} + +// Copy returns a copy of storage. +func (s Storage) Copy() Storage { + cpy := make(Storage, len(s)) + copy(cpy, s) + + return cpy +} + +// Validate performs a basic validation of the State fields. +// NOTE: state value can be empty +func (s State) Validate() error { + if strings.TrimSpace(s.Key) == "" { + return errorsmod.Wrap(ErrInvalidState, "state key hash cannot be blank") + } + + return nil +} + +// NewState creates a new State instance +func NewState(key, value common.Hash) State { + return State{ + Key: key.String(), + Value: value.String(), + } +} diff --git a/legacy/evm/types/storage_test.go b/legacy/evm/types/storage_test.go new file mode 100644 index 0000000..515f2a8 --- /dev/null +++ b/legacy/evm/types/storage_test.go @@ -0,0 +1,84 @@ +package types + +import ( + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" +) + +func TestStorageValidate(t *testing.T) { + testCases := []struct { + name string + storage Storage + expPass bool + }{ + { + "valid storage", + Storage{ + NewState(common.BytesToHash([]byte{1, 2, 3}), common.BytesToHash([]byte{1, 2, 3})), + }, + true, + }, + { + "empty storage key bytes", + Storage{ + {Key: ""}, + }, + false, + }, + { + "duplicated storage key", + Storage{ + {Key: common.BytesToHash([]byte{1, 2, 3}).String()}, + {Key: common.BytesToHash([]byte{1, 2, 3}).String()}, + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + err := tc.storage.Validate() + if tc.expPass { + require.NoError(t, err, tc.name) + } else { + require.Error(t, err, tc.name) + } + } +} + +func TestStorageCopy(t *testing.T) { + testCases := []struct { + name string + storage Storage + }{ + { + "single storage", + Storage{ + NewState(common.BytesToHash([]byte{1, 2, 3}), common.BytesToHash([]byte{1, 2, 3})), + }, + }, + { + "empty storage key value bytes", + Storage{ + {Key: common.Hash{}.String(), Value: common.Hash{}.String()}, + }, + }, + { + "empty storage", + Storage{}, + }, + } + + for _, tc := range testCases { + tc := tc + require.Equal(t, tc.storage, tc.storage.Copy(), tc.name) + } +} + +func TestStorageString(t *testing.T) { + storage := Storage{NewState(common.BytesToHash([]byte("key")), common.BytesToHash([]byte("value")))} + str := "key:\"0x00000000000000000000000000000000000000000000000000000000006b6579\" value:\"0x00000000000000000000000000000000000000000000000000000076616c7565\" \n" + require.Equal(t, str, storage.String()) +} diff --git a/legacy/evm/types/testdata/SimpleContractHardhat.json b/legacy/evm/types/testdata/SimpleContractHardhat.json new file mode 100644 index 0000000..bb65878 --- /dev/null +++ b/legacy/evm/types/testdata/SimpleContractHardhat.json @@ -0,0 +1,37 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SimpleContract", + "sourceName": "contracts/SimpleContract.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "setValue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "value", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610133806100206000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80633fa4f24514603757806355241077146051575b600080fd5b603d6069565b604051604891906090565b60405180910390f35b606760048036038101906063919060d5565b606f565b005b60005481565b8060008190555050565b6000819050919050565b608a816079565b82525050565b600060208201905060a360008301846083565b92915050565b600080fd5b60b5816079565b811460bf57600080fd5b50565b60008135905060cf8160ae565b92915050565b60006020828403121560e85760e760a9565b5b600060f48482850160c2565b9150509291505056fea2646970667358221220c9305ac8499dab6bde1cc24810af134727f1640c623f14bce015f6812a73762764736f6c63430008130033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c80633fa4f24514603757806355241077146051575b600080fd5b603d6069565b604051604891906090565b60405180910390f35b606760048036038101906063919060d5565b606f565b005b60005481565b8060008190555050565b6000819050919050565b608a816079565b82525050565b600060208201905060a360008301846083565b92915050565b600080fd5b60b5816079565b811460bf57600080fd5b50565b60008135905060cf8160ae565b92915050565b60006020828403121560e85760e760a9565b5b600060f48482850160c2565b9150509291505056fea2646970667358221220c9305ac8499dab6bde1cc24810af134727f1640c623f14bce015f6812a73762764736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/legacy/evm/types/tracer.go b/legacy/evm/types/tracer.go new file mode 100644 index 0000000..9bcc678 --- /dev/null +++ b/legacy/evm/types/tracer.go @@ -0,0 +1,111 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math/big" + "os" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/params" + "github.com/evmos/evmos/v20/x/evm/core/logger" + "github.com/evmos/evmos/v20/x/evm/core/vm" +) + +const ( + TracerAccessList = "access_list" + TracerJSON = "json" + TracerStruct = "struct" + TracerMarkdown = "markdown" +) + +// NewTracer creates a new Logger tracer to collect execution traces from an +// EVM transaction. +func NewTracer(tracer string, msg core.Message, cfg *params.ChainConfig, height int64) vm.EVMLogger { + // TODO: enable additional log configuration + logCfg := &logger.Config{ + Debug: true, + } + + switch tracer { + case TracerAccessList: + preCompiles := vm.DefaultActivePrecompiles(cfg.Rules(big.NewInt(height), cfg.MergeNetsplitBlock != nil)) + return logger.NewAccessListTracer(msg.AccessList(), msg.From(), *msg.To(), preCompiles) + case TracerJSON: + return logger.NewJSONLogger(logCfg, os.Stderr) + case TracerMarkdown: + return logger.NewMarkdownLogger(logCfg, os.Stdout) // TODO: Stderr ? + case TracerStruct: + return logger.NewStructLogger(logCfg) + default: + return NewNoOpTracer() + } +} + +// TxTraceResult is the result of a single transaction trace during a block trace. +type TxTraceResult struct { + Result interface{} `json:"result,omitempty"` // Trace results produced by the tracer + Error string `json:"error,omitempty"` // Trace failure produced by the tracer +} + +var _ vm.EVMLogger = &NoOpTracer{} + +// NoOpTracer is an empty implementation of vm.Tracer interface +type NoOpTracer struct{} + +// NewNoOpTracer creates a no-op vm.Tracer +func NewNoOpTracer() *NoOpTracer { + return &NoOpTracer{} +} + +// CaptureStart implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureStart(env *vm.EVM, + from common.Address, + to common.Address, + create bool, + input []byte, + gas uint64, + value *big.Int) { +} + +// CaptureState implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { +} + +// CaptureFault implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { +} + +// CaptureEnd implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, err error) {} + +// CaptureEnter implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +// CaptureExit implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} + +// CaptureTxStart implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureTxStart(gasLimit uint64) {} + +// CaptureTxEnd implements vm.Tracer interface +// +//nolint:revive // allow unused parameters to indicate expected signature +func (dt NoOpTracer) CaptureTxEnd(restGas uint64) {} diff --git a/legacy/evm/types/tracer_test.go b/legacy/evm/types/tracer_test.go new file mode 100644 index 0000000..6e21f93 --- /dev/null +++ b/legacy/evm/types/tracer_test.go @@ -0,0 +1,11 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestNewNoOpTracer(t *testing.T) { + require.Equal(t, &NoOpTracer{}, NewNoOpTracer()) +} diff --git a/legacy/evm/types/tx.go b/legacy/evm/types/tx.go new file mode 100644 index 0000000..f2fbbe2 --- /dev/null +++ b/legacy/evm/types/tx.go @@ -0,0 +1,81 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math" + "math/big" + + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/ethereum/go-ethereum/common" + "github.com/evmos/evmos/v20/x/evm/core/vm" +) + +// EvmTxArgs encapsulates all possible params to create all EVM txs types. +// This includes LegacyTx, DynamicFeeTx and AccessListTx +type EvmTxArgs struct { + Nonce uint64 + GasLimit uint64 + Input []byte + GasFeeCap *big.Int + GasPrice *big.Int + ChainID *big.Int + Amount *big.Int + GasTipCap *big.Int + To *common.Address + Accesses *ethtypes.AccessList +} + +// ToTxData converts the EvmTxArgs to TxData +func (args *EvmTxArgs) ToTxData() (TxData, error) { + ethTx := NewTx(args).AsTransaction() + return NewTxDataFromTx(ethTx) +} + +// GetTxPriority returns the priority of a given Ethereum tx. It relies of the +// priority reduction global variable to calculate the tx priority given the tx +// tip price: +// +// tx_priority = tip_price / priority_reduction +func GetTxPriority(txData TxData, baseFee *big.Int) (priority int64) { + // calculate priority based on effective gas price + tipPrice := txData.EffectiveGasPrice(baseFee) + // if london hardfork is not enabled, tipPrice is the gasPrice + if baseFee != nil { + tipPrice = new(big.Int).Sub(tipPrice, baseFee) + } + + priority = math.MaxInt64 + priorityBig := new(big.Int).Quo(tipPrice, DefaultPriorityReduction.BigInt()) + + // safety check + if priorityBig.IsInt64() { + priority = priorityBig.Int64() + } + + return priority +} + +// Failed returns if the contract execution failed in vm errors +func (m *MsgEthereumTxResponse) Failed() bool { + return len(m.VmError) > 0 +} + +// Return is a helper function to help caller distinguish between revert reason +// and function return. Return returns the data after execution if no error occurs. +func (m *MsgEthereumTxResponse) Return() []byte { + if m.Failed() { + return nil + } + return common.CopyBytes(m.Ret) +} + +// Revert returns the concrete revert reason if the execution is aborted by `REVERT` +// opcode. Note the reason can be nil if no data supplied with revert opcode. +func (m *MsgEthereumTxResponse) Revert() []byte { + if m.VmError != vm.ErrExecutionReverted.Error() { + return nil + } + return common.CopyBytes(m.Ret) +} diff --git a/legacy/evm/types/tx.pb.go b/legacy/evm/types/tx.pb.go new file mode 100644 index 0000000..57b26ba --- /dev/null +++ b/legacy/evm/types/tx.pb.go @@ -0,0 +1,3269 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/tx.proto + +package types + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. +type MsgEthereumTx struct { + // data is inner transaction data of the Ethereum transaction + Data *types.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // size is the encoded storage size of the transaction (DEPRECATED) + Size_ float64 `protobuf:"fixed64,2,opt,name=size,proto3" json:"-"` + // hash of the transaction in hex format + Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty" rlp:"-"` + // from is the ethereum signer address in hex format. This address value is checked + // against the address derived from the signature (V, R, S) using the + // secp256k1 elliptic curve + From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` +} + +func (m *MsgEthereumTx) Reset() { *m = MsgEthereumTx{} } +func (m *MsgEthereumTx) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumTx) ProtoMessage() {} +func (*MsgEthereumTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{0} +} +func (m *MsgEthereumTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEthereumTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEthereumTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumTx.Merge(m, src) +} +func (m *MsgEthereumTx) XXX_Size() int { + return m.Size() +} +func (m *MsgEthereumTx) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumTx.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEthereumTx proto.InternalMessageInfo + +// LegacyTx is the transaction data of regular Ethereum transactions. +// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the +// AllowUnprotectedTxs parameter is disabled. +type LegacyTx struct { + // nonce corresponds to the account nonce (transaction sequence). + Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + // gas_price defines the value for each gas unit + GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` + // gas defines the gas limit defined for the transaction. + GasLimit uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"` + // to is the hex formatted address of the recipient + To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` + // value defines the unsigned integer value of the transaction amount. + Amount *cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` + // data is the data payload bytes of the transaction. + Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` + // v defines the signature value + V []byte `protobuf:"bytes,7,opt,name=v,proto3" json:"v,omitempty"` + // r defines the signature value + R []byte `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"` + // s define the signature value + S []byte `protobuf:"bytes,9,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *LegacyTx) Reset() { *m = LegacyTx{} } +func (m *LegacyTx) String() string { return proto.CompactTextString(m) } +func (*LegacyTx) ProtoMessage() {} +func (*LegacyTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{1} +} +func (m *LegacyTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LegacyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LegacyTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LegacyTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_LegacyTx.Merge(m, src) +} +func (m *LegacyTx) XXX_Size() int { + return m.Size() +} +func (m *LegacyTx) XXX_DiscardUnknown() { + xxx_messageInfo_LegacyTx.DiscardUnknown(m) +} + +var xxx_messageInfo_LegacyTx proto.InternalMessageInfo + +// AccessListTx is the data of EIP-2930 access list transactions. +type AccessListTx struct { + // chain_id of the destination EVM chain + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` + // nonce corresponds to the account nonce (transaction sequence). + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // gas_price defines the value for each gas unit + GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` + // gas defines the gas limit defined for the transaction. + GasLimit uint64 `protobuf:"varint,4,opt,name=gas,proto3" json:"gas,omitempty"` + // to is the recipient address in hex format + To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` + // value defines the unsigned integer value of the transaction amount. + Amount *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` + // data is the data payload bytes of the transaction. + Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` + // accesses is an array of access tuples + Accesses AccessList `protobuf:"bytes,8,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"` + // v defines the signature value + V []byte `protobuf:"bytes,9,opt,name=v,proto3" json:"v,omitempty"` + // r defines the signature value + R []byte `protobuf:"bytes,10,opt,name=r,proto3" json:"r,omitempty"` + // s define the signature value + S []byte `protobuf:"bytes,11,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *AccessListTx) Reset() { *m = AccessListTx{} } +func (m *AccessListTx) String() string { return proto.CompactTextString(m) } +func (*AccessListTx) ProtoMessage() {} +func (*AccessListTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{2} +} +func (m *AccessListTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessListTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessListTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessListTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessListTx.Merge(m, src) +} +func (m *AccessListTx) XXX_Size() int { + return m.Size() +} +func (m *AccessListTx) XXX_DiscardUnknown() { + xxx_messageInfo_AccessListTx.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessListTx proto.InternalMessageInfo + +// DynamicFeeTx is the data of EIP-1559 dynamic fee transactions. +type DynamicFeeTx struct { + // chain_id of the destination EVM chain + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` + // nonce corresponds to the account nonce (transaction sequence). + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // gas_tip_cap defines the max value for the gas tip + GasTipCap *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_tip_cap,json=gasTipCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_tip_cap,omitempty"` + // gas_fee_cap defines the max value for the gas fee + GasFeeCap *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=gas_fee_cap,json=gasFeeCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_fee_cap,omitempty"` + // gas defines the gas limit defined for the transaction. + GasLimit uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"` + // to is the hex formatted address of the recipient + To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` + // value defines the transaction amount. + Amount *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` + // data is the data payload bytes of the transaction. + Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` + // accesses is an array of access tuples + Accesses AccessList `protobuf:"bytes,9,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"` + // v defines the signature value + V []byte `protobuf:"bytes,10,opt,name=v,proto3" json:"v,omitempty"` + // r defines the signature value + R []byte `protobuf:"bytes,11,opt,name=r,proto3" json:"r,omitempty"` + // s define the signature value + S []byte `protobuf:"bytes,12,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *DynamicFeeTx) Reset() { *m = DynamicFeeTx{} } +func (m *DynamicFeeTx) String() string { return proto.CompactTextString(m) } +func (*DynamicFeeTx) ProtoMessage() {} +func (*DynamicFeeTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{3} +} +func (m *DynamicFeeTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DynamicFeeTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DynamicFeeTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_DynamicFeeTx.Merge(m, src) +} +func (m *DynamicFeeTx) XXX_Size() int { + return m.Size() +} +func (m *DynamicFeeTx) XXX_DiscardUnknown() { + xxx_messageInfo_DynamicFeeTx.DiscardUnknown(m) +} + +var xxx_messageInfo_DynamicFeeTx proto.InternalMessageInfo + +// ExtensionOptionsEthereumTx is an extension option for ethereum transactions +type ExtensionOptionsEthereumTx struct { +} + +func (m *ExtensionOptionsEthereumTx) Reset() { *m = ExtensionOptionsEthereumTx{} } +func (m *ExtensionOptionsEthereumTx) String() string { return proto.CompactTextString(m) } +func (*ExtensionOptionsEthereumTx) ProtoMessage() {} +func (*ExtensionOptionsEthereumTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{4} +} +func (m *ExtensionOptionsEthereumTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtensionOptionsEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtensionOptionsEthereumTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExtensionOptionsEthereumTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionOptionsEthereumTx.Merge(m, src) +} +func (m *ExtensionOptionsEthereumTx) XXX_Size() int { + return m.Size() +} +func (m *ExtensionOptionsEthereumTx) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionOptionsEthereumTx.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionOptionsEthereumTx proto.InternalMessageInfo + +// MsgEthereumTxResponse defines the Msg/EthereumTx response type. +type MsgEthereumTxResponse struct { + // hash of the ethereum transaction in hex format. This hash differs from the + // Tendermint sha256 hash of the transaction bytes. See + // https://github.com/tendermint/tendermint/issues/6539 for reference + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // logs contains the transaction hash and the proto-compatible ethereum + // logs. + Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` + // ret is the returned data from evm function (result or data supplied with revert + // opcode) + Ret []byte `protobuf:"bytes,3,opt,name=ret,proto3" json:"ret,omitempty"` + // vm_error is the error returned by vm execution + VmError string `protobuf:"bytes,4,opt,name=vm_error,json=vmError,proto3" json:"vm_error,omitempty"` + // gas_used specifies how much gas was consumed by the transaction + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` +} + +func (m *MsgEthereumTxResponse) Reset() { *m = MsgEthereumTxResponse{} } +func (m *MsgEthereumTxResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumTxResponse) ProtoMessage() {} +func (*MsgEthereumTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{5} +} +func (m *MsgEthereumTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEthereumTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEthereumTxResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEthereumTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumTxResponse.Merge(m, src) +} +func (m *MsgEthereumTxResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEthereumTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEthereumTxResponse proto.InternalMessageInfo + +// MsgUpdateParams defines a Msg for updating the x/evm module parameters. +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/evm parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{6} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{7} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgEthereumTx)(nil), "ethermint.evm.v1.MsgEthereumTx") + proto.RegisterType((*LegacyTx)(nil), "ethermint.evm.v1.LegacyTx") + proto.RegisterType((*AccessListTx)(nil), "ethermint.evm.v1.AccessListTx") + proto.RegisterType((*DynamicFeeTx)(nil), "ethermint.evm.v1.DynamicFeeTx") + proto.RegisterType((*ExtensionOptionsEthereumTx)(nil), "ethermint.evm.v1.ExtensionOptionsEthereumTx") + proto.RegisterType((*MsgEthereumTxResponse)(nil), "ethermint.evm.v1.MsgEthereumTxResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "ethermint.evm.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "ethermint.evm.v1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } + +var fileDescriptor_f75ac0a12d075f21 = []byte{ + // 1038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4f, 0x6f, 0xe3, 0xc4, + 0x1b, 0xc7, 0xeb, 0xc4, 0xf9, 0x37, 0xc9, 0xef, 0x47, 0xb1, 0x5a, 0xea, 0x64, 0x21, 0xce, 0x1a, + 0x16, 0xd2, 0x4a, 0xb5, 0xd9, 0x22, 0x21, 0x6d, 0xb8, 0xd0, 0x6c, 0xbb, 0x68, 0x51, 0x2b, 0x56, + 0x26, 0x7b, 0x41, 0x48, 0x61, 0xea, 0x4c, 0x9d, 0x11, 0xb1, 0xc7, 0xf2, 0x4c, 0xac, 0x84, 0x13, + 0xda, 0x13, 0xe2, 0x84, 0xc4, 0x95, 0x03, 0x07, 0x0e, 0x2b, 0x4e, 0x3d, 0x2c, 0xbc, 0x86, 0x15, + 0xa7, 0x15, 0x5c, 0x10, 0x87, 0x80, 0x52, 0x50, 0xa5, 0x1e, 0x79, 0x05, 0x68, 0x66, 0x9c, 0x26, + 0x69, 0x68, 0xbb, 0xac, 0x04, 0x97, 0x6a, 0x9e, 0x79, 0xfe, 0xcc, 0x93, 0xcf, 0xf3, 0xed, 0x8c, + 0x41, 0x19, 0xb1, 0x2e, 0x8a, 0x7c, 0x1c, 0x30, 0x1b, 0xc5, 0xbe, 0x1d, 0xdf, 0xb4, 0xd9, 0xc0, + 0x0a, 0x23, 0xc2, 0x88, 0xb6, 0x7c, 0xe6, 0xb2, 0x50, 0xec, 0x5b, 0xf1, 0xcd, 0xca, 0xf3, 0xd0, + 0xc7, 0x01, 0xb1, 0xc5, 0x5f, 0x19, 0x54, 0x59, 0x73, 0x09, 0xf5, 0x09, 0xb5, 0x7d, 0xea, 0xf1, + 0x64, 0x9f, 0x7a, 0x89, 0xa3, 0x2c, 0x1d, 0x6d, 0x61, 0xd9, 0xd2, 0x48, 0x5c, 0x95, 0x85, 0x33, + 0x79, 0x7d, 0xe9, 0x5b, 0xf1, 0x88, 0x47, 0x64, 0x0e, 0x5f, 0x25, 0xbb, 0x2f, 0x7a, 0x84, 0x78, + 0x3d, 0x64, 0xc3, 0x10, 0xdb, 0x30, 0x08, 0x08, 0x83, 0x0c, 0x93, 0x60, 0x52, 0xaf, 0x9c, 0x78, + 0x85, 0x75, 0xd0, 0x3f, 0xb4, 0x61, 0x30, 0x94, 0x2e, 0xf3, 0x3b, 0x05, 0xfc, 0x6f, 0x9f, 0x7a, + 0xbb, 0xfc, 0x40, 0xd4, 0xf7, 0x5b, 0x03, 0xad, 0x0e, 0xd4, 0x0e, 0x64, 0x50, 0x57, 0x6a, 0x4a, + 0xbd, 0xb8, 0xb5, 0x62, 0xc9, 0x5c, 0x6b, 0x92, 0x6b, 0x6d, 0x07, 0x43, 0x47, 0x44, 0x68, 0x55, + 0xa0, 0x52, 0xfc, 0x09, 0xd2, 0x53, 0x35, 0xa5, 0xae, 0x34, 0xc1, 0xe9, 0xc8, 0x50, 0x36, 0x1f, + 0x9e, 0x1c, 0x6d, 0x28, 0x8e, 0xd8, 0xd7, 0x5e, 0x01, 0x6a, 0x17, 0xd2, 0xae, 0x9e, 0xae, 0x29, + 0xf5, 0x42, 0x73, 0xf9, 0xcf, 0x91, 0x91, 0x8b, 0x7a, 0x61, 0xc3, 0xdc, 0x34, 0x93, 0x28, 0xee, + 0xd5, 0x34, 0xa0, 0x1e, 0x46, 0xc4, 0xd7, 0x55, 0x1e, 0xe5, 0x88, 0x75, 0xa3, 0xf6, 0xd9, 0xd7, + 0xc6, 0xd2, 0xe7, 0x27, 0x47, 0x1b, 0x6b, 0x53, 0x12, 0x73, 0x5d, 0x9a, 0x0f, 0x53, 0x20, 0xbf, + 0x87, 0x3c, 0xe8, 0x0e, 0x5b, 0x03, 0x6d, 0x05, 0x64, 0x02, 0x12, 0xb8, 0x48, 0xf4, 0xac, 0x3a, + 0xd2, 0xd0, 0xde, 0x04, 0x05, 0x0f, 0x72, 0xbe, 0xd8, 0x95, 0x3d, 0x16, 0x9a, 0xe5, 0x5f, 0x46, + 0xc6, 0xaa, 0x44, 0x4d, 0x3b, 0x1f, 0x5b, 0x98, 0xd8, 0x3e, 0x64, 0x5d, 0xeb, 0x6e, 0xc0, 0x9c, + 0xbc, 0x07, 0xe9, 0x3d, 0x1e, 0xaa, 0x55, 0x41, 0xda, 0x83, 0x54, 0x74, 0xad, 0x36, 0x4b, 0xe3, + 0x91, 0x91, 0x7f, 0x07, 0xd2, 0x3d, 0xec, 0x63, 0xe6, 0x70, 0x87, 0xf6, 0x7f, 0x90, 0x62, 0x24, + 0x69, 0x37, 0xc5, 0x88, 0x76, 0x0b, 0x64, 0x62, 0xd8, 0xeb, 0x23, 0x3d, 0x23, 0xce, 0x78, 0xf9, + 0xc2, 0x33, 0xc6, 0x23, 0x23, 0xbb, 0xed, 0x93, 0x7e, 0xc0, 0x1c, 0x99, 0xc1, 0x7f, 0xbb, 0x60, + 0x9d, 0xad, 0x29, 0xf5, 0x52, 0x42, 0xb5, 0x04, 0x94, 0x58, 0xcf, 0x89, 0x0d, 0x25, 0xe6, 0x56, + 0xa4, 0xe7, 0xa5, 0x15, 0x71, 0x8b, 0xea, 0x05, 0x69, 0xd1, 0xc6, 0x0d, 0x4e, 0xe9, 0x87, 0x47, + 0x9b, 0xd9, 0xd6, 0x60, 0x07, 0x32, 0xc8, 0x79, 0x69, 0x53, 0x5e, 0x13, 0x3a, 0xe6, 0x28, 0x0d, + 0x4a, 0xdb, 0xae, 0x8b, 0x28, 0xdd, 0xc3, 0x94, 0xb5, 0x06, 0xda, 0xbb, 0x20, 0xef, 0x76, 0x21, + 0x0e, 0xda, 0xb8, 0x23, 0x88, 0x15, 0x9a, 0xf6, 0x65, 0x3d, 0xe7, 0x6e, 0xf3, 0xe0, 0xbb, 0x3b, + 0xa7, 0x23, 0x23, 0xe7, 0xca, 0xa5, 0x93, 0x2c, 0x3a, 0x53, 0xf4, 0xa9, 0x0b, 0xd1, 0xa7, 0xff, + 0x31, 0x7a, 0xf5, 0x72, 0xf4, 0x99, 0x45, 0xf4, 0xd9, 0x67, 0x46, 0x9f, 0x9b, 0x41, 0xff, 0x11, + 0xc8, 0x43, 0x01, 0x0a, 0x51, 0x3d, 0x5f, 0x4b, 0xd7, 0x8b, 0x5b, 0x2f, 0x59, 0xe7, 0xff, 0xc7, + 0x2d, 0x89, 0xb2, 0xd5, 0x0f, 0x7b, 0xa8, 0x79, 0xe3, 0xf1, 0xc8, 0x58, 0x3a, 0x1d, 0x19, 0x00, + 0x9e, 0xf1, 0xfd, 0xf6, 0x57, 0x03, 0x4c, 0x69, 0x4b, 0xa1, 0x9f, 0x55, 0x95, 0xc3, 0x2d, 0xcc, + 0x0d, 0x17, 0xcc, 0x0d, 0xb7, 0x38, 0x19, 0xee, 0xfa, 0xe2, 0x70, 0x5f, 0x98, 0x0e, 0x77, 0x76, + 0x9e, 0xe6, 0x57, 0x2a, 0x28, 0xed, 0x0c, 0x03, 0xe8, 0x63, 0xf7, 0x0e, 0x42, 0xff, 0xc9, 0x80, + 0x6f, 0x81, 0x22, 0x1f, 0x30, 0xc3, 0x61, 0xdb, 0x85, 0xe1, 0xd5, 0x23, 0xe6, 0x72, 0x68, 0xe1, + 0xf0, 0x36, 0x0c, 0x27, 0xa9, 0x87, 0x08, 0x89, 0x54, 0xf5, 0x69, 0x52, 0xef, 0x20, 0xc4, 0x53, + 0x13, 0x79, 0x64, 0x2e, 0x97, 0x47, 0x76, 0x51, 0x1e, 0xb9, 0x67, 0x96, 0x47, 0xfe, 0x02, 0x79, + 0x14, 0xfe, 0x3d, 0x79, 0x80, 0x39, 0x79, 0x14, 0xe7, 0xe4, 0x51, 0x7a, 0x3a, 0x79, 0xcc, 0xaa, + 0xc1, 0x34, 0x41, 0x65, 0x77, 0xc0, 0x50, 0x40, 0x31, 0x09, 0xde, 0x0b, 0xc5, 0xbb, 0x30, 0xbd, + 0x48, 0x1b, 0x2a, 0x2f, 0x64, 0x7e, 0xa3, 0x80, 0xd5, 0xb9, 0x0b, 0xd6, 0x41, 0x34, 0x24, 0x01, + 0x15, 0x20, 0xc4, 0x25, 0xae, 0xc8, 0xeb, 0x59, 0x5c, 0xd9, 0xeb, 0x40, 0xed, 0x11, 0x8f, 0xea, + 0x29, 0x01, 0x61, 0x75, 0x11, 0xc2, 0x1e, 0xf1, 0x1c, 0x11, 0xa2, 0x2d, 0x83, 0x74, 0x84, 0x98, + 0x10, 0x48, 0xc9, 0xe1, 0x4b, 0xad, 0x0c, 0xf2, 0xb1, 0xdf, 0x46, 0x51, 0x44, 0xa2, 0xe4, 0x12, + 0xcd, 0xc5, 0xfe, 0x2e, 0x37, 0xb9, 0x8b, 0x4b, 0xa3, 0x4f, 0x51, 0x47, 0x0e, 0xd9, 0xc9, 0x79, + 0x90, 0xde, 0xa7, 0xa8, 0x93, 0xb4, 0xf9, 0xbd, 0x02, 0x9e, 0xdb, 0xa7, 0xde, 0xfd, 0xb0, 0x03, + 0x19, 0xba, 0x07, 0x23, 0xe8, 0x53, 0x7e, 0xd7, 0xc0, 0x3e, 0xeb, 0x92, 0x08, 0xb3, 0x61, 0xa2, + 0x76, 0xfd, 0xc7, 0x47, 0x9b, 0x2b, 0xc9, 0x8b, 0xba, 0xdd, 0xe9, 0x44, 0x88, 0xd2, 0xf7, 0x59, + 0x84, 0x03, 0xcf, 0x99, 0x86, 0x6a, 0x6f, 0x81, 0x6c, 0x28, 0x2a, 0x08, 0x65, 0x17, 0xb7, 0xf4, + 0xc5, 0x9f, 0x21, 0x4f, 0x68, 0x16, 0xf8, 0x18, 0xe5, 0xa8, 0x92, 0x94, 0x86, 0xf5, 0xe0, 0xe4, + 0x68, 0x63, 0x5a, 0x8c, 0xe3, 0xbf, 0x86, 0x62, 0xfe, 0xce, 0x0f, 0xc4, 0x93, 0x7d, 0xae, 0x49, + 0xb3, 0x0c, 0xd6, 0xce, 0x6d, 0x4d, 0x00, 0x6f, 0xfd, 0xa1, 0x80, 0xf4, 0x3e, 0xf5, 0xb4, 0x21, + 0x00, 0x33, 0xaf, 0xb0, 0xb1, 0xd8, 0xcd, 0xdc, 0x7c, 0x2a, 0xaf, 0x5d, 0x11, 0x30, 0xa9, 0x6f, + 0x5e, 0x7f, 0xf0, 0xd3, 0xef, 0x5f, 0xa6, 0xae, 0x99, 0x65, 0x5b, 0x36, 0x38, 0xf9, 0xa2, 0x48, + 0x22, 0xdb, 0x6c, 0xa0, 0x7d, 0x08, 0x4a, 0x73, 0x48, 0xaf, 0xff, 0x6d, 0xed, 0xd9, 0x90, 0xca, + 0xfa, 0x95, 0x21, 0x93, 0x06, 0x2a, 0x99, 0x4f, 0x39, 0xba, 0xe6, 0xdb, 0x8f, 0xc7, 0x55, 0xe5, + 0xc9, 0xb8, 0xaa, 0xfc, 0x36, 0xae, 0x2a, 0x5f, 0x1c, 0x57, 0x97, 0x9e, 0x1c, 0x57, 0x97, 0x7e, + 0x3e, 0xae, 0x2e, 0x7d, 0xf0, 0xaa, 0x87, 0x59, 0xb7, 0x7f, 0x60, 0xb9, 0xc4, 0x9f, 0xf6, 0x48, + 0xa8, 0x1d, 0x6f, 0xbd, 0x9e, 0xe0, 0x64, 0xc3, 0x10, 0xd1, 0x83, 0xac, 0xf8, 0x06, 0x79, 0xe3, + 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x94, 0x7d, 0xc7, 0x93, 0x09, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // EthereumTx defines a method submitting Ethereum transactions. + EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) + // UpdateParams defined a governance operation for updating the x/evm module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) { + out := new(MsgEthereumTxResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Msg/EthereumTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // EthereumTx defines a method submitting Ethereum transactions. + EthereumTx(context.Context, *MsgEthereumTx) (*MsgEthereumTxResponse, error) + // UpdateParams defined a governance operation for updating the x/evm module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) EthereumTx(ctx context.Context, req *MsgEthereumTx) (*MsgEthereumTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EthereumTx not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_EthereumTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEthereumTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EthereumTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Msg/EthereumTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EthereumTx(ctx, req.(*MsgEthereumTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethermint.evm.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "EthereumTx", + Handler: _Msg_EthereumTx_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ethermint/evm/v1/tx.proto", +} + +func (m *MsgEthereumTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEthereumTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0x22 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x1a + } + if m.Size_ != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Size_)))) + i-- + dAtA[i] = 0x11 + } + if m.Data != nil { + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LegacyTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LegacyTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LegacyTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTx(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x4a + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintTx(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x42 + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintTx(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x3a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x32 + } + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x22 + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x18 + } + if m.GasPrice != nil { + { + size := m.GasPrice.Size() + i -= size + if _, err := m.GasPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Nonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccessListTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessListTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessListTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTx(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x5a + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintTx(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x52 + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintTx(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x4a + } + if len(m.Accesses) > 0 { + for iNdEx := len(m.Accesses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accesses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x3a + } + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x2a + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x20 + } + if m.GasPrice != nil { + { + size := m.GasPrice.Size() + i -= size + if _, err := m.GasPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Nonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 + } + if m.ChainID != nil { + { + size := m.ChainID.Size() + i -= size + if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DynamicFeeTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DynamicFeeTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTx(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x62 + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintTx(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x5a + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintTx(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x52 + } + if len(m.Accesses) > 0 { + for iNdEx := len(m.Accesses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accesses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x42 + } + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x32 + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x28 + } + if m.GasFeeCap != nil { + { + size := m.GasFeeCap.Size() + i -= size + if _, err := m.GasFeeCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.GasTipCap != nil { + { + size := m.GasTipCap.Size() + i -= size + if _, err := m.GasTipCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Nonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 + } + if m.ChainID != nil { + { + size := m.ChainID.Size() + i -= size + if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExtensionOptionsEthereumTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtensionOptionsEthereumTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtensionOptionsEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEthereumTxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEthereumTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEthereumTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasUsed != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x28 + } + if len(m.VmError) > 0 { + i -= len(m.VmError) + copy(dAtA[i:], m.VmError) + i = encodeVarintTx(dAtA, i, uint64(len(m.VmError))) + i-- + dAtA[i] = 0x22 + } + if len(m.Ret) > 0 { + i -= len(m.Ret) + copy(dAtA[i:], m.Ret) + i = encodeVarintTx(dAtA, i, uint64(len(m.Ret))) + i-- + dAtA[i] = 0x1a + } + if len(m.Logs) > 0 { + for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgEthereumTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Data != nil { + l = m.Data.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Size_ != 0 { + n += 9 + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *LegacyTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovTx(uint64(m.Nonce)) + } + if m.GasPrice != nil { + l = m.GasPrice.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *AccessListTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainID != nil { + l = m.ChainID.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovTx(uint64(m.Nonce)) + } + if m.GasPrice != nil { + l = m.GasPrice.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Accesses) > 0 { + for _, e := range m.Accesses { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *DynamicFeeTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainID != nil { + l = m.ChainID.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovTx(uint64(m.Nonce)) + } + if m.GasTipCap != nil { + l = m.GasTipCap.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasFeeCap != nil { + l = m.GasFeeCap.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Accesses) > 0 { + for _, e := range m.Accesses { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *ExtensionOptionsEthereumTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEthereumTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Logs) > 0 { + for _, e := range m.Logs { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Ret) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.VmError) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GasUsed != 0 { + n += 1 + sovTx(uint64(m.GasUsed)) + } + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgEthereumTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEthereumTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Data == nil { + m.Data = &types.Any{} + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Size_ = float64(math.Float64frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LegacyTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LegacyTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LegacyTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasPrice = &v + if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessListTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessListTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessListTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ChainID = &v + if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasPrice = &v + if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accesses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accesses = append(m.Accesses, AccessTuple{}) + if err := m.Accesses[len(m.Accesses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DynamicFeeTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DynamicFeeTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ChainID = &v + if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasTipCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasTipCap = &v + if err := m.GasTipCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasFeeCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasFeeCap = &v + if err := m.GasFeeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accesses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accesses = append(m.Accesses, AccessTuple{}) + if err := m.Accesses[len(m.Accesses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExtensionOptionsEthereumTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtensionOptionsEthereumTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtensionOptionsEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEthereumTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEthereumTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEthereumTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = append(m.Logs, &Log{}) + if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) + if m.Ret == nil { + m.Ret = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VmError", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VmError = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/legacy/evm/types/tx.pb.gw.go b/legacy/evm/types/tx.pb.gw.go new file mode 100644 index 0000000..08f7466 --- /dev/null +++ b/legacy/evm/types/tx.pb.gw.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ethermint/evm/v1/tx.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Msg_EthereumTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgEthereumTx + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_EthereumTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EthereumTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgEthereumTx + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_EthereumTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EthereumTx(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". +// UnaryRPC :call MsgServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. +func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { + + mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_EthereumTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMsgHandler(ctx, mux, conn) +} + +// RegisterMsgHandler registers the http handlers for service Msg to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) +} + +// RegisterMsgHandlerClient registers the http handlers for service Msg +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MsgClient" to call the correct interceptors. +func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { + + mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_EthereumTx_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Msg_EthereumTx_0 = runtime.ForwardResponseMessage +) diff --git a/legacy/evm/types/tx_args.go b/legacy/evm/types/tx_args.go new file mode 100644 index 0000000..11f66e6 --- /dev/null +++ b/legacy/evm/types/tx_args.go @@ -0,0 +1,250 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "errors" + "fmt" + "math/big" + + sdkmath "cosmossdk.io/math" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" + ethtypes "github.com/ethereum/go-ethereum/core/types" +) + +// TransactionArgs represents the arguments to construct a new transaction +// or a message call using JSON-RPC. +// Duplicate struct definition since geth struct is in internal package +// Ref: https://github.com/ethereum/go-ethereum/blob/release/1.10.4/internal/ethapi/transaction_args.go#L36 +type TransactionArgs struct { + From *common.Address `json:"from"` + To *common.Address `json:"to"` + Gas *hexutil.Uint64 `json:"gas"` + GasPrice *hexutil.Big `json:"gasPrice"` + MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"` + MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"` + Value *hexutil.Big `json:"value"` + Nonce *hexutil.Uint64 `json:"nonce"` + + // We accept "data" and "input" for backwards-compatibility reasons. + // "input" is the newer name and should be preferred by clients. + // Issue detail: https://github.com/ethereum/go-ethereum/issues/15628 + Data *hexutil.Bytes `json:"data"` + Input *hexutil.Bytes `json:"input"` + + // Introduced by AccessListTxType transaction. + AccessList *ethtypes.AccessList `json:"accessList,omitempty"` + ChainID *hexutil.Big `json:"chainId,omitempty"` +} + +// String return the struct in a string format +func (args *TransactionArgs) String() string { + // Todo: There is currently a bug with hexutil.Big when the value its nil, printing would trigger an exception + return fmt.Sprintf("TransactionArgs{From:%v, To:%v, Gas:%v,"+ + " Nonce:%v, Data:%v, Input:%v, AccessList:%v}", + args.From, + args.To, + args.Gas, + args.Nonce, + args.Data, + args.Input, + args.AccessList) +} + +// ToTransaction converts the arguments to an ethereum transaction. +// This assumes that setTxDefaults has been called. +func (args *TransactionArgs) ToTransaction() *MsgEthereumTx { + var ( + chainID, value, gasPrice, maxFeePerGas, maxPriorityFeePerGas sdkmath.Int + gas, nonce uint64 + from, to string + ) + + // Set sender address or use zero address if none specified. + if args.ChainID != nil { + chainID = sdkmath.NewIntFromBigInt(args.ChainID.ToInt()) + } + + if args.Nonce != nil { + nonce = uint64(*args.Nonce) + } + + if args.Gas != nil { + gas = uint64(*args.Gas) + } + + if args.GasPrice != nil { + gasPrice = sdkmath.NewIntFromBigInt(args.GasPrice.ToInt()) + } + + if args.MaxFeePerGas != nil { + maxFeePerGas = sdkmath.NewIntFromBigInt(args.MaxFeePerGas.ToInt()) + } + + if args.MaxPriorityFeePerGas != nil { + maxPriorityFeePerGas = sdkmath.NewIntFromBigInt(args.MaxPriorityFeePerGas.ToInt()) + } + + if args.Value != nil { + value = sdkmath.NewIntFromBigInt(args.Value.ToInt()) + } + + if args.To != nil { + to = args.To.Hex() + } + + var data TxData + switch { + case args.MaxFeePerGas != nil: + al := AccessList{} + if args.AccessList != nil { + al = NewAccessList(args.AccessList) + } + + data = &DynamicFeeTx{ + To: to, + ChainID: &chainID, + Nonce: nonce, + GasLimit: gas, + GasFeeCap: &maxFeePerGas, + GasTipCap: &maxPriorityFeePerGas, + Amount: &value, + Data: args.GetData(), + Accesses: al, + } + case args.AccessList != nil: + data = &AccessListTx{ + To: to, + ChainID: &chainID, + Nonce: nonce, + GasLimit: gas, + GasPrice: &gasPrice, + Amount: &value, + Data: args.GetData(), + Accesses: NewAccessList(args.AccessList), + } + default: + data = &LegacyTx{ + To: to, + Nonce: nonce, + GasLimit: gas, + GasPrice: &gasPrice, + Amount: &value, + Data: args.GetData(), + } + } + + anyData, err := PackTxData(data) + if err != nil { + return nil + } + + if args.From != nil { + from = args.From.Hex() + } + + msg := MsgEthereumTx{ + Data: anyData, + From: from, + } + msg.Hash = msg.AsTransaction().Hash().Hex() + return &msg +} + +// ToMessage converts the arguments to the Message type used by the core evm. +// This assumes that setTxDefaults has been called. +func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (ethtypes.Message, error) { + // Reject invalid combinations of pre- and post-1559 fee styles + if args.GasPrice != nil && (args.MaxFeePerGas != nil || args.MaxPriorityFeePerGas != nil) { + return ethtypes.Message{}, errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified") + } + + // Set sender address or use zero address if none specified. + addr := args.GetFrom() + + // Set default gas & gas price if none were set + gas := globalGasCap + if gas == 0 { + gas = uint64(math.MaxUint64 / 2) + } + if args.Gas != nil { + gas = uint64(*args.Gas) + } + if globalGasCap != 0 && globalGasCap < gas { + gas = globalGasCap + } + var ( + gasPrice *big.Int + gasFeeCap *big.Int + gasTipCap *big.Int + ) + if baseFee == nil { + // If there's no basefee, then it must be a non-1559 execution + gasPrice = new(big.Int) + if args.GasPrice != nil { + gasPrice = args.GasPrice.ToInt() + } + gasFeeCap, gasTipCap = gasPrice, gasPrice + } else { + // A basefee is provided, necessitating 1559-type execution + if args.GasPrice != nil { + // User specified the legacy gas field, convert to 1559 gas typing + gasPrice = args.GasPrice.ToInt() + gasFeeCap, gasTipCap = gasPrice, gasPrice + } else { + // User specified 1559 gas feilds (or none), use those + gasFeeCap = new(big.Int) + if args.MaxFeePerGas != nil { + gasFeeCap = args.MaxFeePerGas.ToInt() + } + gasTipCap = new(big.Int) + if args.MaxPriorityFeePerGas != nil { + gasTipCap = args.MaxPriorityFeePerGas.ToInt() + } + // Backfill the legacy gasPrice for EVM execution, unless we're all zeroes + gasPrice = new(big.Int) + if gasFeeCap.BitLen() > 0 || gasTipCap.BitLen() > 0 { + gasPrice = math.BigMin(new(big.Int).Add(gasTipCap, baseFee), gasFeeCap) + } + } + } + value := new(big.Int) + if args.Value != nil { + value = args.Value.ToInt() + } + data := args.GetData() + var accessList ethtypes.AccessList + if args.AccessList != nil { + accessList = *args.AccessList + } + + nonce := uint64(0) + if args.Nonce != nil { + nonce = uint64(*args.Nonce) + } + + msg := ethtypes.NewMessage(addr, args.To, nonce, value, gas, gasPrice, gasFeeCap, gasTipCap, data, accessList, true) + return msg, nil +} + +// GetFrom retrieves the transaction sender address. +func (args *TransactionArgs) GetFrom() common.Address { + if args.From == nil { + return common.Address{} + } + return *args.From +} + +// GetData retrieves the transaction calldata. Input field is preferred. +func (args *TransactionArgs) GetData() []byte { + if args.Input != nil { + return *args.Input + } + if args.Data != nil { + return *args.Data + } + return nil +} diff --git a/legacy/evm/types/tx_args_test.go b/legacy/evm/types/tx_args_test.go new file mode 100644 index 0000000..4f61fba --- /dev/null +++ b/legacy/evm/types/tx_args_test.go @@ -0,0 +1,289 @@ +package types_test + +import ( + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/evmos/evmos/v20/x/evm/types" +) + +func (suite *TxDataTestSuite) TestTxArgsString() { + testCases := []struct { + name string + txArgs types.TransactionArgs + expectedString string + }{ + { + "empty tx args", + types.TransactionArgs{}, + "TransactionArgs{From:, To:, Gas:, Nonce:, Data:, Input:, AccessList:}", + }, + { + "tx args with fields", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + Nonce: &suite.hexUint64, + Input: &suite.hexInputBytes, + Data: &suite.hexDataBytes, + AccessList: ðtypes.AccessList{}, + }, + fmt.Sprintf("TransactionArgs{From:%v, To:%v, Gas:%v, Nonce:%v, Data:%v, Input:%v, AccessList:%v}", + &suite.addr, + &suite.addr, + &suite.hexUint64, + &suite.hexUint64, + &suite.hexDataBytes, + &suite.hexInputBytes, + ðtypes.AccessList{}), + }, + } + for _, tc := range testCases { + outputString := tc.txArgs.String() + suite.Require().Equal(outputString, tc.expectedString) + } +} + +func (suite *TxDataTestSuite) TestConvertTxArgsEthTx() { + testCases := []struct { + name string + txArgs types.TransactionArgs + }{ + { + "empty tx args", + types.TransactionArgs{}, + }, + { + "no nil args", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + GasPrice: &suite.hexBigInt, + MaxFeePerGas: &suite.hexBigInt, + MaxPriorityFeePerGas: &suite.hexBigInt, + Value: &suite.hexBigInt, + Nonce: &suite.hexUint64, + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + ChainID: &suite.hexBigInt, + }, + }, + { + "max fee per gas nil, but access list not nil", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + GasPrice: &suite.hexBigInt, + MaxFeePerGas: nil, + MaxPriorityFeePerGas: &suite.hexBigInt, + Value: &suite.hexBigInt, + Nonce: &suite.hexUint64, + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + ChainID: &suite.hexBigInt, + }, + }, + } + for _, tc := range testCases { + res := tc.txArgs.ToTransaction() + suite.Require().NotNil(res) + } +} + +func (suite *TxDataTestSuite) TestToMessageEVM() { + testCases := []struct { + name string + txArgs types.TransactionArgs + globalGasCap uint64 + baseFee *big.Int + expError bool + }{ + { + "empty tx args", + types.TransactionArgs{}, + uint64(0), + nil, + false, + }, + { + "specify gasPrice and (maxFeePerGas or maxPriorityFeePerGas)", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + GasPrice: &suite.hexBigInt, + MaxFeePerGas: &suite.hexBigInt, + MaxPriorityFeePerGas: &suite.hexBigInt, + Value: &suite.hexBigInt, + Nonce: &suite.hexUint64, + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + ChainID: &suite.hexBigInt, + }, + uint64(0), + nil, + true, + }, + { + "non-1559 execution, zero gas cap", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + GasPrice: &suite.hexBigInt, + MaxFeePerGas: nil, + MaxPriorityFeePerGas: nil, + Value: &suite.hexBigInt, + Nonce: &suite.hexUint64, + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + ChainID: &suite.hexBigInt, + }, + uint64(0), + nil, + false, + }, + { + "non-1559 execution, nonzero gas cap", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + GasPrice: &suite.hexBigInt, + MaxFeePerGas: nil, + MaxPriorityFeePerGas: nil, + Value: &suite.hexBigInt, + Nonce: &suite.hexUint64, + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + ChainID: &suite.hexBigInt, + }, + uint64(1), + nil, + false, + }, + { + "1559-type execution, nil gas price", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + GasPrice: nil, + MaxFeePerGas: &suite.hexBigInt, + MaxPriorityFeePerGas: &suite.hexBigInt, + Value: &suite.hexBigInt, + Nonce: &suite.hexUint64, + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + ChainID: &suite.hexBigInt, + }, + uint64(1), + suite.bigInt, + false, + }, + { + "1559-type execution, non-nil gas price", + types.TransactionArgs{ + From: &suite.addr, + To: &suite.addr, + Gas: &suite.hexUint64, + GasPrice: &suite.hexBigInt, + MaxFeePerGas: nil, + MaxPriorityFeePerGas: nil, + Value: &suite.hexBigInt, + Nonce: &suite.hexUint64, + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, + ChainID: &suite.hexBigInt, + }, + uint64(1), + suite.bigInt, + false, + }, + } + for _, tc := range testCases { + res, err := tc.txArgs.ToMessage(tc.globalGasCap, tc.baseFee) + + if tc.expError { + suite.Require().NotNil(err) + } else { + suite.Require().Nil(err) + suite.Require().NotNil(res) + } + } +} + +func (suite *TxDataTestSuite) TestGetFrom() { + testCases := []struct { + name string + txArgs types.TransactionArgs + expAddress common.Address + }{ + { + "empty from field", + types.TransactionArgs{}, + common.Address{}, + }, + { + "non-empty from field", + types.TransactionArgs{ + From: &suite.addr, + }, + suite.addr, + }, + } + for _, tc := range testCases { + retrievedAddress := tc.txArgs.GetFrom() + suite.Require().Equal(retrievedAddress, tc.expAddress) + } +} + +func (suite *TxDataTestSuite) TestGetData() { + testCases := []struct { + name string + txArgs types.TransactionArgs + expectedOutput []byte + }{ + { + "empty input and data fields", + types.TransactionArgs{ + Data: nil, + Input: nil, + }, + nil, + }, + { + "empty input field, non-empty data field", + types.TransactionArgs{ + Data: &suite.hexDataBytes, + Input: nil, + }, + []byte("data"), + }, + { + "non-empty input and data fields", + types.TransactionArgs{ + Data: &suite.hexDataBytes, + Input: &suite.hexInputBytes, + }, + []byte("input"), + }, + } + for _, tc := range testCases { + retrievedData := tc.txArgs.GetData() + suite.Require().Equal(retrievedData, tc.expectedOutput) + } +} diff --git a/legacy/evm/types/tx_data.go b/legacy/evm/types/tx_data.go new file mode 100644 index 0000000..189b49f --- /dev/null +++ b/legacy/evm/types/tx_data.go @@ -0,0 +1,82 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" +) + +var ( + _ TxData = &LegacyTx{} + _ TxData = &AccessListTx{} + _ TxData = &DynamicFeeTx{} +) + +// TxData implements the Ethereum transaction tx structure. It is used +// solely as intended in Ethereum abiding by the protocol. +type TxData interface { + // TODO: embed ethtypes.TxData. See https://github.com/ethereum/go-ethereum/issues/23154 + + TxType() byte + Copy() TxData + GetChainID() *big.Int + GetAccessList() ethtypes.AccessList + GetData() []byte + GetNonce() uint64 + GetGas() uint64 + GetGasPrice() *big.Int + GetGasTipCap() *big.Int + GetGasFeeCap() *big.Int + GetValue() *big.Int + GetTo() *common.Address + + GetRawSignatureValues() (v, r, s *big.Int) + SetSignatureValues(chainID, v, r, s *big.Int) + + AsEthereumData() ethtypes.TxData + Validate() error + + // static fee + Fee() *big.Int + Cost() *big.Int + + // effective gasPrice/fee/cost according to current base fee + EffectiveGasPrice(baseFee *big.Int) *big.Int + EffectiveFee(baseFee *big.Int) *big.Int + EffectiveCost(baseFee *big.Int) *big.Int +} + +// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the +// AllowUnprotectedTxs parameter is disabled. +func NewTxDataFromTx(tx *ethtypes.Transaction) (TxData, error) { + var txData TxData + var err error + switch tx.Type() { + case ethtypes.DynamicFeeTxType: + txData, err = NewDynamicFeeTx(tx) + case ethtypes.AccessListTxType: + txData, err = newAccessListTx(tx) + default: + txData, err = NewLegacyTx(tx) + } + if err != nil { + return nil, err + } + + return txData, nil +} + +func fee(gasPrice *big.Int, gas uint64) *big.Int { + gasLimit := new(big.Int).SetUint64(gas) + return new(big.Int).Mul(gasPrice, gasLimit) +} + +func cost(fee, value *big.Int) *big.Int { + if value != nil { + return new(big.Int).Add(fee, value) + } + return fee +} diff --git a/legacy/evm/types/tx_data_test.go b/legacy/evm/types/tx_data_test.go new file mode 100644 index 0000000..99b9b0c --- /dev/null +++ b/legacy/evm/types/tx_data_test.go @@ -0,0 +1,90 @@ +package types + +import ( + "math/big" + "testing" + + sdkmath "cosmossdk.io/math" + ethutils "github.com/evmos/evmos/v20/utils/eth" + "github.com/stretchr/testify/require" +) + +func TestTxData_chainID(t *testing.T) { + chainID := sdkmath.NewInt(1) + + testCases := []struct { + msg string + data TxData + expChainID *big.Int + }{ + { + "access list tx", &AccessListTx{Accesses: AccessList{}, ChainID: &chainID}, big.NewInt(1), + }, + { + "access list tx, nil chain ID", &AccessListTx{Accesses: AccessList{}}, nil, + }, + { + "legacy tx, derived", &LegacyTx{}, nil, + }, + } + + for _, tc := range testCases { + chainID := tc.data.GetChainID() + require.Equal(t, chainID, tc.expChainID, tc.msg) + } +} + +func TestTxData_DeriveChainID(t *testing.T) { + bitLen64, ok := new(big.Int).SetString("0x8000000000000000", 0) + require.True(t, ok) + + bitLen80, ok := new(big.Int).SetString("0x80000000000000000000", 0) + require.True(t, ok) + + expBitLen80, ok := new(big.Int).SetString("302231454903657293676526", 0) + require.True(t, ok) + + testCases := []struct { + msg string + data TxData + expChainID *big.Int + }{ + { + "v = -1", &LegacyTx{V: big.NewInt(-1).Bytes()}, nil, + }, + { + "v = 0", &LegacyTx{V: big.NewInt(0).Bytes()}, nil, + }, + { + "v = 1", &LegacyTx{V: big.NewInt(1).Bytes()}, nil, + }, + { + "v = 27", &LegacyTx{V: big.NewInt(27).Bytes()}, new(big.Int), + }, + { + "v = 28", &LegacyTx{V: big.NewInt(28).Bytes()}, new(big.Int), + }, + { + "Ethereum mainnet", &LegacyTx{V: big.NewInt(37).Bytes()}, big.NewInt(1), + }, + { + "chain ID 9000", &LegacyTx{V: big.NewInt(18035).Bytes()}, big.NewInt(9000), + }, + { + "bit len 64", &LegacyTx{V: bitLen64.Bytes()}, big.NewInt(4611686018427387886), + }, + { + "bit len 80", &LegacyTx{V: bitLen80.Bytes()}, expBitLen80, + }, + { + "v = nil ", &LegacyTx{V: nil}, nil, + }, + } + + for _, tc := range testCases { + v, _, _ := tc.data.GetRawSignatureValues() + + chainID := ethutils.DeriveChainID(v) + require.Equal(t, tc.expChainID, chainID, tc.msg) + } +} diff --git a/legacy/evm/types/tx_types.go b/legacy/evm/types/tx_types.go new file mode 100644 index 0000000..f1debce --- /dev/null +++ b/legacy/evm/types/tx_types.go @@ -0,0 +1,20 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package types + +import ( + gethtypes "github.com/ethereum/go-ethereum/core/types" +) + +func GetTxTypeName(txType int) string { + switch txType { + case gethtypes.DynamicFeeTxType: + return "DynamicFeeTxType" + case gethtypes.LegacyTxType: + return "LegacyTxType" + case gethtypes.AccessListTxType: + return "AccessListTxType" + default: + panic("unknown tx type") + } +} diff --git a/legacy/evm/types/utils.go b/legacy/evm/types/utils.go new file mode 100644 index 0000000..5d27b90 --- /dev/null +++ b/legacy/evm/types/utils.go @@ -0,0 +1,129 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) + +package types + +import ( + "fmt" + "math/big" + + "github.com/cosmos/gogoproto/proto" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/crypto" +) + +// DefaultPriorityReduction is the default amount of price values required for 1 unit of priority. +// Because priority is `int64` while price is `big.Int`, it's necessary to scale down the range to keep it more pratical. +// The default value is the same as the `sdk.DefaultPowerReduction`. +var DefaultPriorityReduction = sdk.DefaultPowerReduction + +var EmptyCodeHash = crypto.Keccak256(nil) + +// DecodeTxResponse decodes an protobuf-encoded byte slice into TxResponse +func DecodeTxResponse(in []byte) (*MsgEthereumTxResponse, error) { + var txMsgData sdk.TxMsgData + if err := proto.Unmarshal(in, &txMsgData); err != nil { + return nil, err + } + + if len(txMsgData.MsgResponses) == 0 { + return &MsgEthereumTxResponse{}, nil + } + + var res MsgEthereumTxResponse + if err := proto.Unmarshal(txMsgData.MsgResponses[0].Value, &res); err != nil { + return nil, errorsmod.Wrap(err, "failed to unmarshal tx response message data") + } + + return &res, nil +} + +// EncodeTransactionLogs encodes TransactionLogs slice into a protobuf-encoded byte slice. +func EncodeTransactionLogs(res *TransactionLogs) ([]byte, error) { + return proto.Marshal(res) +} + +// DecodeTransactionLogs decodes an protobuf-encoded byte slice into TransactionLogs +func DecodeTransactionLogs(data []byte) (TransactionLogs, error) { + var logs TransactionLogs + err := proto.Unmarshal(data, &logs) + if err != nil { + return TransactionLogs{}, err + } + return logs, nil +} + +// UnwrapEthereumMsg extracts MsgEthereumTx from wrapping sdk.Tx +func UnwrapEthereumMsg(tx *sdk.Tx, ethHash common.Hash) (*MsgEthereumTx, error) { + if tx == nil { + return nil, fmt.Errorf("invalid tx: nil") + } + + for _, msg := range (*tx).GetMsgs() { + ethMsg, ok := msg.(*MsgEthereumTx) + if !ok { + return nil, fmt.Errorf("invalid tx type: %T", tx) + } + txHash := ethMsg.AsTransaction().Hash() + ethMsg.Hash = txHash.Hex() + if txHash == ethHash { + return ethMsg, nil + } + } + + return nil, fmt.Errorf("eth tx not found: %s", ethHash) +} + +// UnpackEthMsg unpacks an Ethereum message from a Cosmos SDK message +func UnpackEthMsg(msg sdk.Msg) ( + ethMsg *MsgEthereumTx, + txData TxData, + from sdk.AccAddress, + err error, +) { + msgEthTx, ok := msg.(*MsgEthereumTx) + if !ok { + return nil, nil, nil, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*MsgEthereumTx)(nil)) + } + + txData, err = UnpackTxData(msgEthTx.Data) + if err != nil { + return nil, nil, nil, errorsmod.Wrap(err, "failed to unpack tx data any for tx") + } + + // sender address should be in the tx cache from the previous AnteHandle call + from = msgEthTx.GetFrom() + return msgEthTx, txData, from, nil +} + +// BinSearch executes the binary search and hone in on an executable gas limit +func BinSearch(lo, hi uint64, executable func(uint64) (bool, *MsgEthereumTxResponse, error)) (uint64, error) { + for lo+1 < hi { + mid := (hi + lo) / 2 + failed, _, err := executable(mid) + // If the error is not nil(consensus error), it means the provided message + // call or transaction will never be accepted no matter how much gas it is + // assigned. Return the error directly, don't struggle any more. + if err != nil { + return 0, err + } + if failed { + lo = mid + } else { + hi = mid + } + } + return hi, nil +} + +// EffectiveGasPrice computes the effective gas price based on eip-1559 rules +// `effectiveGasPrice = min(baseFee + tipCap, feeCap)` +func EffectiveGasPrice(baseFee, feeCap, tipCap *big.Int) *big.Int { + return math.BigMin(new(big.Int).Add(tipCap, baseFee), feeCap) +} diff --git a/legacy/evm/types/utils_test.go b/legacy/evm/types/utils_test.go new file mode 100644 index 0000000..fb5dd24 --- /dev/null +++ b/legacy/evm/types/utils_test.go @@ -0,0 +1,127 @@ +package types_test + +import ( + "errors" + "math/big" + "testing" + + "github.com/cosmos/cosmos-sdk/client" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + + "github.com/ethereum/go-ethereum/common" + + proto "github.com/cosmos/gogoproto/proto" + + "github.com/evmos/evmos/v20/encoding" + utiltx "github.com/evmos/evmos/v20/testutil/tx" + evmtypes "github.com/evmos/evmos/v20/x/evm/types" + + "github.com/stretchr/testify/require" +) + +func TestEvmDataEncoding(t *testing.T) { + ret := []byte{0x5, 0x8} + + data := &evmtypes.MsgEthereumTxResponse{ + Hash: common.BytesToHash([]byte("hash")).String(), + Logs: []*evmtypes.Log{{ + Data: []byte{1, 2, 3, 4}, + BlockNumber: 17, + }}, + Ret: ret, + } + + anyData := codectypes.UnsafePackAny(data) + txData := &sdk.TxMsgData{ + MsgResponses: []*codectypes.Any{anyData}, + } + + txDataBz, err := proto.Marshal(txData) + require.NoError(t, err) + + res, err := evmtypes.DecodeTxResponse(txDataBz) + require.NoError(t, err) + require.NotNil(t, res) + require.Equal(t, data.Logs, res.Logs) + require.Equal(t, ret, res.Ret) +} + +func TestUnwrapEthererumMsg(t *testing.T) { + _, err := evmtypes.UnwrapEthereumMsg(nil, common.Hash{}) + require.NotNil(t, err) + + encodingConfig := encoding.MakeConfig() + clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig) + builder, _ := clientCtx.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder) + + tx := builder.GetTx().(sdk.Tx) + _, err = evmtypes.UnwrapEthereumMsg(&tx, common.Hash{}) + require.NotNil(t, err) + + evmTxParams := &evmtypes.EvmTxArgs{ + ChainID: big.NewInt(1), + Nonce: 0, + To: &common.Address{}, + Amount: big.NewInt(0), + GasLimit: 0, + GasPrice: big.NewInt(0), + Input: []byte{}, + } + + msg := evmtypes.NewTx(evmTxParams) + err = builder.SetMsgs(msg) + require.Nil(t, err) + + tx = builder.GetTx().(sdk.Tx) + unwrappedMsg, err := evmtypes.UnwrapEthereumMsg(&tx, msg.AsTransaction().Hash()) + require.Nil(t, err) + require.Equal(t, unwrappedMsg, msg) +} + +func TestBinSearch(t *testing.T) { + successExecutable := func(gas uint64) (bool, *evmtypes.MsgEthereumTxResponse, error) { + target := uint64(21000) + return gas < target, nil, nil + } + failedExecutable := func(_ uint64) (bool, *evmtypes.MsgEthereumTxResponse, error) { + return true, nil, errors.New("contract failed") + } + + gas, err := evmtypes.BinSearch(20000, 21001, successExecutable) + require.NoError(t, err) + require.Equal(t, gas, uint64(21000)) + + gas, err = evmtypes.BinSearch(20000, 21001, failedExecutable) + require.Error(t, err) + require.Equal(t, gas, uint64(0)) +} + +func TestTransactionLogsEncodeDecode(t *testing.T) { + addr := utiltx.GenerateAddress().String() + + txLogs := evmtypes.TransactionLogs{ + Hash: common.BytesToHash([]byte("tx_hash")).String(), + Logs: []*evmtypes.Log{ + { + Address: addr, + Topics: []string{common.BytesToHash([]byte("topic")).String()}, + Data: []byte("data"), + BlockNumber: 1, + TxHash: common.BytesToHash([]byte("tx_hash")).String(), + TxIndex: 1, + BlockHash: common.BytesToHash([]byte("block_hash")).String(), + Index: 1, + Removed: false, + }, + }, + } + + txLogsEncoded, encodeErr := evmtypes.EncodeTransactionLogs(&txLogs) + require.Nil(t, encodeErr) + + txLogsEncodedDecoded, decodeErr := evmtypes.DecodeTransactionLogs(txLogsEncoded) + require.Nil(t, decodeErr) + require.Equal(t, txLogs, txLogsEncodedDecoded) +} From 20f15cfc55528333cb3ce7395ba7fd2fe6e845cd Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 22 Aug 2025 11:33:34 +0200 Subject: [PATCH 33/66] tmp: remove non-used files --- app/upgrades/v9/upgrades.go | 12 +- legacy/evm/types/access_list_test.go | 39 - legacy/evm/types/access_list_tx.go | 252 ----- legacy/evm/types/access_list_tx_test.go | 168 ---- legacy/evm/types/call.go | 17 - legacy/evm/types/chain_config.go | 183 ---- legacy/evm/types/chain_config_test.go | 381 -------- legacy/evm/types/codec.go | 94 -- legacy/evm/types/codec_test.go | 61 -- legacy/evm/types/compiled_contract.go | 93 -- legacy/evm/types/compiled_contract_test.go | 32 - legacy/evm/types/dynamic_fee_tx.go | 284 ------ legacy/evm/types/dynamic_fee_tx_test.go | 677 ------------- legacy/evm/types/errors.go | 124 --- legacy/evm/types/events.go | 26 - legacy/evm/types/genesis.go | 51 - legacy/evm/types/genesis_test.go | 225 ----- legacy/evm/types/interfaces.go | 69 -- legacy/evm/types/key.go | 64 -- legacy/evm/types/legacy_tx.go | 229 ----- legacy/evm/types/legacy_tx_test.go | 434 --------- legacy/evm/types/logs.go | 129 --- legacy/evm/types/logs_test.go | 201 ---- legacy/evm/types/msg.go | 377 -------- legacy/evm/types/msg_test.go | 909 ------------------ legacy/evm/types/opcodes_hooks.go | 70 -- legacy/evm/types/params.go | 300 ------ legacy/evm/types/params_legacy.go | 36 - legacy/evm/types/params_test.go | 166 ---- legacy/evm/types/permissions.go | 144 --- legacy/evm/types/permissions_test.go | 233 ----- legacy/evm/types/precompiles.go | 33 - legacy/evm/types/query.go | 31 - legacy/evm/types/storage.go | 12 +- legacy/evm/types/storage_test.go | 84 -- .../types/testdata/SimpleContractHardhat.json | 37 - legacy/evm/types/tracer.go | 111 --- legacy/evm/types/tracer_test.go | 11 - legacy/evm/types/tx.go | 81 -- legacy/evm/types/tx_args.go | 250 ----- legacy/evm/types/tx_args_test.go | 289 ------ legacy/evm/types/tx_data.go | 82 -- legacy/evm/types/tx_data_test.go | 90 -- legacy/evm/types/tx_types.go | 20 - legacy/evm/types/utils.go | 129 --- legacy/evm/types/utils_test.go | 127 --- 46 files changed, 12 insertions(+), 7455 deletions(-) delete mode 100644 legacy/evm/types/access_list_test.go delete mode 100644 legacy/evm/types/access_list_tx.go delete mode 100644 legacy/evm/types/access_list_tx_test.go delete mode 100644 legacy/evm/types/call.go delete mode 100644 legacy/evm/types/chain_config.go delete mode 100644 legacy/evm/types/chain_config_test.go delete mode 100644 legacy/evm/types/codec.go delete mode 100644 legacy/evm/types/codec_test.go delete mode 100644 legacy/evm/types/compiled_contract.go delete mode 100644 legacy/evm/types/compiled_contract_test.go delete mode 100644 legacy/evm/types/dynamic_fee_tx.go delete mode 100644 legacy/evm/types/dynamic_fee_tx_test.go delete mode 100644 legacy/evm/types/errors.go delete mode 100644 legacy/evm/types/events.go delete mode 100644 legacy/evm/types/genesis.go delete mode 100644 legacy/evm/types/genesis_test.go delete mode 100644 legacy/evm/types/interfaces.go delete mode 100644 legacy/evm/types/key.go delete mode 100644 legacy/evm/types/legacy_tx.go delete mode 100644 legacy/evm/types/legacy_tx_test.go delete mode 100644 legacy/evm/types/logs.go delete mode 100644 legacy/evm/types/logs_test.go delete mode 100644 legacy/evm/types/msg.go delete mode 100644 legacy/evm/types/msg_test.go delete mode 100644 legacy/evm/types/opcodes_hooks.go delete mode 100644 legacy/evm/types/params.go delete mode 100644 legacy/evm/types/params_legacy.go delete mode 100644 legacy/evm/types/params_test.go delete mode 100644 legacy/evm/types/permissions.go delete mode 100644 legacy/evm/types/permissions_test.go delete mode 100644 legacy/evm/types/precompiles.go delete mode 100644 legacy/evm/types/query.go delete mode 100644 legacy/evm/types/storage_test.go delete mode 100644 legacy/evm/types/testdata/SimpleContractHardhat.json delete mode 100644 legacy/evm/types/tracer.go delete mode 100644 legacy/evm/types/tracer_test.go delete mode 100644 legacy/evm/types/tx.go delete mode 100644 legacy/evm/types/tx_args.go delete mode 100644 legacy/evm/types/tx_args_test.go delete mode 100644 legacy/evm/types/tx_data.go delete mode 100644 legacy/evm/types/tx_data_test.go delete mode 100644 legacy/evm/types/tx_types.go delete mode 100644 legacy/evm/types/utils.go delete mode 100644 legacy/evm/types/utils_test.go diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index 84de83e..5ae49b4 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -29,17 +29,23 @@ func CreateUpgradeHandler( logger := ctx.Logger().With("upgrade", UpgradeName) logger.Info("Running v9 upgrade handler...") + ctx.Logger().Info("migrating erc20 module...") migrateErc20Module( ctx, storeKeys, erc20Keeper, ) - migrateEvmModule( + ctx.Logger().Info("erc20 module is ready") + ctx.Logger().Info("migrating evm module...") + if err := migrateEvmModule( ctx, storeKeys, appCodec, evmKeeper, - ) + ); err != nil { + return nil, err + } + ctx.Logger().Info("evm module is ready") logger.Info("Finished v9 upgrade handler") @@ -50,7 +56,7 @@ func CreateUpgradeHandler( func migrateEvmModule(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, codec codec.Codec, evmKeeper EvmKeeper) error { store := ctx.KVStore(keys[evmtypes.StoreKey]) - legacyBz := store.Get(legacyevmtypes.KeyPrefixParams) + legacyBz := store.Get(evmtypes.KeyPrefixParams) if legacyBz == nil { return errors.New("legacyBz cannot be nil") } diff --git a/legacy/evm/types/access_list_test.go b/legacy/evm/types/access_list_test.go deleted file mode 100644 index 10e9153..0000000 --- a/legacy/evm/types/access_list_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package types_test - -import ( - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v20/x/evm/types" -) - -func (suite *TxDataTestSuite) TestTestNewAccessList() { - testCases := []struct { - name string - ethAccessList *ethtypes.AccessList - expAl types.AccessList - }{ - { - "ethAccessList is nil", - nil, - nil, - }, - { - "non-empty ethAccessList", - ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - types.AccessList{{Address: suite.hexAddr, StorageKeys: []string{common.Hash{}.Hex()}}}, - }, - } - for _, tc := range testCases { - al := types.NewAccessList(tc.ethAccessList) - - suite.Require().Equal(tc.expAl, al) - } -} - -func (suite *TxDataTestSuite) TestAccessListToEthAccessList() { - ethAccessList := ethtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}} - al := types.NewAccessList(ðAccessList) - actual := al.ToEthAccessList() - - suite.Require().Equal(ðAccessList, actual) -} diff --git a/legacy/evm/types/access_list_tx.go b/legacy/evm/types/access_list_tx.go deleted file mode 100644 index 8a01265..0000000 --- a/legacy/evm/types/access_list_tx.go +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math/big" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - - "github.com/evmos/evmos/v20/types" - ethutils "github.com/evmos/evmos/v20/utils/eth" -) - -func newAccessListTx(tx *ethtypes.Transaction) (*AccessListTx, error) { - txData := &AccessListTx{ - Nonce: tx.Nonce(), - Data: tx.Data(), - GasLimit: tx.Gas(), - } - - v, r, s := tx.RawSignatureValues() - if to := tx.To(); to != nil { - txData.To = to.Hex() - } - - if tx.Value() != nil { - amountInt, err := types.SafeNewIntFromBigInt(tx.Value()) - if err != nil { - return nil, err - } - txData.Amount = &amountInt - } - - if tx.GasPrice() != nil { - gasPriceInt, err := types.SafeNewIntFromBigInt(tx.GasPrice()) - if err != nil { - return nil, err - } - txData.GasPrice = &gasPriceInt - } - - if tx.AccessList() != nil { - al := tx.AccessList() - txData.Accesses = NewAccessList(&al) - } - - txData.SetSignatureValues(tx.ChainId(), v, r, s) - return txData, nil -} - -// TxType returns the tx type -func (tx *AccessListTx) TxType() uint8 { - return ethtypes.AccessListTxType -} - -// Copy returns an instance with the same field values -func (tx *AccessListTx) Copy() TxData { - return &AccessListTx{ - ChainID: tx.ChainID, - Nonce: tx.Nonce, - GasPrice: tx.GasPrice, - GasLimit: tx.GasLimit, - To: tx.To, - Amount: tx.Amount, - Data: common.CopyBytes(tx.Data), - Accesses: tx.Accesses, - V: common.CopyBytes(tx.V), - R: common.CopyBytes(tx.R), - S: common.CopyBytes(tx.S), - } -} - -// GetChainID returns the chain id field from the AccessListTx -func (tx *AccessListTx) GetChainID() *big.Int { - if tx.ChainID == nil { - return nil - } - - return tx.ChainID.BigInt() -} - -// GetAccessList returns the AccessList field. -func (tx *AccessListTx) GetAccessList() ethtypes.AccessList { - if tx.Accesses == nil { - return nil - } - return *tx.Accesses.ToEthAccessList() -} - -// GetData returns the a copy of the input data bytes. -func (tx *AccessListTx) GetData() []byte { - return common.CopyBytes(tx.Data) -} - -// GetGas returns the gas limit. -func (tx *AccessListTx) GetGas() uint64 { - return tx.GasLimit -} - -// GetGasPrice returns the gas price field. -func (tx *AccessListTx) GetGasPrice() *big.Int { - if tx.GasPrice == nil { - return nil - } - return tx.GasPrice.BigInt() -} - -// GetGasTipCap returns the gas price field. -func (tx *AccessListTx) GetGasTipCap() *big.Int { - return tx.GetGasPrice() -} - -// GetGasFeeCap returns the gas price field. -func (tx *AccessListTx) GetGasFeeCap() *big.Int { - return tx.GetGasPrice() -} - -// GetValue returns the tx amount. -func (tx *AccessListTx) GetValue() *big.Int { - if tx.Amount == nil { - return nil - } - - return tx.Amount.BigInt() -} - -// GetNonce returns the account sequence for the transaction. -func (tx *AccessListTx) GetNonce() uint64 { return tx.Nonce } - -// GetTo returns the pointer to the recipient address. -func (tx *AccessListTx) GetTo() *common.Address { - if tx.To == "" { - return nil - } - to := common.HexToAddress(tx.To) - return &to -} - -// AsEthereumData returns an AccessListTx transaction tx from the proto-formatted -// TxData defined on the Cosmos EVM. -func (tx *AccessListTx) AsEthereumData() ethtypes.TxData { - v, r, s := tx.GetRawSignatureValues() - return ðtypes.AccessListTx{ - ChainID: tx.GetChainID(), - Nonce: tx.GetNonce(), - GasPrice: tx.GetGasPrice(), - Gas: tx.GetGas(), - To: tx.GetTo(), - Value: 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) -} - -// SetSignatureValues sets the signature values to the transaction. -func (tx *AccessListTx) SetSignatureValues(chainID, v, r, s *big.Int) { - if v != nil { - tx.V = v.Bytes() - } - if r != nil { - tx.R = r.Bytes() - } - if s != nil { - tx.S = s.Bytes() - } - if chainID != nil { - chainIDInt := sdkmath.NewIntFromBigInt(chainID) - tx.ChainID = &chainIDInt - } -} - -// Validate performs a stateless validation of the tx fields. -func (tx AccessListTx) Validate() error { - gasPrice := tx.GetGasPrice() - if gasPrice == nil { - return errorsmod.Wrap(ErrInvalidGasPrice, "cannot be nil") - } - if !types.IsValidInt256(gasPrice) { - return errorsmod.Wrap(ErrInvalidGasPrice, "out of bound") - } - - if gasPrice.Sign() == -1 { - return errorsmod.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice) - } - - amount := tx.GetValue() - // Amount can be 0 - if amount != nil && amount.Sign() == -1 { - return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount) - } - if !types.IsValidInt256(amount) { - return errorsmod.Wrap(ErrInvalidAmount, "out of bound") - } - - if !types.IsValidInt256(tx.Fee()) { - return errorsmod.Wrap(ErrInvalidGasFee, "out of bound") - } - - if tx.To != "" { - if err := types.ValidateAddress(tx.To); err != nil { - return errorsmod.Wrap(err, "invalid to address") - } - } - - if tx.GetChainID() == nil { - return errorsmod.Wrap( - errortypes.ErrInvalidChainID, - "chain ID must be present on AccessList txs", - ) - } - - return nil -} - -// Fee returns gasprice * gaslimit. -func (tx AccessListTx) Fee() *big.Int { - return fee(tx.GetGasPrice(), tx.GetGas()) -} - -// Cost returns amount + gasprice * gaslimit. -func (tx AccessListTx) Cost() *big.Int { - return cost(tx.Fee(), tx.GetValue()) -} - -// EffectiveGasPrice is the same as GasPrice for AccessListTx -func (tx AccessListTx) EffectiveGasPrice(_ *big.Int) *big.Int { - return tx.GetGasPrice() -} - -// EffectiveFee is the same as Fee for AccessListTx -func (tx AccessListTx) EffectiveFee(_ *big.Int) *big.Int { - return tx.Fee() -} - -// EffectiveCost is the same as Cost for AccessListTx -func (tx AccessListTx) EffectiveCost(_ *big.Int) *big.Int { - return tx.Cost() -} diff --git a/legacy/evm/types/access_list_tx_test.go b/legacy/evm/types/access_list_tx_test.go deleted file mode 100644 index 2cbe60c..0000000 --- a/legacy/evm/types/access_list_tx_test.go +++ /dev/null @@ -1,168 +0,0 @@ -package types_test - -import ( - "math/big" - - ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v20/x/evm/types" -) - -func (suite *TxDataTestSuite) TestAccessListTxCopy() { - tx := &types.AccessListTx{} - txCopy := tx.Copy() - - suite.Require().Equal(&types.AccessListTx{}, txCopy) -} - -func (suite *TxDataTestSuite) TestAccessListTxGetGasTipCap() { - testCases := []struct { - name string - tx types.AccessListTx - exp *big.Int - }{ - { - "non-empty gasPrice", - types.AccessListTx{ - GasPrice: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasTipCap() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestAccessListTxGetGasFeeCap() { - testCases := []struct { - name string - tx types.AccessListTx - exp *big.Int - }{ - { - "non-empty gasPrice", - types.AccessListTx{ - GasPrice: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasFeeCap() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestEmptyAccessList() { - testCases := []struct { - name string - tx types.AccessListTx - }{ - { - "empty access list tx", - types.AccessListTx{ - Accesses: nil, - }, - }, - } - for _, tc := range testCases { - actual := tc.tx.GetAccessList() - - suite.Require().Nil(actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestAccessListTxCost() { - testCases := []struct { - name string - tx types.AccessListTx - exp *big.Int - }{ - { - "non-empty access list tx", - types.AccessListTx{ - GasPrice: &suite.sdkInt, - GasLimit: uint64(1), - Amount: &suite.sdkZeroInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.Cost() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestAccessListEffectiveGasPrice() { - testCases := []struct { - name string - tx types.AccessListTx - baseFee *big.Int - }{ - { - "non-empty access list tx", - types.AccessListTx{ - GasPrice: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveGasPrice(tc.baseFee) - - suite.Require().Equal(tc.tx.GetGasPrice(), actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestAccessListTxEffectiveCost() { - testCases := []struct { - name string - tx types.AccessListTx - baseFee *big.Int - exp *big.Int - }{ - { - "non-empty access list tx", - types.AccessListTx{ - GasPrice: &suite.sdkInt, - GasLimit: uint64(1), - Amount: &suite.sdkZeroInt, - }, - (&suite.sdkInt).BigInt(), - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveCost(tc.baseFee) - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestAccessListTxType() { - testCases := []struct { - name string - tx types.AccessListTx - }{ - { - "non-empty access list tx", - types.AccessListTx{}, - }, - } - - for _, tc := range testCases { - actual := tc.tx.TxType() - - suite.Require().Equal(uint8(ethtypes.AccessListTxType), actual, tc.name) - } -} diff --git a/legacy/evm/types/call.go b/legacy/evm/types/call.go deleted file mode 100644 index 53fa089..0000000 --- a/legacy/evm/types/call.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -type CallType int - -const ( - // RPC call type is used on requests to eth_estimateGas rpc API endpoint - RPC CallType = iota + 1 - // Internal call type is used in case of smart contract methods calls - Internal -) - -// MaxPrecompileCalls is the maximum number of precompile -// calls within a transaction. We want to limit this because -// for each precompile tx we're creating a cached context -const MaxPrecompileCalls uint8 = 7 diff --git a/legacy/evm/types/chain_config.go b/legacy/evm/types/chain_config.go deleted file mode 100644 index 1708c2c..0000000 --- a/legacy/evm/types/chain_config.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math/big" - "strings" - - sdkmath "cosmossdk.io/math" - - errorsmod "cosmossdk.io/errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/params" -) - -// EthereumConfig returns an Ethereum ChainConfig for EVM state transitions. -// All the negative or nil values are converted to nil -func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig { - return ¶ms.ChainConfig{ - ChainID: chainID, - HomesteadBlock: getBlockValue(cc.HomesteadBlock), - DAOForkBlock: getBlockValue(cc.DAOForkBlock), - DAOForkSupport: cc.DAOForkSupport, - EIP150Block: getBlockValue(cc.EIP150Block), - EIP150Hash: common.HexToHash(cc.EIP150Hash), - EIP155Block: getBlockValue(cc.EIP155Block), - EIP158Block: getBlockValue(cc.EIP158Block), - ByzantiumBlock: getBlockValue(cc.ByzantiumBlock), - ConstantinopleBlock: getBlockValue(cc.ConstantinopleBlock), - PetersburgBlock: getBlockValue(cc.PetersburgBlock), - IstanbulBlock: getBlockValue(cc.IstanbulBlock), - MuirGlacierBlock: getBlockValue(cc.MuirGlacierBlock), - BerlinBlock: getBlockValue(cc.BerlinBlock), - LondonBlock: getBlockValue(cc.LondonBlock), - ArrowGlacierBlock: getBlockValue(cc.ArrowGlacierBlock), - GrayGlacierBlock: getBlockValue(cc.GrayGlacierBlock), - MergeNetsplitBlock: getBlockValue(cc.MergeNetsplitBlock), - ShanghaiBlock: getBlockValue(cc.ShanghaiBlock), - CancunBlock: getBlockValue(cc.CancunBlock), - TerminalTotalDifficulty: nil, - Ethash: nil, - Clique: nil, - } -} - -// DefaultChainConfig returns default evm parameters. -func DefaultChainConfig() ChainConfig { - homesteadBlock := sdkmath.ZeroInt() - daoForkBlock := sdkmath.ZeroInt() - eip150Block := sdkmath.ZeroInt() - eip155Block := sdkmath.ZeroInt() - eip158Block := sdkmath.ZeroInt() - byzantiumBlock := sdkmath.ZeroInt() - constantinopleBlock := sdkmath.ZeroInt() - petersburgBlock := sdkmath.ZeroInt() - istanbulBlock := sdkmath.ZeroInt() - muirGlacierBlock := sdkmath.ZeroInt() - berlinBlock := sdkmath.ZeroInt() - londonBlock := sdkmath.ZeroInt() - arrowGlacierBlock := sdkmath.ZeroInt() - grayGlacierBlock := sdkmath.ZeroInt() - mergeNetsplitBlock := sdkmath.ZeroInt() - shanghaiBlock := sdkmath.ZeroInt() - cancunBlock := sdkmath.ZeroInt() - - return ChainConfig{ - HomesteadBlock: &homesteadBlock, - DAOForkBlock: &daoForkBlock, - DAOForkSupport: true, - EIP150Block: &eip150Block, - EIP150Hash: common.Hash{}.String(), - EIP155Block: &eip155Block, - EIP158Block: &eip158Block, - ByzantiumBlock: &byzantiumBlock, - ConstantinopleBlock: &constantinopleBlock, - PetersburgBlock: &petersburgBlock, - IstanbulBlock: &istanbulBlock, - MuirGlacierBlock: &muirGlacierBlock, - BerlinBlock: &berlinBlock, - LondonBlock: &londonBlock, - ArrowGlacierBlock: &arrowGlacierBlock, - GrayGlacierBlock: &grayGlacierBlock, - MergeNetsplitBlock: &mergeNetsplitBlock, - ShanghaiBlock: &shanghaiBlock, - CancunBlock: &cancunBlock, - } -} - -func getBlockValue(block *sdkmath.Int) *big.Int { - if block == nil || block.IsNegative() { - return nil - } - - return block.BigInt() -} - -// Validate performs a basic validation of the ChainConfig params. The function will return an error -// if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash. -func (cc ChainConfig) Validate() error { - if err := validateBlock(cc.HomesteadBlock); err != nil { - return errorsmod.Wrap(err, "homesteadBlock") - } - if err := validateBlock(cc.DAOForkBlock); err != nil { - return errorsmod.Wrap(err, "daoForkBlock") - } - if err := validateBlock(cc.EIP150Block); err != nil { - return errorsmod.Wrap(err, "eip150Block") - } - if err := validateHash(cc.EIP150Hash); err != nil { - return err - } - if err := validateBlock(cc.EIP155Block); err != nil { - return errorsmod.Wrap(err, "eip155Block") - } - if err := validateBlock(cc.EIP158Block); err != nil { - return errorsmod.Wrap(err, "eip158Block") - } - if err := validateBlock(cc.ByzantiumBlock); err != nil { - return errorsmod.Wrap(err, "byzantiumBlock") - } - if err := validateBlock(cc.ConstantinopleBlock); err != nil { - return errorsmod.Wrap(err, "constantinopleBlock") - } - if err := validateBlock(cc.PetersburgBlock); err != nil { - return errorsmod.Wrap(err, "petersburgBlock") - } - if err := validateBlock(cc.IstanbulBlock); err != nil { - return errorsmod.Wrap(err, "istanbulBlock") - } - if err := validateBlock(cc.MuirGlacierBlock); err != nil { - return errorsmod.Wrap(err, "muirGlacierBlock") - } - if err := validateBlock(cc.BerlinBlock); err != nil { - return errorsmod.Wrap(err, "berlinBlock") - } - if err := validateBlock(cc.LondonBlock); err != nil { - return errorsmod.Wrap(err, "londonBlock") - } - if err := validateBlock(cc.ArrowGlacierBlock); err != nil { - return errorsmod.Wrap(err, "arrowGlacierBlock") - } - if err := validateBlock(cc.GrayGlacierBlock); err != nil { - return errorsmod.Wrap(err, "GrayGlacierBlock") - } - if err := validateBlock(cc.MergeNetsplitBlock); err != nil { - return errorsmod.Wrap(err, "MergeNetsplitBlock") - } - if err := validateBlock(cc.ShanghaiBlock); err != nil { - return errorsmod.Wrap(err, "ShanghaiBlock") - } - if err := validateBlock(cc.CancunBlock); err != nil { - return errorsmod.Wrap(err, "CancunBlock") - } - // NOTE: chain ID is not needed to check config order - if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil { - return errorsmod.Wrap(err, "invalid config fork order") - } - return nil -} - -func validateHash(hex string) error { - if hex != "" && strings.TrimSpace(hex) == "" { - return errorsmod.Wrap(ErrInvalidChainConfig, "hash cannot be blank") - } - - return nil -} - -func validateBlock(block *sdkmath.Int) error { - // nil value means that the fork has not yet been applied - if block == nil { - return nil - } - - if block.IsNegative() { - return errorsmod.Wrapf( - ErrInvalidChainConfig, "block value cannot be negative: %s", block, - ) - } - - return nil -} diff --git a/legacy/evm/types/chain_config_test.go b/legacy/evm/types/chain_config_test.go deleted file mode 100644 index 5045701..0000000 --- a/legacy/evm/types/chain_config_test.go +++ /dev/null @@ -1,381 +0,0 @@ -package types - -import ( - "testing" - - sdkmath "cosmossdk.io/math" - "github.com/stretchr/testify/require" - - "github.com/ethereum/go-ethereum/common" -) - -var defaultEIP150Hash = common.Hash{}.String() - -func newIntPtr(i int64) *sdkmath.Int { - v := sdkmath.NewInt(i) - return &v -} - -func TestChainConfigValidate(t *testing.T) { - testCases := []struct { - name string - config ChainConfig - expError bool - }{ - {"default", DefaultChainConfig(), false}, - { - "valid", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(0), - CancunBlock: newIntPtr(0), - ShanghaiBlock: newIntPtr(0), - }, - false, - }, - { - "valid with nil values", - ChainConfig{ - HomesteadBlock: nil, - DAOForkBlock: nil, - EIP150Block: nil, - EIP150Hash: defaultEIP150Hash, - EIP155Block: nil, - EIP158Block: nil, - ByzantiumBlock: nil, - ConstantinopleBlock: nil, - PetersburgBlock: nil, - IstanbulBlock: nil, - MuirGlacierBlock: nil, - BerlinBlock: nil, - LondonBlock: nil, - CancunBlock: nil, - ShanghaiBlock: nil, - }, - false, - }, - { - "empty", - ChainConfig{}, - false, - }, - { - "invalid HomesteadBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid DAOForkBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid EIP150Block", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(-1), - }, - true, - }, - { - "invalid EIP150Hash", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: " ", - }, - true, - }, - { - "invalid EIP155Block", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(-1), - }, - true, - }, - { - "invalid EIP158Block", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(-1), - }, - true, - }, - { - "invalid ByzantiumBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid ConstantinopleBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid PetersburgBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid IstanbulBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid MuirGlacierBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid BerlinBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid LondonBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid ArrowGlacierBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(0), - ArrowGlacierBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid GrayGlacierBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(0), - ArrowGlacierBlock: newIntPtr(0), - GrayGlacierBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid MergeNetsplitBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(0), - ArrowGlacierBlock: newIntPtr(0), - GrayGlacierBlock: newIntPtr(0), - MergeNetsplitBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid fork order - skip HomesteadBlock", - ChainConfig{ - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(0), - }, - true, - }, - { - "invalid ShanghaiBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(0), - ArrowGlacierBlock: newIntPtr(0), - GrayGlacierBlock: newIntPtr(0), - MergeNetsplitBlock: newIntPtr(0), - ShanghaiBlock: newIntPtr(-1), - }, - true, - }, - { - "invalid CancunBlock", - ChainConfig{ - HomesteadBlock: newIntPtr(0), - DAOForkBlock: newIntPtr(0), - EIP150Block: newIntPtr(0), - EIP150Hash: defaultEIP150Hash, - EIP155Block: newIntPtr(0), - EIP158Block: newIntPtr(0), - ByzantiumBlock: newIntPtr(0), - ConstantinopleBlock: newIntPtr(0), - PetersburgBlock: newIntPtr(0), - IstanbulBlock: newIntPtr(0), - MuirGlacierBlock: newIntPtr(0), - BerlinBlock: newIntPtr(0), - LondonBlock: newIntPtr(0), - ArrowGlacierBlock: newIntPtr(0), - GrayGlacierBlock: newIntPtr(0), - MergeNetsplitBlock: newIntPtr(0), - ShanghaiBlock: newIntPtr(0), - CancunBlock: newIntPtr(-1), - }, - true, - }, - } - - for _, tc := range testCases { - err := tc.config.Validate() - - if tc.expError { - require.Error(t, err, tc.name) - } else { - require.NoError(t, err, tc.name) - } - } -} diff --git a/legacy/evm/types/codec.go b/legacy/evm/types/codec.go deleted file mode 100644 index dd097d4..0000000 --- a/legacy/evm/types/codec.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/msgservice" - "github.com/cosmos/cosmos-sdk/types/tx" - proto "github.com/cosmos/gogoproto/proto" -) - -var ( - amino = codec.NewLegacyAmino() - // ModuleCdc references the global evm module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding. - ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) - - // AminoCdc is a amino codec created to support amino JSON compatible msgs. - AminoCdc = codec.NewAminoCodec(amino) //nolint:staticcheck -) - -const ( - // Amino names - updateParamsName = "ethermint/MsgUpdateParams" -) - -// NOTE: This is required for the GetSignBytes function -func init() { - RegisterLegacyAminoCodec(amino) - amino.Seal() -} - -// RegisterInterfaces registers the client interfaces to protobuf Any. -func RegisterInterfaces(registry codectypes.InterfaceRegistry) { - registry.RegisterImplementations( - (*tx.TxExtensionOptionI)(nil), - &ExtensionOptionsEthereumTx{}, - ) - registry.RegisterImplementations( - (*sdk.Msg)(nil), - &MsgEthereumTx{}, - &MsgUpdateParams{}, - ) - registry.RegisterInterface( - "ethermint.evm.v1.TxData", - (*TxData)(nil), - &DynamicFeeTx{}, - &AccessListTx{}, - &LegacyTx{}, - ) - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -// PackTxData constructs a new Any packed with the given tx data value. It returns -// an error if the client state can't be casted to a protobuf message or if the concrete -// implementation is not registered to the protobuf codec. -func PackTxData(txData TxData) (*codectypes.Any, error) { - msg, ok := txData.(proto.Message) - if !ok { - return nil, errorsmod.Wrapf(errortypes.ErrPackAny, "cannot proto marshal %T", txData) - } - - anyTxData, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, errorsmod.Wrap(errortypes.ErrPackAny, err.Error()) - } - - return anyTxData, nil -} - -// UnpackTxData unpacks an Any into a TxData. It returns an error if the -// client state can't be unpacked into a TxData. -func UnpackTxData(any *codectypes.Any) (TxData, error) { - if any == nil { - return nil, errorsmod.Wrap(errortypes.ErrUnpackAny, "protobuf Any message cannot be nil") - } - - txData, ok := any.GetCachedValue().(TxData) - if !ok { - return nil, errorsmod.Wrapf(errortypes.ErrUnpackAny, "cannot unpack Any into TxData %T", any) - } - - return txData, nil -} - -// RegisterLegacyAminoCodec required for EIP-712 -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgUpdateParams{}, updateParamsName, nil) -} diff --git a/legacy/evm/types/codec_test.go b/legacy/evm/types/codec_test.go deleted file mode 100644 index 7121f5b..0000000 --- a/legacy/evm/types/codec_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package types - -import ( - "testing" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/stretchr/testify/require" -) - -type caseAny struct { - name string - any *codectypes.Any - expPass bool -} - -func TestPackTxData(t *testing.T) { - testCases := []struct { - name string - txData TxData - expPass bool - }{ - { - "access list tx", - &AccessListTx{}, - true, - }, - { - "legacy tx", - &LegacyTx{}, - true, - }, - { - "nil", - nil, - false, - }, - } - - testCasesAny := []caseAny{} - - for _, tc := range testCases { - txDataAny, err := PackTxData(tc.txData) - if tc.expPass { - require.NoError(t, err, tc.name) - } else { - require.Error(t, err, tc.name) - } - - testCasesAny = append(testCasesAny, caseAny{tc.name, txDataAny, tc.expPass}) - } - - for i, tc := range testCasesAny { - cs, err := UnpackTxData(tc.any) - if tc.expPass { - require.NoError(t, err, tc.name) - require.Equal(t, testCases[i].txData, cs, tc.name) - } else { - require.Error(t, err, tc.name) - } - } -} diff --git a/legacy/evm/types/compiled_contract.go b/legacy/evm/types/compiled_contract.go deleted file mode 100644 index e36c1a7..0000000 --- a/legacy/evm/types/compiled_contract.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package types - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "strings" - - "github.com/ethereum/go-ethereum/accounts/abi" -) - -// HexString is a byte array that serializes to hex -type HexString []byte - -// MarshalJSON serializes ByteArray to hex -func (s HexString) MarshalJSON() ([]byte, error) { - return json.Marshal(fmt.Sprintf("%x", string(s))) -} - -// UnmarshalJSON deserializes ByteArray to hex -func (s *HexString) UnmarshalJSON(data []byte) error { - var x string - if err := json.Unmarshal(data, &x); err != nil { - return err - } - str, err := hex.DecodeString(x) - if err != nil { - return err - } - *s = str - return nil -} - -// CompiledContract contains compiled bytecode and abi -type CompiledContract struct { - ABI abi.ABI - Bin HexString -} - -type jsonCompiledContract struct { - ABI string - Bin HexString -} - -// MarshalJSON serializes ByteArray to hex -func (s CompiledContract) MarshalJSON() ([]byte, error) { - abi1, err := json.Marshal(s.ABI) - if err != nil { - return nil, err - } - return json.Marshal(jsonCompiledContract{ABI: string(abi1), Bin: s.Bin}) -} - -// UnmarshalJSON deserializes ByteArray to hex -func (s *CompiledContract) UnmarshalJSON(data []byte) error { - var x jsonCompiledContract - if err := json.Unmarshal(data, &x); err != nil { - return err - } - - s.Bin = x.Bin - if err := json.Unmarshal([]byte(x.ABI), &s.ABI); err != nil { - return fmt.Errorf("failed to unmarshal ABI: %w", err) - } - - return nil -} - -// HardhatCompiledContract is a type used to unpack the compiled JSON data -// which is generated by running `npx hardhat compile` for a given smart contract. -type HardhatCompiledContract struct { - Format string `json:"_format"` - ContractName string `json:"contractName"` - SourceName string `json:"sourceName"` - ABI abi.ABI `json:"abi"` - Bytecode string `json:"bytecode"` -} - -func (c HardhatCompiledContract) ToCompiledContract() (CompiledContract, error) { - strippedHex := strings.TrimPrefix(c.Bytecode, "0x") - hexBytes, err := hex.DecodeString(strippedHex) - if err != nil { - return CompiledContract{}, fmt.Errorf("failed to decode hex string: %w", err) - } - - return CompiledContract{ - ABI: c.ABI, - Bin: hexBytes, - }, nil -} diff --git a/legacy/evm/types/compiled_contract_test.go b/legacy/evm/types/compiled_contract_test.go deleted file mode 100644 index e912e2b..0000000 --- a/legacy/evm/types/compiled_contract_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package types_test - -import ( - "encoding/json" - "os" - "testing" - - evmtypes "github.com/evmos/evmos/v20/x/evm/types" - "github.com/stretchr/testify/require" -) - -func TestHardhatCompiledContract(t *testing.T) { - contents, err := os.ReadFile("testdata/SimpleContractHardhat.json") - require.NoError(t, err, "failed to read file") - require.NotEmpty(t, contents, "expected contents not to be empty") - - var hardhatContract evmtypes.HardhatCompiledContract - err = json.Unmarshal(contents, &hardhatContract) - require.NoError(t, err, "failed to unmarshal contract") - - require.Equal(t, hardhatContract.ContractName, "SimpleContract") - require.Contains(t, - hardhatContract.ABI.Methods, - "setValue", - "missing setValue method in contract ABI methods", - ) - - compiledContract, err := hardhatContract.ToCompiledContract() - require.NoError(t, err, "failed to convert hardhat contract to compiled contract type") - require.Equal(t, compiledContract.ABI, hardhatContract.ABI, "expected ABIs to be equal") - require.NotEmpty(t, compiledContract.Bin, "expected bin data not to be empty") -} diff --git a/legacy/evm/types/dynamic_fee_tx.go b/legacy/evm/types/dynamic_fee_tx.go deleted file mode 100644 index bd7500c..0000000 --- a/legacy/evm/types/dynamic_fee_tx.go +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math/big" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - - "github.com/evmos/evmos/v20/types" - ethutils "github.com/evmos/evmos/v20/utils/eth" -) - -func NewDynamicFeeTx(tx *ethtypes.Transaction) (*DynamicFeeTx, error) { - txData := &DynamicFeeTx{ - Nonce: tx.Nonce(), - Data: tx.Data(), - GasLimit: tx.Gas(), - } - - v, r, s := tx.RawSignatureValues() - if to := tx.To(); to != nil { - txData.To = to.Hex() - } - - if tx.Value() != nil { - amountInt, err := types.SafeNewIntFromBigInt(tx.Value()) - if err != nil { - return nil, err - } - txData.Amount = &amountInt - } - - if tx.GasFeeCap() != nil { - gasFeeCapInt, err := types.SafeNewIntFromBigInt(tx.GasFeeCap()) - if err != nil { - return nil, err - } - txData.GasFeeCap = &gasFeeCapInt - } - - if tx.GasTipCap() != nil { - gasTipCapInt, err := types.SafeNewIntFromBigInt(tx.GasTipCap()) - if err != nil { - return nil, err - } - txData.GasTipCap = &gasTipCapInt - } - - if tx.AccessList() != nil { - al := tx.AccessList() - txData.Accesses = NewAccessList(&al) - } - - txData.SetSignatureValues(tx.ChainId(), v, r, s) - return txData, nil -} - -// TxType returns the tx type -func (tx *DynamicFeeTx) TxType() uint8 { - return ethtypes.DynamicFeeTxType -} - -// Copy returns an instance with the same field values -func (tx *DynamicFeeTx) Copy() TxData { - return &DynamicFeeTx{ - ChainID: tx.ChainID, - Nonce: tx.Nonce, - GasTipCap: tx.GasTipCap, - GasFeeCap: tx.GasFeeCap, - GasLimit: tx.GasLimit, - To: tx.To, - Amount: tx.Amount, - Data: common.CopyBytes(tx.Data), - Accesses: tx.Accesses, - V: common.CopyBytes(tx.V), - R: common.CopyBytes(tx.R), - S: common.CopyBytes(tx.S), - } -} - -// GetChainID returns the chain id field from the DynamicFeeTx -func (tx *DynamicFeeTx) GetChainID() *big.Int { - if tx.ChainID == nil { - return nil - } - - return tx.ChainID.BigInt() -} - -// GetAccessList returns the AccessList field. -func (tx *DynamicFeeTx) GetAccessList() ethtypes.AccessList { - if tx.Accesses == nil { - return nil - } - return *tx.Accesses.ToEthAccessList() -} - -// GetData returns the a copy of the input data bytes. -func (tx *DynamicFeeTx) GetData() []byte { - return common.CopyBytes(tx.Data) -} - -// GetGas returns the gas limit. -func (tx *DynamicFeeTx) GetGas() uint64 { - return tx.GasLimit -} - -// GetGasPrice returns the gas fee cap field. -func (tx *DynamicFeeTx) GetGasPrice() *big.Int { - return tx.GetGasFeeCap() -} - -// GetGasTipCap returns the gas tip cap field. -func (tx *DynamicFeeTx) GetGasTipCap() *big.Int { - if tx.GasTipCap == nil { - return nil - } - return tx.GasTipCap.BigInt() -} - -// GetGasFeeCap returns the gas fee cap field. -func (tx *DynamicFeeTx) GetGasFeeCap() *big.Int { - if tx.GasFeeCap == nil { - return nil - } - return tx.GasFeeCap.BigInt() -} - -// GetValue returns the tx amount. -func (tx *DynamicFeeTx) GetValue() *big.Int { - if tx.Amount == nil { - return nil - } - - return tx.Amount.BigInt() -} - -// GetNonce returns the account sequence for the transaction. -func (tx *DynamicFeeTx) GetNonce() uint64 { return tx.Nonce } - -// GetTo returns the pointer to the recipient address. -func (tx *DynamicFeeTx) GetTo() *common.Address { - if tx.To == "" { - return nil - } - to := common.HexToAddress(tx.To) - return &to -} - -// AsEthereumData returns an DynamicFeeTx transaction tx from the proto-formatted -// TxData defined on the Cosmos EVM. -func (tx *DynamicFeeTx) AsEthereumData() ethtypes.TxData { - v, r, s := tx.GetRawSignatureValues() - return ðtypes.DynamicFeeTx{ - ChainID: tx.GetChainID(), - Nonce: tx.GetNonce(), - GasTipCap: tx.GetGasTipCap(), - GasFeeCap: tx.GetGasFeeCap(), - Gas: tx.GetGas(), - To: tx.GetTo(), - Value: 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 *DynamicFeeTx) GetRawSignatureValues() (v, r, s *big.Int) { - return ethutils.RawSignatureValues(tx.V, tx.R, tx.S) -} - -// SetSignatureValues sets the signature values to the transaction. -func (tx *DynamicFeeTx) SetSignatureValues(chainID, v, r, s *big.Int) { - if v != nil { - tx.V = v.Bytes() - } - if r != nil { - tx.R = r.Bytes() - } - if s != nil { - tx.S = s.Bytes() - } - if chainID != nil { - chainIDInt := sdkmath.NewIntFromBigInt(chainID) - tx.ChainID = &chainIDInt - } -} - -// Validate performs a stateless validation of the tx fields. -func (tx DynamicFeeTx) Validate() error { - if tx.GasTipCap == nil { - return errorsmod.Wrap(ErrInvalidGasCap, "gas tip cap cannot nil") - } - - if tx.GasFeeCap == nil { - return errorsmod.Wrap(ErrInvalidGasCap, "gas fee cap cannot nil") - } - - if tx.GasTipCap.IsNegative() { - return errorsmod.Wrapf(ErrInvalidGasCap, "gas tip cap cannot be negative %s", tx.GasTipCap) - } - - if tx.GasFeeCap.IsNegative() { - return errorsmod.Wrapf(ErrInvalidGasCap, "gas fee cap cannot be negative %s", tx.GasFeeCap) - } - - if !types.IsValidInt256(tx.GetGasTipCap()) { - return errorsmod.Wrap(ErrInvalidGasCap, "out of bound") - } - - if !types.IsValidInt256(tx.GetGasFeeCap()) { - return errorsmod.Wrap(ErrInvalidGasCap, "out of bound") - } - - if tx.GasFeeCap.LT(*tx.GasTipCap) { - return errorsmod.Wrapf( - ErrInvalidGasCap, "max priority fee per gas higher than max fee per gas (%s > %s)", - tx.GasTipCap, tx.GasFeeCap, - ) - } - - if !types.IsValidInt256(tx.Fee()) { - return errorsmod.Wrap(ErrInvalidGasFee, "out of bound") - } - - amount := tx.GetValue() - // Amount can be 0 - if amount != nil && amount.Sign() == -1 { - return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount) - } - if !types.IsValidInt256(amount) { - return errorsmod.Wrap(ErrInvalidAmount, "out of bound") - } - - if tx.To != "" { - if err := types.ValidateAddress(tx.To); err != nil { - return errorsmod.Wrap(err, "invalid to address") - } - } - - if tx.GetChainID() == nil { - return errorsmod.Wrap( - errortypes.ErrInvalidChainID, - "chain ID must be present on DynamicFee txs", - ) - } - - return nil -} - -// Fee returns gasprice * gaslimit. -func (tx DynamicFeeTx) Fee() *big.Int { - return fee(tx.GetGasFeeCap(), tx.GasLimit) -} - -// Cost returns amount + gasprice * gaslimit. -func (tx DynamicFeeTx) Cost() *big.Int { - return cost(tx.Fee(), tx.GetValue()) -} - -// EffectiveGasPrice returns the effective gas price -func (tx *DynamicFeeTx) EffectiveGasPrice(baseFee *big.Int) *big.Int { - return EffectiveGasPrice(baseFee, tx.GasFeeCap.BigInt(), tx.GasTipCap.BigInt()) -} - -// EffectiveFee returns effective_gasprice * gaslimit. -func (tx DynamicFeeTx) EffectiveFee(baseFee *big.Int) *big.Int { - return fee(tx.EffectiveGasPrice(baseFee), tx.GasLimit) -} - -// EffectiveCost returns amount + effective_gasprice * gaslimit. -func (tx DynamicFeeTx) EffectiveCost(baseFee *big.Int) *big.Int { - return cost(tx.EffectiveFee(baseFee), tx.GetValue()) -} diff --git a/legacy/evm/types/dynamic_fee_tx_test.go b/legacy/evm/types/dynamic_fee_tx_test.go deleted file mode 100644 index f713959..0000000 --- a/legacy/evm/types/dynamic_fee_tx_test.go +++ /dev/null @@ -1,677 +0,0 @@ -package types_test - -import ( - "math/big" - "testing" - - sdkmath "cosmossdk.io/math" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - ethtypes "github.com/ethereum/go-ethereum/core/types" - - utiltx "github.com/evmos/evmos/v20/testutil/tx" - "github.com/evmos/evmos/v20/x/evm/types" - - "github.com/stretchr/testify/suite" -) - -type TxDataTestSuite struct { - suite.Suite - - sdkInt sdkmath.Int - uint64 uint64 - hexUint64 hexutil.Uint64 - bigInt *big.Int - hexBigInt hexutil.Big - overflowBigInt *big.Int - sdkZeroInt sdkmath.Int - sdkMinusOneInt sdkmath.Int - invalidAddr string - addr common.Address - hexAddr string - hexDataBytes hexutil.Bytes - hexInputBytes hexutil.Bytes -} - -func (suite *TxDataTestSuite) SetupTest() { - suite.sdkInt = sdkmath.NewInt(9001) - suite.uint64 = suite.sdkInt.Uint64() - suite.hexUint64 = hexutil.Uint64(100) - suite.bigInt = big.NewInt(1) - suite.hexBigInt = hexutil.Big(*big.NewInt(1)) - suite.overflowBigInt = big.NewInt(0).Exp(big.NewInt(10), big.NewInt(256), nil) - suite.sdkZeroInt = sdkmath.ZeroInt() - suite.sdkMinusOneInt = sdkmath.NewInt(-1) - suite.invalidAddr = "123456" - suite.addr = utiltx.GenerateAddress() - suite.hexAddr = suite.addr.Hex() - suite.hexDataBytes = hexutil.Bytes([]byte("data")) - suite.hexInputBytes = hexutil.Bytes([]byte("input")) -} - -func TestTxDataTestSuite(t *testing.T) { - suite.Run(t, new(TxDataTestSuite)) -} - -func (suite *TxDataTestSuite) TestNewDynamicFeeTx() { - testCases := []struct { - name string - expError bool - tx *ethtypes.Transaction - }{ - { - "non-empty tx", - false, - ethtypes.NewTx(ðtypes.DynamicFeeTx{ - Nonce: 1, - Data: []byte("data"), - Gas: 100, - Value: big.NewInt(1), - AccessList: ethtypes.AccessList{}, - To: &suite.addr, - V: suite.bigInt, - R: suite.bigInt, - S: suite.bigInt, - }), - }, - { - "value out of bounds tx", - true, - ethtypes.NewTx(ðtypes.DynamicFeeTx{ - Nonce: 1, - Data: []byte("data"), - Gas: 100, - Value: suite.overflowBigInt, - AccessList: ethtypes.AccessList{}, - To: &suite.addr, - V: suite.bigInt, - R: suite.bigInt, - S: suite.bigInt, - }), - }, - { - "gas fee cap out of bounds tx", - true, - ethtypes.NewTx(ðtypes.DynamicFeeTx{ - Nonce: 1, - Data: []byte("data"), - Gas: 100, - GasFeeCap: suite.overflowBigInt, - Value: big.NewInt(1), - AccessList: ethtypes.AccessList{}, - To: &suite.addr, - V: suite.bigInt, - R: suite.bigInt, - S: suite.bigInt, - }), - }, - { - "gas tip cap out of bounds tx", - true, - ethtypes.NewTx(ðtypes.DynamicFeeTx{ - Nonce: 1, - Data: []byte("data"), - Gas: 100, - GasTipCap: suite.overflowBigInt, - Value: big.NewInt(1), - AccessList: ethtypes.AccessList{}, - To: &suite.addr, - V: suite.bigInt, - R: suite.bigInt, - S: suite.bigInt, - }), - }, - } - for _, tc := range testCases { - tx, err := types.NewDynamicFeeTx(tc.tx) - - if tc.expError { - suite.Require().Error(err) - } else { - suite.Require().NoError(err) - suite.Require().NotEmpty(tx) - suite.Require().Equal(uint8(2), tx.TxType()) - } - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxAsEthereumData() { - feeConfig := ðtypes.DynamicFeeTx{ - Nonce: 1, - Data: []byte("data"), - Gas: 100, - Value: big.NewInt(1), - AccessList: ethtypes.AccessList{}, - To: &suite.addr, - V: suite.bigInt, - R: suite.bigInt, - S: suite.bigInt, - } - - tx := ethtypes.NewTx(feeConfig) - - dynamicFeeTx, err := types.NewDynamicFeeTx(tx) - suite.Require().NoError(err) - - res := dynamicFeeTx.AsEthereumData() - resTx := ethtypes.NewTx(res) - - suite.Require().Equal(feeConfig.Nonce, resTx.Nonce()) - suite.Require().Equal(feeConfig.Data, resTx.Data()) - suite.Require().Equal(feeConfig.Gas, resTx.Gas()) - suite.Require().Equal(feeConfig.Value, resTx.Value()) - suite.Require().Equal(feeConfig.AccessList, resTx.AccessList()) - suite.Require().Equal(feeConfig.To, resTx.To()) -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxCopy() { - tx := &types.DynamicFeeTx{} - txCopy := tx.Copy() - - suite.Require().Equal(&types.DynamicFeeTx{}, txCopy) - // TODO: Test for different pointers -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetChainID() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp *big.Int - }{ - { - "empty chainID", - types.DynamicFeeTx{ - ChainID: nil, - }, - nil, - }, - { - "non-empty chainID", - types.DynamicFeeTx{ - ChainID: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetChainID() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetAccessList() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp ethtypes.AccessList - }{ - { - "empty accesses", - types.DynamicFeeTx{ - Accesses: nil, - }, - nil, - }, - { - "nil", - types.DynamicFeeTx{ - Accesses: types.NewAccessList(nil), - }, - nil, - }, - { - "non-empty accesses", - types.DynamicFeeTx{ - Accesses: types.AccessList{ - { - Address: suite.hexAddr, - StorageKeys: []string{}, - }, - }, - }, - ethtypes.AccessList{ - { - Address: suite.addr, - StorageKeys: []common.Hash{}, - }, - }, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetAccessList() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetData() { - testCases := []struct { - name string - tx types.DynamicFeeTx - }{ - { - "non-empty transaction", - types.DynamicFeeTx{ - Data: nil, - }, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetData() - - suite.Require().Equal(tc.tx.Data, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetGas() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp uint64 - }{ - { - "non-empty gas", - types.DynamicFeeTx{ - GasLimit: suite.uint64, - }, - suite.uint64, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGas() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetGasPrice() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp *big.Int - }{ - { - "non-empty gasFeeCap", - types.DynamicFeeTx{ - GasFeeCap: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasPrice() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetGasTipCap() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp *big.Int - }{ - { - "empty gasTipCap", - types.DynamicFeeTx{ - GasTipCap: nil, - }, - nil, - }, - { - "non-empty gasTipCap", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasTipCap() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetGasFeeCap() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp *big.Int - }{ - { - "empty gasFeeCap", - types.DynamicFeeTx{ - GasFeeCap: nil, - }, - nil, - }, - { - "non-empty gasFeeCap", - types.DynamicFeeTx{ - GasFeeCap: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasFeeCap() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetValue() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp *big.Int - }{ - { - "empty amount", - types.DynamicFeeTx{ - Amount: nil, - }, - nil, - }, - { - "non-empty amount", - types.DynamicFeeTx{ - Amount: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetValue() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetNonce() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp uint64 - }{ - { - "non-empty nonce", - types.DynamicFeeTx{ - Nonce: suite.uint64, - }, - suite.uint64, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetNonce() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxGetTo() { - testCases := []struct { - name string - tx types.DynamicFeeTx - exp *common.Address - }{ - { - "empty suite.address", - types.DynamicFeeTx{ - To: "", - }, - nil, - }, - { - "non-empty suite.address", - types.DynamicFeeTx{ - To: suite.hexAddr, - }, - &suite.addr, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetTo() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxSetSignatureValues() { - testCases := []struct { - name string - chainID *big.Int - r *big.Int - v *big.Int - s *big.Int - }{ - { - "empty values", - nil, - nil, - nil, - nil, - }, - { - "non-empty values", - suite.bigInt, - suite.bigInt, - suite.bigInt, - suite.bigInt, - }, - } - - for _, tc := range testCases { - tx := &types.DynamicFeeTx{} - tx.SetSignatureValues(tc.chainID, tc.v, tc.r, tc.s) - - v, r, s := tx.GetRawSignatureValues() - chainID := tx.GetChainID() - - suite.Require().Equal(tc.v, v, tc.name) - suite.Require().Equal(tc.r, r, tc.name) - suite.Require().Equal(tc.s, s, tc.name) - suite.Require().Equal(tc.chainID, chainID, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxValidate() { - testCases := []struct { - name string - tx types.DynamicFeeTx - expError bool - }{ - { - "empty", - types.DynamicFeeTx{}, - true, - }, - { - "gas tip cap is nil", - types.DynamicFeeTx{ - GasTipCap: nil, - }, - true, - }, - { - "gas fee cap is nil", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkZeroInt, - }, - true, - }, - { - "gas tip cap is negative", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkMinusOneInt, - GasFeeCap: &suite.sdkZeroInt, - }, - true, - }, - { - "gas tip cap is negative", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkZeroInt, - GasFeeCap: &suite.sdkMinusOneInt, - }, - true, - }, - { - "gas fee cap < gas tip cap", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkZeroInt, - }, - true, - }, - { - "amount is negative", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkInt, - Amount: &suite.sdkMinusOneInt, - }, - true, - }, - { - "to suite.address is invalid", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkInt, - Amount: &suite.sdkInt, - To: suite.invalidAddr, - }, - true, - }, - { - "chain ID not present on AccessList txs", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkInt, - Amount: &suite.sdkInt, - To: suite.hexAddr, - ChainID: nil, - }, - true, - }, - { - "no errors", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkInt, - Amount: &suite.sdkInt, - To: suite.hexAddr, - ChainID: &suite.sdkInt, - }, - false, - }, - } - - for _, tc := range testCases { - err := tc.tx.Validate() - - if tc.expError { - suite.Require().Error(err, tc.name) - continue - } - - suite.Require().NoError(err, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxEffectiveGasPrice() { - testCases := []struct { - name string - tx types.DynamicFeeTx - baseFee *big.Int - exp *big.Int - }{ - { - "non-empty dynamic fee tx", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveGasPrice(tc.baseFee) - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxEffectiveFee() { - testCases := []struct { - name string - tx types.DynamicFeeTx - baseFee *big.Int - exp *big.Int - }{ - { - "non-empty dynamic fee tx", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkInt, - GasLimit: uint64(1), - }, - (&suite.sdkInt).BigInt(), - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveFee(tc.baseFee) - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxEffectiveCost() { - testCases := []struct { - name string - tx types.DynamicFeeTx - baseFee *big.Int - exp *big.Int - }{ - { - "non-empty dynamic fee tx", - types.DynamicFeeTx{ - GasTipCap: &suite.sdkInt, - GasFeeCap: &suite.sdkInt, - GasLimit: uint64(1), - Amount: &suite.sdkZeroInt, - }, - (&suite.sdkInt).BigInt(), - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveCost(tc.baseFee) - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestDynamicFeeTxFeeCost() { - tx := &types.DynamicFeeTx{} - suite.Require().Panics(func() { tx.Fee() }, "should panic") - suite.Require().Panics(func() { tx.Cost() }, "should panic") -} diff --git a/legacy/evm/types/errors.go b/legacy/evm/types/errors.go deleted file mode 100644 index 197b2ce..0000000 --- a/legacy/evm/types/errors.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "errors" - "fmt" - - errorsmod "cosmossdk.io/errors" - "github.com/ethereum/go-ethereum/common" - - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/common/hexutil" -) - -const ( - codeErrInvalidState = uint32(iota) + 2 // NOTE: code 1 is reserved for internal errors - codeErrInvalidChainConfig - codeErrZeroAddress - codeErrCreateDisabled - codeErrCallDisabled - codeErrInvalidAmount - codeErrInvalidGasPrice - codeErrInvalidGasFee - codeErrVMExecution - codeErrInvalidRefund - codeErrInvalidGasCap - codeErrInvalidBaseFee - codeErrGasOverflow - codeErrInvalidAccount - codeErrInvalidGasLimit - codeErrInactivePrecompile - codeErrABIPack - codeErrABIUnpack -) - -var ( - // ErrInvalidState returns an error resulting from an invalid Storage State. - ErrInvalidState = errorsmod.Register(ModuleName, codeErrInvalidState, "invalid storage state") - - // ErrInvalidChainConfig returns an error resulting from an invalid ChainConfig. - ErrInvalidChainConfig = errorsmod.Register(ModuleName, codeErrInvalidChainConfig, "invalid chain configuration") - - // ErrZeroAddress returns an error resulting from an zero (empty) ethereum Address. - ErrZeroAddress = errorsmod.Register(ModuleName, codeErrZeroAddress, "invalid zero address") - - // ErrCreateDisabled returns an error if the EnableCreate parameter is false. - ErrCreateDisabled = errorsmod.Register(ModuleName, codeErrCreateDisabled, "EVM Create operation is disabled") - - // ErrCallDisabled returns an error if the EnableCall parameter is false. - ErrCallDisabled = errorsmod.Register(ModuleName, codeErrCallDisabled, "EVM Call operation is disabled") - - // ErrInvalidAmount returns an error if a tx contains an invalid amount. - ErrInvalidAmount = errorsmod.Register(ModuleName, codeErrInvalidAmount, "invalid transaction amount") - - // ErrInvalidGasPrice returns an error if an invalid gas price is provided to the tx. - ErrInvalidGasPrice = errorsmod.Register(ModuleName, codeErrInvalidGasPrice, "invalid gas price") - - // ErrInvalidGasFee returns an error if the tx gas fee is out of bound. - ErrInvalidGasFee = errorsmod.Register(ModuleName, codeErrInvalidGasFee, "invalid gas fee") - - // ErrVMExecution returns an error resulting from an error in EVM execution. - ErrVMExecution = errorsmod.Register(ModuleName, codeErrVMExecution, "evm transaction execution failed") - - // ErrInvalidRefund returns an error if a the gas refund value is invalid. - ErrInvalidRefund = errorsmod.Register(ModuleName, codeErrInvalidRefund, "invalid gas refund amount") - - // ErrInvalidGasCap returns an error if a the gas cap value is negative or invalid - ErrInvalidGasCap = errorsmod.Register(ModuleName, codeErrInvalidGasCap, "invalid gas cap") - - // ErrInvalidBaseFee returns an error if a the base fee cap value is invalid - ErrInvalidBaseFee = errorsmod.Register(ModuleName, codeErrInvalidBaseFee, "invalid base fee") - - // ErrGasOverflow returns an error if gas computation overlow/underflow - ErrGasOverflow = errorsmod.Register(ModuleName, codeErrGasOverflow, "gas computation overflow/underflow") - - // ErrInvalidAccount returns an error if the account is not an EVM compatible account - ErrInvalidAccount = errorsmod.Register(ModuleName, codeErrInvalidAccount, "account type is not a valid ethereum account") - - // ErrInvalidGasLimit returns an error if gas limit value is invalid - ErrInvalidGasLimit = errorsmod.Register(ModuleName, codeErrInvalidGasLimit, "invalid gas limit") - - // ErrInactivePrecompile returns an error if a call is made to an inactive precompile - ErrInactivePrecompile = errorsmod.Register(ModuleName, codeErrInactivePrecompile, "precompile not enabled") - - // ErrABIPack returns an error if the contract ABI packing fails - ErrABIPack = errorsmod.Register(ModuleName, codeErrABIPack, "contract ABI pack failed") - - // ErrABIUnpack returns an error if the contract ABI unpacking fails - ErrABIUnpack = errorsmod.Register(ModuleName, codeErrABIUnpack, "contract ABI unpack failed") -) - -// NewExecErrorWithReason unpacks the revert return bytes and returns a wrapped error -// with the return reason. -func NewExecErrorWithReason(revertReason []byte) *RevertError { - result := common.CopyBytes(revertReason) - reason, errUnpack := abi.UnpackRevert(result) - err := errors.New("execution reverted") - if errUnpack == nil { - err = fmt.Errorf("execution reverted: %v", reason) - } - return &RevertError{ - error: err, - reason: hexutil.Encode(result), - } -} - -// RevertError is an API error that encompass an EVM revert with JSON error -// code and a binary data blob. -type RevertError struct { - error - reason string // revert reason hex encoded -} - -// ErrorCode returns the JSON error code for a revert. -// See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal -func (e *RevertError) ErrorCode() int { - return 3 -} - -// ErrorData returns the hex encoded revert reason. -func (e *RevertError) ErrorData() interface{} { - return e.reason -} diff --git a/legacy/evm/types/events.go b/legacy/evm/types/events.go deleted file mode 100644 index 8c300bf..0000000 --- a/legacy/evm/types/events.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -// Evm module events -const ( - EventTypeEthereumTx = TypeMsgEthereumTx - EventTypeBlockBloom = "block_bloom" - EventTypeTxLog = "tx_log" - - AttributeKeyContractAddress = "contract" - AttributeKeyRecipient = "recipient" - AttributeKeyTxHash = "txHash" - AttributeKeyEthereumTxHash = "ethereumTxHash" - AttributeKeyTxIndex = "txIndex" - AttributeKeyTxGasUsed = "txGasUsed" - AttributeKeyTxType = "txType" - AttributeKeyTxLog = "txLog" - // tx failed in eth vm execution - AttributeKeyEthereumTxFailed = "ethereumTxFailed" - AttributeValueCategory = ModuleName - AttributeKeyEthereumBloom = "bloom" - - MetricKeyTransitionDB = "transition_db" - MetricKeyStaticCall = "static_call" -) diff --git a/legacy/evm/types/genesis.go b/legacy/evm/types/genesis.go deleted file mode 100644 index f3cc121..0000000 --- a/legacy/evm/types/genesis.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "fmt" - - "github.com/evmos/evmos/v20/types" -) - -// Validate performs a basic validation of a GenesisAccount fields. -func (ga GenesisAccount) Validate() error { - if err := types.ValidateAddress(ga.Address); err != nil { - return err - } - return ga.Storage.Validate() -} - -// DefaultGenesisState sets default evm genesis state with empty accounts and default params and -// chain config values. -func DefaultGenesisState() *GenesisState { - return &GenesisState{ - Accounts: []GenesisAccount{}, - Params: DefaultParams(), - } -} - -// NewGenesisState creates a new genesis state. -func NewGenesisState(params Params, accounts []GenesisAccount) *GenesisState { - return &GenesisState{ - Accounts: accounts, - Params: params, - } -} - -// Validate performs basic genesis state validation returning an error upon any -// failure. -func (gs GenesisState) Validate() error { - seenAccounts := make(map[string]bool) - for _, acc := range gs.Accounts { - if seenAccounts[acc.Address] { - return fmt.Errorf("duplicated genesis account %s", acc.Address) - } - if err := acc.Validate(); err != nil { - return fmt.Errorf("invalid genesis account %s: %w", acc.Address, err) - } - seenAccounts[acc.Address] = true - } - - return gs.Params.Validate() -} diff --git a/legacy/evm/types/genesis_test.go b/legacy/evm/types/genesis_test.go deleted file mode 100644 index 8a0f1a3..0000000 --- a/legacy/evm/types/genesis_test.go +++ /dev/null @@ -1,225 +0,0 @@ -package types - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/suite" - - "github.com/evmos/evmos/v20/crypto/ethsecp256k1" -) - -type GenesisTestSuite struct { - suite.Suite - - address string - hash common.Hash - code string -} - -func (suite *GenesisTestSuite) SetupTest() { - priv, err := ethsecp256k1.GenerateKey() - suite.Require().NoError(err) - - suite.address = common.BytesToAddress(priv.PubKey().Address().Bytes()).String() - suite.hash = common.BytesToHash([]byte("hash")) - suite.code = common.Bytes2Hex([]byte{1, 2, 3}) -} - -func TestGenesisTestSuite(t *testing.T) { - suite.Run(t, new(GenesisTestSuite)) -} - -func (suite *GenesisTestSuite) TestValidateGenesisAccount() { - testCases := []struct { - name string - genesisAccount GenesisAccount - expPass bool - }{ - { - "valid genesis account", - GenesisAccount{ - Address: suite.address, - Code: suite.code, - Storage: Storage{ - NewState(suite.hash, suite.hash), - }, - }, - true, - }, - { - "empty account address bytes", - GenesisAccount{ - Address: "", - Code: suite.code, - Storage: Storage{ - NewState(suite.hash, suite.hash), - }, - }, - false, - }, - { - "empty code bytes", - GenesisAccount{ - Address: suite.address, - Code: "", - Storage: Storage{ - NewState(suite.hash, suite.hash), - }, - }, - true, - }, - } - - for _, tc := range testCases { - tc := tc - err := tc.genesisAccount.Validate() - if tc.expPass { - suite.Require().NoError(err, tc.name) - } else { - suite.Require().Error(err, tc.name) - } - } -} - -func (suite *GenesisTestSuite) TestValidateGenesis() { - testCases := []struct { - name string - genState *GenesisState - expPass bool - }{ - { - name: "default", - genState: DefaultGenesisState(), - expPass: true, - }, - { - name: "valid genesis", - genState: &GenesisState{ - Accounts: []GenesisAccount{ - { - Address: suite.address, - - Code: suite.code, - Storage: Storage{ - {Key: suite.hash.String()}, - }, - }, - }, - Params: DefaultParams(), - }, - expPass: true, - }, - { - name: "empty genesis", - genState: &GenesisState{}, - expPass: false, - }, - { - name: "copied genesis", - genState: NewGenesisState(DefaultGenesisState().Params, DefaultGenesisState().Accounts), - expPass: true, - }, - { - name: "invalid genesis", - genState: &GenesisState{ - Accounts: []GenesisAccount{ - { - Address: common.Address{}.String(), - }, - }, - }, - expPass: false, - }, - { - name: "invalid genesis account", - genState: &GenesisState{ - Accounts: []GenesisAccount{ - { - Address: "123456", - - Code: suite.code, - Storage: Storage{ - {Key: suite.hash.String()}, - }, - }, - }, - Params: DefaultParams(), - }, - expPass: false, - }, - { - name: "duplicated genesis account", - genState: &GenesisState{ - Accounts: []GenesisAccount{ - { - Address: suite.address, - - Code: suite.code, - Storage: Storage{ - NewState(suite.hash, suite.hash), - }, - }, - { - Address: suite.address, - - Code: suite.code, - Storage: Storage{ - NewState(suite.hash, suite.hash), - }, - }, - }, - }, - expPass: false, - }, - { - name: "duplicated tx log", - genState: &GenesisState{ - Accounts: []GenesisAccount{ - { - Address: suite.address, - - Code: suite.code, - Storage: Storage{ - {Key: suite.hash.String()}, - }, - }, - }, - }, - expPass: false, - }, - { - name: "invalid tx log", - genState: &GenesisState{ - Accounts: []GenesisAccount{ - { - Address: suite.address, - - Code: suite.code, - Storage: Storage{ - {Key: suite.hash.String()}, - }, - }, - }, - }, - expPass: false, - }, - { - name: "invalid params", - genState: &GenesisState{ - Params: Params{}, - }, - expPass: false, - }, - } - - for _, tc := range testCases { - tc := tc - err := tc.genState.Validate() - if tc.expPass { - suite.Require().NoError(err, tc.name) - } else { - suite.Require().Error(err, tc.name) - } - } -} diff --git a/legacy/evm/types/interfaces.go b/legacy/evm/types/interfaces.go deleted file mode 100644 index 7a8bf43..0000000 --- a/legacy/evm/types/interfaces.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - context "context" - "math/big" - - "cosmossdk.io/core/address" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/ethereum/go-ethereum/common" - - 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" - "github.com/evmos/evmos/v20/x/evm/core/vm" - - feemarkettypes "github.com/evmos/evmos/v20/x/feemarket/types" -) - -// AccountKeeper defines the expected account keeper interface -type AccountKeeper interface { - NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI - GetModuleAddress(moduleName string) sdk.AccAddress - IterateAccounts(ctx context.Context, cb func(account sdk.AccountI) bool) - 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) - GetSequence(ctx context.Context, account sdk.AccAddress) (uint64, error) - AddressCodec() address.Codec -} - -// BankKeeper defines the expected interface needed to retrieve account balances. -type BankKeeper interface { - authtypes.BankKeeper - GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin - SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error -} - -// StakingKeeper returns the historical headers kept in store. -type StakingKeeper interface { - GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, error) - GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (stakingtypes.Validator, error) - ValidatorAddressCodec() address.Codec -} - -// FeeMarketKeeper -type FeeMarketKeeper interface { - GetBaseFee(ctx sdk.Context) *big.Int - GetParams(ctx sdk.Context) feemarkettypes.Params - CalculateBaseFee(ctx sdk.Context) *big.Int -} - -// Erc20Keeper defines the expected interface needed to instantiate ERC20 precompiles. -type Erc20Keeper interface { - GetERC20PrecompileInstance(ctx sdk.Context, address common.Address) (contract vm.PrecompiledContract, found bool, err error) -} - -type ( - LegacyParams = paramtypes.ParamSet - // Subspace defines an interface that implements the legacy Cosmos SDK x/params Subspace type. - // NOTE: This is used solely for migration of the Cosmos SDK x/params managed parameters. - Subspace interface { - GetParamSetIfExists(ctx sdk.Context, ps LegacyParams) - } -) diff --git a/legacy/evm/types/key.go b/legacy/evm/types/key.go deleted file mode 100644 index 2b35d6b..0000000 --- a/legacy/evm/types/key.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "github.com/ethereum/go-ethereum/common" -) - -const ( - // ModuleName string name of module - ModuleName = "evm" - - // StoreKey key for ethereum storage data, account code (StateDB) or block - // related data for Web3. - // The EVM module should use a prefix store. - StoreKey = ModuleName - - // TransientKey is the key to access the EVM transient store, that is reset - // during the Commit phase. - TransientKey = "transient_" + ModuleName - - // RouterKey uses module name for routing - RouterKey = ModuleName -) - -// prefix bytes for the EVM persistent store -const ( - prefixCode = iota + 1 - prefixStorage - prefixParams -) - -// prefix bytes for the EVM transient store -const ( - prefixTransientBloom = iota + 1 - prefixTransientTxIndex - prefixTransientLogSize - prefixTransientGasUsed -) - -// KVStore key prefixes -var ( - KeyPrefixCode = []byte{prefixCode} - KeyPrefixStorage = []byte{prefixStorage} - KeyPrefixParams = []byte{prefixParams} -) - -// Transient Store key prefixes -var ( - KeyPrefixTransientBloom = []byte{prefixTransientBloom} - KeyPrefixTransientTxIndex = []byte{prefixTransientTxIndex} - KeyPrefixTransientLogSize = []byte{prefixTransientLogSize} - KeyPrefixTransientGasUsed = []byte{prefixTransientGasUsed} -) - -// AddressStoragePrefix returns a prefix to iterate over a given account storage. -func AddressStoragePrefix(address common.Address) []byte { - return append(KeyPrefixStorage, address.Bytes()...) -} - -// StateKey defines the full key under which an account state is stored. -func StateKey(address common.Address, key []byte) []byte { - return append(AddressStoragePrefix(address), key...) -} diff --git a/legacy/evm/types/legacy_tx.go b/legacy/evm/types/legacy_tx.go deleted file mode 100644 index fe1969b..0000000 --- a/legacy/evm/types/legacy_tx.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math/big" - - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - - errorsmod "cosmossdk.io/errors" - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v20/types" - ethutils "github.com/evmos/evmos/v20/utils/eth" -) - -func NewLegacyTx(tx *ethtypes.Transaction) (*LegacyTx, error) { - txData := &LegacyTx{ - Nonce: tx.Nonce(), - Data: tx.Data(), - GasLimit: tx.Gas(), - } - - v, r, s := tx.RawSignatureValues() - if to := tx.To(); to != nil { - txData.To = to.Hex() - } - - if tx.Value() != nil { - amountInt, err := types.SafeNewIntFromBigInt(tx.Value()) - if err != nil { - return nil, err - } - txData.Amount = &amountInt - } - - if tx.GasPrice() != nil { - gasPriceInt, err := types.SafeNewIntFromBigInt(tx.GasPrice()) - if err != nil { - return nil, err - } - txData.GasPrice = &gasPriceInt - } - - txData.SetSignatureValues(tx.ChainId(), v, r, s) - return txData, nil -} - -// TxType returns the tx type -func (tx *LegacyTx) TxType() uint8 { - return ethtypes.LegacyTxType -} - -// Copy returns an instance with the same field values -func (tx *LegacyTx) Copy() TxData { - return &LegacyTx{ - Nonce: tx.Nonce, - GasPrice: tx.GasPrice, - GasLimit: tx.GasLimit, - To: tx.To, - Amount: tx.Amount, - Data: common.CopyBytes(tx.Data), - V: common.CopyBytes(tx.V), - R: common.CopyBytes(tx.R), - S: common.CopyBytes(tx.S), - } -} - -// GetChainID returns the chain id field from the derived signature values -func (tx *LegacyTx) GetChainID() *big.Int { - v, _, _ := tx.GetRawSignatureValues() - return ethutils.DeriveChainID(v) -} - -// GetAccessList returns nil -func (tx *LegacyTx) GetAccessList() ethtypes.AccessList { - return nil -} - -// GetData returns the a copy of the input data bytes. -func (tx *LegacyTx) GetData() []byte { - return common.CopyBytes(tx.Data) -} - -// GetGas returns the gas limit. -func (tx *LegacyTx) GetGas() uint64 { - return tx.GasLimit -} - -// GetGasPrice returns the gas price field. -func (tx *LegacyTx) GetGasPrice() *big.Int { - if tx.GasPrice == nil { - return nil - } - return tx.GasPrice.BigInt() -} - -// GetGasTipCap returns the gas price field. -func (tx *LegacyTx) GetGasTipCap() *big.Int { - return tx.GetGasPrice() -} - -// GetGasFeeCap returns the gas price field. -func (tx *LegacyTx) GetGasFeeCap() *big.Int { - return tx.GetGasPrice() -} - -// GetValue returns the tx amount. -func (tx *LegacyTx) GetValue() *big.Int { - if tx.Amount == nil { - return nil - } - return tx.Amount.BigInt() -} - -// GetNonce returns the account sequence for the transaction. -func (tx *LegacyTx) GetNonce() uint64 { return tx.Nonce } - -// GetTo returns the pointer to the recipient address. -func (tx *LegacyTx) GetTo() *common.Address { - if tx.To == "" { - return nil - } - to := common.HexToAddress(tx.To) - return &to -} - -// AsEthereumData returns an LegacyTx transaction tx from the proto-formatted -// TxData defined on the Cosmos EVM. -func (tx *LegacyTx) AsEthereumData() ethtypes.TxData { - v, r, s := tx.GetRawSignatureValues() - return ðtypes.LegacyTx{ - Nonce: tx.GetNonce(), - GasPrice: tx.GetGasPrice(), - Gas: tx.GetGas(), - To: tx.GetTo(), - Value: 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) -} - -// SetSignatureValues sets the signature values to the transaction. -func (tx *LegacyTx) SetSignatureValues(_, v, r, s *big.Int) { - if v != nil { - tx.V = v.Bytes() - } - if r != nil { - tx.R = r.Bytes() - } - if s != nil { - tx.S = s.Bytes() - } -} - -// Validate performs a stateless validation of the tx fields. -func (tx LegacyTx) Validate() error { - gasPrice := tx.GetGasPrice() - if gasPrice == nil { - return errorsmod.Wrap(ErrInvalidGasPrice, "gas price cannot be nil") - } - - if gasPrice.Sign() == -1 { - return errorsmod.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice) - } - if !types.IsValidInt256(gasPrice) { - return errorsmod.Wrap(ErrInvalidGasPrice, "out of bound") - } - if !types.IsValidInt256(tx.Fee()) { - return errorsmod.Wrap(ErrInvalidGasFee, "out of bound") - } - - amount := tx.GetValue() - // Amount can be 0 - if amount != nil && amount.Sign() == -1 { - return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount) - } - if !types.IsValidInt256(amount) { - return errorsmod.Wrap(ErrInvalidAmount, "out of bound") - } - - if tx.To != "" { - if err := types.ValidateAddress(tx.To); err != nil { - return errorsmod.Wrap(err, "invalid to address") - } - } - - if tx.GetChainID() == nil { - return errorsmod.Wrap( - errortypes.ErrInvalidChainID, - "chain ID must be derived from LegacyTx txs", - ) - } - - return nil -} - -// Fee returns gasprice * gaslimit. -func (tx LegacyTx) Fee() *big.Int { - return fee(tx.GetGasPrice(), tx.GetGas()) -} - -// Cost returns amount + gasprice * gaslimit. -func (tx LegacyTx) Cost() *big.Int { - return cost(tx.Fee(), tx.GetValue()) -} - -// EffectiveGasPrice is the same as GasPrice for LegacyTx -func (tx LegacyTx) EffectiveGasPrice(_ *big.Int) *big.Int { - return tx.GetGasPrice() -} - -// EffectiveFee is the same as Fee for LegacyTx -func (tx LegacyTx) EffectiveFee(_ *big.Int) *big.Int { - return tx.Fee() -} - -// EffectiveCost is the same as Cost for LegacyTx -func (tx LegacyTx) EffectiveCost(_ *big.Int) *big.Int { - return tx.Cost() -} diff --git a/legacy/evm/types/legacy_tx_test.go b/legacy/evm/types/legacy_tx_test.go deleted file mode 100644 index 1b0eab8..0000000 --- a/legacy/evm/types/legacy_tx_test.go +++ /dev/null @@ -1,434 +0,0 @@ -package types_test - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - - "github.com/evmos/evmos/v20/x/evm/types" -) - -func (suite *TxDataTestSuite) TestNewLegacyTx() { - testCases := []struct { - name string - tx *ethtypes.Transaction - }{ - { - "non-empty Transaction", - ethtypes.NewTx(ðtypes.AccessListTx{ - Nonce: 1, - Data: []byte("data"), - Gas: 100, - Value: big.NewInt(1), - AccessList: ethtypes.AccessList{}, - To: &suite.addr, - V: big.NewInt(1), - R: big.NewInt(1), - S: big.NewInt(1), - }), - }, - } - - for _, tc := range testCases { - tx, err := types.NewLegacyTx(tc.tx) - suite.Require().NoError(err) - - suite.Require().NotEmpty(tc.tx) - suite.Require().Equal(uint8(0), tx.TxType()) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxTxType() { - tx := types.LegacyTx{} - actual := tx.TxType() - - suite.Require().Equal(uint8(0), actual) -} - -func (suite *TxDataTestSuite) TestLegacyTxCopy() { - tx := &types.LegacyTx{} - txData := tx.Copy() - - suite.Require().Equal(&types.LegacyTx{}, txData) - // TODO: Test for different pointers -} - -func (suite *TxDataTestSuite) TestLegacyTxGetChainID() { - tx := types.LegacyTx{} - actual := tx.GetChainID() - - suite.Require().Nil(actual) -} - -func (suite *TxDataTestSuite) TestLegacyTxGetAccessList() { - tx := types.LegacyTx{} - actual := tx.GetAccessList() - - suite.Require().Nil(actual) -} - -func (suite *TxDataTestSuite) TestLegacyTxGetData() { - testCases := []struct { - name string - tx types.LegacyTx - }{ - { - "non-empty transaction", - types.LegacyTx{ - Data: nil, - }, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetData() - - suite.Require().Equal(tc.tx.Data, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxGetGas() { - testCases := []struct { - name string - tx types.LegacyTx - exp uint64 - }{ - { - "non-empty gas", - types.LegacyTx{ - GasLimit: suite.uint64, - }, - suite.uint64, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGas() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxGetGasPrice() { - testCases := []struct { - name string - tx types.LegacyTx - exp *big.Int - }{ - { - "empty gasPrice", - types.LegacyTx{ - GasPrice: nil, - }, - nil, - }, - { - "non-empty gasPrice", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasFeeCap() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxGetGasTipCap() { - testCases := []struct { - name string - tx types.LegacyTx - exp *big.Int - }{ - { - "non-empty gasPrice", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasTipCap() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxGetGasFeeCap() { - testCases := []struct { - name string - tx types.LegacyTx - exp *big.Int - }{ - { - "non-empty gasPrice", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetGasFeeCap() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxGetValue() { - testCases := []struct { - name string - tx types.LegacyTx - exp *big.Int - }{ - { - "empty amount", - types.LegacyTx{ - Amount: nil, - }, - nil, - }, - { - "non-empty amount", - types.LegacyTx{ - Amount: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetValue() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxGetNonce() { - testCases := []struct { - name string - tx types.LegacyTx - exp uint64 - }{ - { - "none-empty nonce", - types.LegacyTx{ - Nonce: suite.uint64, - }, - suite.uint64, - }, - } - for _, tc := range testCases { - actual := tc.tx.GetNonce() - - suite.Require().Equal(tc.exp, actual) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxGetTo() { - testCases := []struct { - name string - tx types.LegacyTx - exp *common.Address - }{ - { - "empty address", - types.LegacyTx{ - To: "", - }, - nil, - }, - { - "non-empty address", - types.LegacyTx{ - To: suite.hexAddr, - }, - &suite.addr, - }, - } - - for _, tc := range testCases { - actual := tc.tx.GetTo() - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxAsEthereumData() { - tx := &types.LegacyTx{} - txData := tx.AsEthereumData() - - suite.Require().Equal(ðtypes.LegacyTx{}, txData) -} - -func (suite *TxDataTestSuite) TestLegacyTxSetSignatureValues() { - testCases := []struct { - name string - v *big.Int - r *big.Int - s *big.Int - }{ - { - "non-empty values", - suite.bigInt, - suite.bigInt, - suite.bigInt, - }, - } - for _, tc := range testCases { - tx := &types.LegacyTx{} - tx.SetSignatureValues(nil, tc.v, tc.r, tc.s) - - v, r, s := tx.GetRawSignatureValues() - - suite.Require().Equal(tc.v, v, tc.name) - suite.Require().Equal(tc.r, r, tc.name) - suite.Require().Equal(tc.s, s, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxValidate() { - testCases := []struct { - name string - tx types.LegacyTx - expError bool - }{ - { - "empty", - types.LegacyTx{}, - true, - }, - { - "gas price is nil", - types.LegacyTx{ - GasPrice: nil, - }, - true, - }, - { - "gas price is negative", - types.LegacyTx{ - GasPrice: &suite.sdkMinusOneInt, - }, - true, - }, - { - "amount is negative", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - Amount: &suite.sdkMinusOneInt, - }, - true, - }, - { - "to address is invalid", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - Amount: &suite.sdkInt, - To: suite.invalidAddr, - }, - true, - }, - } - - for _, tc := range testCases { - err := tc.tx.Validate() - - if tc.expError { - suite.Require().Error(err, tc.name) - continue - } - - suite.Require().NoError(err, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxEffectiveGasPrice() { - testCases := []struct { - name string - tx types.LegacyTx - baseFee *big.Int - exp *big.Int - }{ - { - "non-empty legacy tx", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - }, - (&suite.sdkInt).BigInt(), - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveGasPrice(tc.baseFee) - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxEffectiveFee() { - testCases := []struct { - name string - tx types.LegacyTx - baseFee *big.Int - exp *big.Int - }{ - { - "non-empty legacy tx", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - GasLimit: uint64(1), - }, - (&suite.sdkInt).BigInt(), - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveFee(tc.baseFee) - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxEffectiveCost() { - testCases := []struct { - name string - tx types.LegacyTx - baseFee *big.Int - exp *big.Int - }{ - { - "non-empty legacy tx", - types.LegacyTx{ - GasPrice: &suite.sdkInt, - GasLimit: uint64(1), - Amount: &suite.sdkZeroInt, - }, - (&suite.sdkInt).BigInt(), - (&suite.sdkInt).BigInt(), - }, - } - - for _, tc := range testCases { - actual := tc.tx.EffectiveCost(tc.baseFee) - - suite.Require().Equal(tc.exp, actual, tc.name) - } -} - -func (suite *TxDataTestSuite) TestLegacyTxFeeCost() { - tx := &types.LegacyTx{} - - suite.Require().Panics(func() { tx.Fee() }, "should panic") - suite.Require().Panics(func() { tx.Cost() }, "should panic") -} diff --git a/legacy/evm/types/logs.go b/legacy/evm/types/logs.go deleted file mode 100644 index 9fa1484..0000000 --- a/legacy/evm/types/logs.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "errors" - "fmt" - - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - - evmostypes "github.com/evmos/evmos/v20/types" -) - -// NewTransactionLogs creates a new NewTransactionLogs instance. -func NewTransactionLogs(hash common.Hash, logs []*Log) TransactionLogs { - return TransactionLogs{ - Hash: hash.String(), - Logs: logs, - } -} - -// NewTransactionLogsFromEth creates a new NewTransactionLogs instance using []*ethtypes.Log. -func NewTransactionLogsFromEth(hash common.Hash, ethlogs []*ethtypes.Log) TransactionLogs { - return TransactionLogs{ - Hash: hash.String(), - Logs: NewLogsFromEth(ethlogs), - } -} - -// Validate performs a basic validation of a GenesisAccount fields. -func (tx TransactionLogs) Validate() error { - if evmostypes.IsEmptyHash(tx.Hash) { - return fmt.Errorf("hash cannot be the empty %s", tx.Hash) - } - - for i, log := range tx.Logs { - if log == nil { - return fmt.Errorf("log %d cannot be nil", i) - } - if err := log.Validate(); err != nil { - return fmt.Errorf("invalid log %d: %w", i, err) - } - if log.TxHash != tx.Hash { - return fmt.Errorf("log tx hash mismatch (%s ≠ %s)", log.TxHash, tx.Hash) - } - } - return nil -} - -// EthLogs returns the Ethereum type Logs from the Transaction Logs. -func (tx TransactionLogs) EthLogs() []*ethtypes.Log { - return LogsToEthereum(tx.Logs) -} - -// Validate performs a basic validation of an ethereum Log fields. -func (log *Log) Validate() error { - if err := evmostypes.ValidateAddress(log.Address); err != nil { - return fmt.Errorf("invalid log address %w", err) - } - if evmostypes.IsEmptyHash(log.BlockHash) { - return fmt.Errorf("block hash cannot be the empty %s", log.BlockHash) - } - if log.BlockNumber == 0 { - return errors.New("block number cannot be zero") - } - if evmostypes.IsEmptyHash(log.TxHash) { - return fmt.Errorf("tx hash cannot be the empty %s", log.TxHash) - } - return nil -} - -// ToEthereum returns the Ethereum type Log from a Ethermint proto compatible Log. -func (log *Log) ToEthereum() *ethtypes.Log { - topics := make([]common.Hash, len(log.Topics)) - for i, topic := range log.Topics { - topics[i] = common.HexToHash(topic) - } - - return ðtypes.Log{ - Address: common.HexToAddress(log.Address), - Topics: topics, - Data: log.Data, - BlockNumber: log.BlockNumber, - TxHash: common.HexToHash(log.TxHash), - TxIndex: uint(log.TxIndex), - Index: uint(log.Index), - BlockHash: common.HexToHash(log.BlockHash), - Removed: log.Removed, - } -} - -func NewLogsFromEth(ethlogs []*ethtypes.Log) []*Log { - var logs []*Log //nolint: prealloc - for _, ethlog := range ethlogs { - logs = append(logs, NewLogFromEth(ethlog)) - } - - return logs -} - -// LogsToEthereum casts the Ethermint Logs to a slice of Ethereum Logs. -func LogsToEthereum(logs []*Log) []*ethtypes.Log { - var ethLogs []*ethtypes.Log //nolint: prealloc - for i := range logs { - ethLogs = append(ethLogs, logs[i].ToEthereum()) - } - return ethLogs -} - -// NewLogFromEth creates a new Log instance from a Ethereum type Log. -func NewLogFromEth(log *ethtypes.Log) *Log { - topics := make([]string, len(log.Topics)) - for i, topic := range log.Topics { - topics[i] = topic.String() - } - - return &Log{ - Address: log.Address.String(), - Topics: topics, - Data: log.Data, - BlockNumber: log.BlockNumber, - TxHash: log.TxHash.String(), - TxIndex: uint64(log.TxIndex), - Index: uint64(log.Index), - BlockHash: log.BlockHash.String(), - Removed: log.Removed, - } -} diff --git a/legacy/evm/types/logs_test.go b/legacy/evm/types/logs_test.go deleted file mode 100644 index 8a87558..0000000 --- a/legacy/evm/types/logs_test.go +++ /dev/null @@ -1,201 +0,0 @@ -package types_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - utiltx "github.com/evmos/evmos/v20/testutil/tx" - "github.com/evmos/evmos/v20/x/evm/types" - - "github.com/ethereum/go-ethereum/common" -) - -func TestTransactionLogsValidate(t *testing.T) { - addr := utiltx.GenerateAddress().String() - - testCases := []struct { - name string - txLogs types.TransactionLogs - expPass bool - }{ - { - "valid log", - types.TransactionLogs{ - Hash: common.BytesToHash([]byte("tx_hash")).String(), - Logs: []*types.Log{ - { - Address: addr, - Topics: []string{common.BytesToHash([]byte("topic")).String()}, - Data: []byte("data"), - BlockNumber: 1, - TxHash: common.BytesToHash([]byte("tx_hash")).String(), - TxIndex: 1, - BlockHash: common.BytesToHash([]byte("block_hash")).String(), - Index: 1, - Removed: false, - }, - }, - }, - true, - }, - { - "empty hash", - types.TransactionLogs{ - Hash: common.Hash{}.String(), - }, - false, - }, - { - "nil log", - types.TransactionLogs{ - Hash: common.BytesToHash([]byte("tx_hash")).String(), - Logs: []*types.Log{nil}, - }, - false, - }, - { - "invalid log", - types.TransactionLogs{ - Hash: common.BytesToHash([]byte("tx_hash")).String(), - Logs: []*types.Log{{}}, - }, - false, - }, - { - "hash mismatch log", - types.TransactionLogs{ - Hash: common.BytesToHash([]byte("tx_hash")).String(), - Logs: []*types.Log{ - { - Address: addr, - Topics: []string{common.BytesToHash([]byte("topic")).String()}, - Data: []byte("data"), - BlockNumber: 1, - TxHash: common.BytesToHash([]byte("other_hash")).String(), - TxIndex: 1, - BlockHash: common.BytesToHash([]byte("block_hash")).String(), - Index: 1, - Removed: false, - }, - }, - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - err := tc.txLogs.Validate() - if tc.expPass { - require.NoError(t, err, tc.name) - } else { - require.Error(t, err, tc.name) - } - } -} - -func TestValidateLog(t *testing.T) { - addr := utiltx.GenerateAddress().String() - - testCases := []struct { - name string - log *types.Log - expPass bool - }{ - { - "valid log", - &types.Log{ - Address: addr, - Topics: []string{common.BytesToHash([]byte("topic")).String()}, - Data: []byte("data"), - BlockNumber: 1, - TxHash: common.BytesToHash([]byte("tx_hash")).String(), - TxIndex: 1, - BlockHash: common.BytesToHash([]byte("block_hash")).String(), - Index: 1, - Removed: false, - }, - true, - }, - { - "empty log", &types.Log{}, false, - }, - { - "zero address", - &types.Log{ - Address: common.Address{}.String(), - }, - false, - }, - { - "empty block hash", - &types.Log{ - Address: addr, - BlockHash: common.Hash{}.String(), - }, - false, - }, - { - "zero block number", - &types.Log{ - Address: addr, - BlockHash: common.BytesToHash([]byte("block_hash")).String(), - BlockNumber: 0, - }, - false, - }, - { - "empty tx hash", - &types.Log{ - Address: addr, - BlockHash: common.BytesToHash([]byte("block_hash")).String(), - BlockNumber: 1, - TxHash: common.Hash{}.String(), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - err := tc.log.Validate() - if tc.expPass { - require.NoError(t, err, tc.name) - } else { - require.Error(t, err, tc.name) - } - } -} - -func TestConversionFunctions(t *testing.T) { - addr := utiltx.GenerateAddress().String() - - txLogs := types.TransactionLogs{ - Hash: common.BytesToHash([]byte("tx_hash")).String(), - Logs: []*types.Log{ - { - Address: addr, - Topics: []string{common.BytesToHash([]byte("topic")).String()}, - Data: []byte("data"), - BlockNumber: 1, - TxHash: common.BytesToHash([]byte("tx_hash")).String(), - TxIndex: 1, - BlockHash: common.BytesToHash([]byte("block_hash")).String(), - Index: 1, - Removed: false, - }, - }, - } - - // convert valid log to eth logs and back (and validate) - conversionLogs := types.NewTransactionLogsFromEth(common.BytesToHash([]byte("tx_hash")), txLogs.EthLogs()) - conversionErr := conversionLogs.Validate() - - // create new transaction logs as copy of old valid one (and validate) - copyLogs := types.NewTransactionLogs(common.BytesToHash([]byte("tx_hash")), txLogs.Logs) - copyErr := copyLogs.Validate() - - require.Nil(t, conversionErr) - require.Nil(t, copyErr) -} diff --git a/legacy/evm/types/msg.go b/legacy/evm/types/msg.go deleted file mode 100644 index e60fe24..0000000 --- a/legacy/evm/types/msg.go +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "errors" - "fmt" - "math/big" - - protov2 "google.golang.org/protobuf/proto" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - 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" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - - evmapi "github.com/evmos/evmos/v20/api/ethermint/evm/v1" - "github.com/evmos/evmos/v20/types" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - ethtypes "github.com/ethereum/go-ethereum/core/types" -) - -var ( - _ sdk.Msg = &MsgEthereumTx{} - _ sdk.Tx = &MsgEthereumTx{} - _ ante.GasTx = &MsgEthereumTx{} - _ sdk.Msg = &MsgUpdateParams{} - - _ 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: evmapi.GetSigners, -} - -// NewTx returns a reference to a new Ethereum transaction message. -func NewTx( - tx *EvmTxArgs, -) *MsgEthereumTx { - return newMsgEthereumTx(tx) -} - -func newMsgEthereumTx( - tx *EvmTxArgs, -) *MsgEthereumTx { - var ( - cid, amt, gp *sdkmath.Int - toAddr string - txData TxData - ) - - if tx.To != nil { - toAddr = tx.To.Hex() - } - - if tx.Amount != nil { - amountInt := sdkmath.NewIntFromBigInt(tx.Amount) - amt = &amountInt - } - - if tx.ChainID != nil { - chainIDInt := sdkmath.NewIntFromBigInt(tx.ChainID) - cid = &chainIDInt - } - - if tx.GasPrice != nil { - gasPriceInt := sdkmath.NewIntFromBigInt(tx.GasPrice) - gp = &gasPriceInt - } - - switch { - case tx.GasFeeCap != nil: - gtc := sdkmath.NewIntFromBigInt(tx.GasTipCap) - gfc := sdkmath.NewIntFromBigInt(tx.GasFeeCap) - - txData = &DynamicFeeTx{ - ChainID: cid, - Amount: amt, - To: toAddr, - GasTipCap: >c, - GasFeeCap: &gfc, - Nonce: tx.Nonce, - GasLimit: tx.GasLimit, - Data: tx.Input, - Accesses: NewAccessList(tx.Accesses), - } - case tx.Accesses != nil: - txData = &AccessListTx{ - ChainID: cid, - Nonce: tx.Nonce, - To: toAddr, - Amount: amt, - GasLimit: tx.GasLimit, - GasPrice: gp, - Data: tx.Input, - Accesses: NewAccessList(tx.Accesses), - } - default: - txData = &LegacyTx{ - To: toAddr, - Amount: amt, - GasPrice: gp, - Nonce: tx.Nonce, - GasLimit: tx.GasLimit, - Data: tx.Input, - } - } - - dataAny, err := PackTxData(txData) - if err != nil { - panic(err) - } - - msg := MsgEthereumTx{Data: dataAny} - msg.Hash = msg.AsTransaction().Hash().Hex() - return &msg -} - -// FromEthereumTx populates the message fields from the given ethereum transaction -func (msg *MsgEthereumTx) FromEthereumTx(tx *ethtypes.Transaction) error { - txData, err := NewTxDataFromTx(tx) - if err != nil { - return err - } - - anyTxData, err := PackTxData(txData) - if err != nil { - return err - } - - msg.Data = anyTxData - msg.Hash = tx.Hash().Hex() - return nil -} - -// Route returns the route value of an MsgEthereumTx. -func (msg MsgEthereumTx) Route() string { return RouterKey } - -// Type returns the type value of an MsgEthereumTx. -func (msg MsgEthereumTx) Type() string { return TypeMsgEthereumTx } - -// ValidateBasic implements the sdk.Msg interface. It performs basic validation -// checks of a Transaction. If returns an error if validation fails. -func (msg MsgEthereumTx) ValidateBasic() error { - if msg.From != "" { - if err := types.ValidateAddress(msg.From); err != nil { - return errorsmod.Wrap(err, "invalid from address") - } - } - - // Validate Size_ field, should be kept empty - if msg.Size_ != 0 { - return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "tx size is deprecated") - } - - txData, err := UnpackTxData(msg.Data) - if err != nil { - return errorsmod.Wrap(err, "failed to unpack tx data") - } - - gas := txData.GetGas() - - // prevent txs with 0 gas to fill up the mempool - if gas == 0 { - return errorsmod.Wrap(ErrInvalidGasLimit, "gas limit must not be zero") - } - - // prevent gas limit from overflow - if g := new(big.Int).SetUint64(gas); !g.IsInt64() { - return errorsmod.Wrap(ErrGasOverflow, "gas limit must be less than math.MaxInt64") - } - - if err := txData.Validate(); err != nil { - return err - } - - // Validate Hash field after validated txData to avoid panic - txHash := msg.AsTransaction().Hash().Hex() - if msg.Hash != txHash { - return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "invalid tx hash %s, expected: %s", msg.Hash, txHash) - } - - return nil -} - -// GetMsgs returns a single MsgEthereumTx as an sdk.Msg. -func (msg *MsgEthereumTx) GetMsgs() []sdk.Msg { - return []sdk.Msg{msg} -} - -func (msg *MsgEthereumTx) GetMsgsV2() ([]protov2.Message, error) { - return nil, errors.New("not implemented") -} - -// GetSignBytes returns the Amino bytes of an Ethereum transaction message used -// for signing. -// -// NOTE: This method cannot be used as a chain ID is needed to create valid bytes -// to sign over. Use 'RLPSignBytes' instead. -func (msg MsgEthereumTx) GetSignBytes() []byte { - panic("must use 'RLPSignBytes' with a chain ID to get the valid bytes to sign") -} - -// Sign calculates a secp256k1 ECDSA signature and signs the transaction. It -// takes a keyring signer and the chainID to sign an Ethereum transaction according to -// EIP155 standard. -// This method mutates the transaction as it populates the V, R, S -// fields of the Transaction's Signature. -// The function will fail if the sender address is not defined for the msg or if -// the sender is not registered on the keyring -func (msg *MsgEthereumTx) Sign(ethSigner ethtypes.Signer, keyringSigner keyring.Signer) error { - from := msg.GetFrom() - if from.Empty() { - return fmt.Errorf("sender address not defined for message") - } - - tx := msg.AsTransaction() - txHash := ethSigner.Hash(tx) - - sig, _, err := keyringSigner.SignByAddress(from, txHash.Bytes(), signingtypes.SignMode_SIGN_MODE_TEXTUAL) - if err != nil { - return err - } - - tx, err = tx.WithSignature(ethSigner, sig) - if err != nil { - return err - } - - return msg.FromEthereumTx(tx) -} - -// GetGas implements the GasTx interface. It returns the GasLimit of the transaction. -func (msg MsgEthereumTx) GetGas() uint64 { - txData, err := UnpackTxData(msg.Data) - if err != nil { - return 0 - } - return txData.GetGas() -} - -// GetFee returns the fee for non dynamic fee tx -func (msg MsgEthereumTx) GetFee() *big.Int { - txData, err := UnpackTxData(msg.Data) - if err != nil { - return nil - } - return txData.Fee() -} - -// GetEffectiveFee returns the fee for dynamic fee tx -func (msg MsgEthereumTx) GetEffectiveFee(baseFee *big.Int) *big.Int { - txData, err := UnpackTxData(msg.Data) - if err != nil { - return nil - } - return txData.EffectiveFee(baseFee) -} - -// GetFrom loads the ethereum sender address from the sigcache and returns an -// sdk.AccAddress from its bytes -func (msg *MsgEthereumTx) GetFrom() sdk.AccAddress { - if msg.From == "" { - return nil - } - - return common.HexToAddress(msg.From).Bytes() -} - -// AsTransaction creates an Ethereum Transaction type from the msg fields -func (msg MsgEthereumTx) AsTransaction() *ethtypes.Transaction { - txData, err := UnpackTxData(msg.Data) - if err != nil { - return nil - } - - return ethtypes.NewTx(txData.AsEthereumData()) -} - -// AsMessage creates an Ethereum core.Message from the msg fields -func (msg MsgEthereumTx) AsMessage(signer ethtypes.Signer, baseFee *big.Int) (core.Message, error) { - return msg.AsTransaction().AsMessage(signer, baseFee) -} - -// GetSender extracts the sender address from the signature values using the latest signer for the given chainID. -func (msg *MsgEthereumTx) GetSender(chainID *big.Int) (common.Address, error) { - signer := ethtypes.LatestSignerForChainID(chainID) - from, err := signer.Sender(msg.AsTransaction()) - if err != nil { - return common.Address{}, err - } - - msg.From = from.Hex() - return from, nil -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (msg MsgEthereumTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpacker.UnpackAny(msg.Data, new(TxData)) -} - -// UnmarshalBinary decodes the canonical encoding of transactions. -func (msg *MsgEthereumTx) UnmarshalBinary(b []byte) error { - tx := ðtypes.Transaction{} - if err := tx.UnmarshalBinary(b); err != nil { - return err - } - return msg.FromEthereumTx(tx) -} - -// BuildTx builds the canonical cosmos tx from ethereum msg -func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (signing.Tx, error) { - builder, ok := b.(authtx.ExtensionOptionsTxBuilder) - if !ok { - return nil, errors.New("unsupported builder") - } - - option, err := codectypes.NewAnyWithValue(&ExtensionOptionsEthereumTx{}) - if err != nil { - return nil, err - } - - txData, err := UnpackTxData(msg.Data) - if err != nil { - return nil, err - } - fees := make(sdk.Coins, 0) - feeAmt := sdkmath.NewIntFromBigInt(txData.Fee()) - if feeAmt.Sign() > 0 { - fees = append(fees, sdk.NewCoin(evmDenom, feeAmt)) - } - - builder.SetExtensionOptions(option) - - // A valid msg should have empty `From` - msg.From = "" - - err = builder.SetMsgs(msg) - if err != nil { - return nil, err - } - builder.SetFeeAmount(fees) - builder.SetGasLimit(msg.GetGas()) - tx := builder.GetTx() - return tx, nil -} - -// ValidateBasic does a sanity check of the provided data -func (m *MsgUpdateParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return errorsmod.Wrap(err, "invalid authority address") - } - - return m.Params.Validate() -} - -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) -} diff --git a/legacy/evm/types/msg_test.go b/legacy/evm/types/msg_test.go deleted file mode 100644 index b10b887..0000000 --- a/legacy/evm/types/msg_test.go +++ /dev/null @@ -1,909 +0,0 @@ -package types_test - -import ( - "fmt" - "math" - "math/big" - "reflect" - "strings" - "testing" - - sdkmath "cosmossdk.io/math" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v20/crypto/ethsecp256k1" - utiltx "github.com/evmos/evmos/v20/testutil/tx" - - "github.com/evmos/evmos/v20/encoding" - "github.com/evmos/evmos/v20/x/evm/types" -) - -const invalidAddress = "0x0000" - -type MsgsTestSuite struct { - suite.Suite - - signer keyring.Signer - from common.Address - to common.Address - chainID *big.Int - hundredBigInt *big.Int - - clientCtx client.Context -} - -func TestMsgsTestSuite(t *testing.T) { - suite.Run(t, new(MsgsTestSuite)) -} - -func (suite *MsgsTestSuite) SetupTest() { - from, privFrom := utiltx.NewAddrKey() - - suite.signer = utiltx.NewSigner(privFrom) - suite.from = from - suite.to = utiltx.GenerateAddress() - suite.chainID = big.NewInt(1) - suite.hundredBigInt = big.NewInt(100) - - encodingConfig := encoding.MakeConfig() - suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) -} - -func (suite *MsgsTestSuite) TestMsgEthereumTx_Constructor() { - evmTx := &types.EvmTxArgs{ - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - Input: []byte("test"), - } - msg := types.NewTx(evmTx) - - // suite.Require().Equal(msg.Data.To, suite.to.Hex()) - suite.Require().Equal(msg.Route(), types.RouterKey) - suite.Require().Equal(msg.Type(), types.TypeMsgEthereumTx) - // suite.Require().NotNil(msg.To()) - suite.Require().Equal(msg.GetMsgs(), []sdk.Msg{msg}) - suite.Require().Panics(func() { msg.GetSignBytes() }) - - evmTx2 := &types.EvmTxArgs{ - Nonce: 0, - GasLimit: 100000, - Input: []byte("test"), - } - msg = types.NewTx(evmTx2) - suite.Require().NotNil(msg) - // suite.Require().Empty(msg.Data.To) - // suite.Require().Nil(msg.To()) -} - -func (suite *MsgsTestSuite) TestMsgEthereumTx_BuildTx() { - evmTx := &types.EvmTxArgs{ - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - GasPrice: big.NewInt(1), - GasFeeCap: big.NewInt(1), - GasTipCap: big.NewInt(0), - Input: []byte("test"), - } - testCases := []struct { - name string - msg *types.MsgEthereumTx - expError bool - }{ - { - "build tx - pass", - types.NewTx(evmTx), - false, - }, - { - "build tx - fail: nil data", - types.NewTx(evmTx), - true, - }, - } - - for _, tc := range testCases { - if strings.Contains(tc.name, "nil data") { - tc.msg.Data = nil - } - - tx, err := tc.msg.BuildTx(suite.clientCtx.TxConfig.NewTxBuilder(), types.DefaultEVMDenom) - if tc.expError { - suite.Require().Error(err) - } else { - suite.Require().NoError(err) - - suite.Require().Empty(tx.GetMemo()) - suite.Require().Empty(tx.GetTimeoutHeight()) - suite.Require().Equal(uint64(100000), tx.GetGas()) - suite.Require().Equal(sdk.NewCoins(sdk.NewCoin(types.DefaultEVMDenom, sdkmath.NewInt(100000))), tx.GetFee()) - } - } -} - -func (suite *MsgsTestSuite) TestMsgEthereumTx_ValidateBasic() { - var ( - hundredInt = big.NewInt(100) - validChainID = big.NewInt(9000) - zeroInt = big.NewInt(0) - minusOneInt = big.NewInt(-1) - //nolint:all - exp_2_255 = new(big.Int).Exp(big.NewInt(2), big.NewInt(255), nil) - ) - testCases := []struct { - msg string - to string - amount *big.Int - gasLimit uint64 - gasPrice *big.Int - gasFeeCap *big.Int - gasTipCap *big.Int - from string - accessList *ethtypes.AccessList - chainID *big.Int - expectPass bool - errMsg string - }{ - { - msg: "pass with recipient - Legacy Tx", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: true, - }, - { - msg: "pass with recipient - AccessList Tx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: true, - }, - { - msg: "pass with recipient - DynamicFee Tx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: hundredInt, - gasTipCap: zeroInt, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: true, - }, - { - msg: "pass contract - Legacy Tx", - to: "", - from: suite.from.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: true, - }, - { - msg: "maxInt64 gas limit overflow", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: hundredInt, - gasLimit: math.MaxInt64 + 1, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: false, - errMsg: "gas limit must be less than math.MaxInt64", - }, - { - msg: "nil amount - Legacy Tx", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: nil, - gasLimit: 1000, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: true, - }, - { - msg: "negative amount - Legacy Tx", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: minusOneInt, - gasLimit: 1000, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: false, - errMsg: "amount cannot be negative", - }, - { - msg: "zero gas limit - Legacy Tx", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: hundredInt, - gasLimit: 0, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: false, - errMsg: "gas limit must not be zero", - }, - { - msg: "nil gas price - Legacy Tx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: nil, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: false, - errMsg: "gas price cannot be nil", - }, - { - msg: "negative gas price - Legacy Tx", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: minusOneInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: false, - errMsg: "gas price cannot be negative", - }, - { - msg: "zero gas price - Legacy Tx", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: true, - }, - { - msg: "invalid from address - Legacy Tx", - to: suite.to.Hex(), - from: invalidAddress, - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: false, - errMsg: "invalid from address", - }, - { - msg: "out of bound gas fee - Legacy Tx", - to: suite.to.Hex(), - from: suite.from.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: exp_2_255, - gasFeeCap: nil, - gasTipCap: nil, - chainID: validChainID, - expectPass: false, - errMsg: "out of bound", - }, - { - msg: "nil amount - AccessListTx", - to: suite.to.Hex(), - amount: nil, - gasLimit: 1000, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: true, - }, - { - msg: "negative amount - AccessListTx", - to: suite.to.Hex(), - amount: minusOneInt, - gasLimit: 1000, - gasPrice: hundredInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: false, - errMsg: "amount cannot be negative", - }, - { - msg: "zero gas limit - AccessListTx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 0, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: false, - errMsg: "gas limit must not be zero", - }, - { - msg: "nil gas price - AccessListTx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: nil, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: false, - errMsg: "cannot be nil: invalid gas price", - }, - { - msg: "negative gas price - AccessListTx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: minusOneInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: false, - errMsg: "gas price cannot be negative", - }, - { - msg: "zero gas price - AccessListTx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: true, - }, - { - msg: "invalid from address - AccessListTx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - from: invalidAddress, - accessList: ðtypes.AccessList{}, - chainID: validChainID, - expectPass: false, - errMsg: "invalid from address", - }, - { - msg: "chain ID not set on AccessListTx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - chainID: nil, - expectPass: false, - errMsg: "chain ID must be present on AccessList txs", - }, - { - msg: "nil tx.Data - AccessList Tx", - to: suite.to.Hex(), - amount: hundredInt, - gasLimit: 1000, - gasPrice: zeroInt, - gasFeeCap: nil, - gasTipCap: nil, - accessList: ðtypes.AccessList{}, - expectPass: false, - errMsg: "failed to unpack tx data", - }, - } - - for _, tc := range testCases { - suite.Run(tc.msg, func() { - to := common.HexToAddress(tc.to) - evmTx := &types.EvmTxArgs{ - ChainID: tc.chainID, - Nonce: 1, - To: &to, - Amount: tc.amount, - GasLimit: tc.gasLimit, - GasPrice: tc.gasPrice, - GasFeeCap: tc.gasFeeCap, - Accesses: tc.accessList, - } - tx := types.NewTx(evmTx) - tx.From = tc.from - - // apply nil assignment here to test ValidateBasic function instead of NewTx - if strings.Contains(tc.msg, "nil tx.Data") { - tx.Data = nil - } - - // for legacy_Tx need to sign tx because the chainID is derived - // from signature - if tc.accessList == nil && tc.from == suite.from.Hex() { - ethSigner := ethtypes.LatestSignerForChainID(tc.chainID) - err := tx.Sign(ethSigner, suite.signer) - suite.Require().NoError(err) - } - - err := tx.ValidateBasic() - - if tc.expectPass { - suite.Require().NoError(err) - } else { - suite.Require().Error(err) - suite.Require().Contains(err.Error(), tc.errMsg) - } - }) - } -} - -func (suite *MsgsTestSuite) TestMsgEthereumTx_ValidateBasicAdvanced() { - hundredInt := big.NewInt(100) - evmTx := &types.EvmTxArgs{ - ChainID: hundredInt, - Nonce: 1, - Amount: big.NewInt(10), - GasLimit: 100000, - GasPrice: big.NewInt(150), - GasFeeCap: big.NewInt(200), - } - - testCases := []struct { - msg string - msgBuilder func() *types.MsgEthereumTx - expectPass bool - }{ - { - "fails - invalid tx hash", - func() *types.MsgEthereumTx { - msg := types.NewTx(evmTx) - msg.Hash = "0x00" - return msg - }, - false, - }, - { - "fails - invalid size", - func() *types.MsgEthereumTx { - msg := types.NewTx(evmTx) - msg.Size_ = 1 - return msg - }, - false, - }, - } - - for _, tc := range testCases { - suite.Run(tc.msg, func() { - err := tc.msgBuilder().ValidateBasic() - if tc.expectPass { - suite.Require().NoError(err) - } else { - suite.Require().Error(err) - } - }) - } -} - -func (suite *MsgsTestSuite) TestMsgEthereumTx_Sign() { - testCases := []struct { - msg string - txParams *types.EvmTxArgs - ethSigner ethtypes.Signer - malleate func(tx *types.MsgEthereumTx) - expectPass bool - }{ - { - "pass - EIP2930 signer", - &types.EvmTxArgs{ - ChainID: suite.chainID, - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - Input: []byte("test"), - Accesses: ðtypes.AccessList{}, - }, - ethtypes.NewEIP2930Signer(suite.chainID), - func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, - true, - }, - { - "pass - EIP155 signer", - &types.EvmTxArgs{ - ChainID: suite.chainID, - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - Input: []byte("test"), - }, - ethtypes.NewEIP155Signer(suite.chainID), - func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, - true, - }, - { - "pass - Homestead signer", - &types.EvmTxArgs{ - ChainID: suite.chainID, - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - Input: []byte("test"), - }, - ethtypes.HomesteadSigner{}, - func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, - true, - }, - { - "pass - Frontier signer", - &types.EvmTxArgs{ - ChainID: suite.chainID, - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - Input: []byte("test"), - }, - ethtypes.FrontierSigner{}, - func(tx *types.MsgEthereumTx) { tx.From = suite.from.Hex() }, - true, - }, - { - "no from address ", - &types.EvmTxArgs{ - ChainID: suite.chainID, - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - Input: []byte("test"), - Accesses: ðtypes.AccessList{}, - }, - ethtypes.NewEIP2930Signer(suite.chainID), - func(tx *types.MsgEthereumTx) { tx.From = "" }, - false, - }, - { - "from address ≠ signer address", - &types.EvmTxArgs{ - ChainID: suite.chainID, - Nonce: 0, - To: &suite.to, - GasLimit: 100000, - Input: []byte("test"), - Accesses: ðtypes.AccessList{}, - }, - ethtypes.NewEIP2930Signer(suite.chainID), - func(tx *types.MsgEthereumTx) { tx.From = suite.to.Hex() }, - false, - }, - } - - for i, tc := range testCases { - tx := types.NewTx(tc.txParams) - tc.malleate(tx) - err := tx.Sign(tc.ethSigner, suite.signer) - if tc.expectPass { - suite.Require().NoError(err, "valid test %d failed: %s", i, tc.msg) - - sender, err := tx.GetSender(suite.chainID) - suite.Require().NoError(err, tc.msg) - suite.Require().Equal(tx.From, sender.Hex(), tc.msg) - } else { - suite.Require().Error(err, "invalid test %d passed: %s", i, tc.msg) - } - } -} - -func (suite *MsgsTestSuite) TestMsgEthereumTx_Getters() { - evmTx := &types.EvmTxArgs{ - ChainID: suite.chainID, - Nonce: 0, - To: &suite.to, - GasLimit: 50, - GasPrice: suite.hundredBigInt, - Accesses: ðtypes.AccessList{}, - } - testCases := []struct { - name string - ethSigner ethtypes.Signer - exp *big.Int - }{ - { - "get fee - pass", - - ethtypes.NewEIP2930Signer(suite.chainID), - big.NewInt(5000), - }, - { - "get fee - fail: nil data", - ethtypes.NewEIP2930Signer(suite.chainID), - nil, - }, - { - "get effective fee - pass", - - ethtypes.NewEIP2930Signer(suite.chainID), - big.NewInt(5000), - }, - { - "get effective fee - fail: nil data", - ethtypes.NewEIP2930Signer(suite.chainID), - nil, - }, - { - "get gas - pass", - ethtypes.NewEIP2930Signer(suite.chainID), - big.NewInt(50), - }, - { - "get gas - fail: nil data", - ethtypes.NewEIP2930Signer(suite.chainID), - big.NewInt(0), - }, - } - - var fee, effFee *big.Int - for _, tc := range testCases { - tx := types.NewTx(evmTx) - if strings.Contains(tc.name, "nil data") { - tx.Data = nil - } - switch { - case strings.Contains(tc.name, "get fee"): - fee = tx.GetFee() - suite.Require().Equal(tc.exp, fee) - case strings.Contains(tc.name, "get effective fee"): - effFee = tx.GetEffectiveFee(big.NewInt(0)) - suite.Require().Equal(tc.exp, effFee) - case strings.Contains(tc.name, "get gas"): - gas := tx.GetGas() - suite.Require().Equal(tc.exp.Uint64(), gas) - } - } -} - -func (suite *MsgsTestSuite) TestFromEthereumTx() { - privkey, _ := ethsecp256k1.GenerateKey() - ethPriv, err := privkey.ToECDSA() - suite.Require().NoError(err) - - // 10^80 is more than 256 bits - //nolint:all - exp_10_80 := new(big.Int).Mul(big.NewInt(1), new(big.Int).Exp(big.NewInt(10), big.NewInt(80), nil)) - - testCases := []struct { - msg string - expectPass bool - buildTx func() *ethtypes.Transaction - }{ - {"success, normal tx", true, func() *ethtypes.Transaction { - tx := ethtypes.NewTx(ðtypes.AccessListTx{ - Nonce: 0, - Data: nil, - To: &suite.to, - Value: big.NewInt(10), - GasPrice: big.NewInt(1), - Gas: 21000, - }) - tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) - suite.Require().NoError(err) - return tx - }}, - {"success, DynamicFeeTx", true, func() *ethtypes.Transaction { - tx := ethtypes.NewTx(ðtypes.DynamicFeeTx{ - Nonce: 0, - Data: nil, - To: &suite.to, - Value: big.NewInt(10), - Gas: 21000, - }) - tx, err := ethtypes.SignTx(tx, ethtypes.NewLondonSigner(suite.chainID), ethPriv) - suite.Require().NoError(err) - return tx - }}, - {"fail, value bigger than 256bits - AccessListTx", false, func() *ethtypes.Transaction { - tx := ethtypes.NewTx(ðtypes.AccessListTx{ - Nonce: 0, - Data: nil, - To: &suite.to, - Value: exp_10_80, - GasPrice: big.NewInt(1), - Gas: 21000, - }) - tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) - suite.Require().NoError(err) - return tx - }}, - {"fail, gas price bigger than 256bits - AccessListTx", false, func() *ethtypes.Transaction { - tx := ethtypes.NewTx(ðtypes.AccessListTx{ - Nonce: 0, - Data: nil, - To: &suite.to, - Value: big.NewInt(1), - GasPrice: exp_10_80, - Gas: 21000, - }) - tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) - suite.Require().NoError(err) - return tx - }}, - {"fail, value bigger than 256bits - LegacyTx", false, func() *ethtypes.Transaction { - tx := ethtypes.NewTx(ðtypes.LegacyTx{ - Nonce: 0, - Data: nil, - To: &suite.to, - Value: exp_10_80, - GasPrice: big.NewInt(1), - Gas: 21000, - }) - tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) - suite.Require().NoError(err) - return tx - }}, - {"fail, gas price bigger than 256bits - LegacyTx", false, func() *ethtypes.Transaction { - tx := ethtypes.NewTx(ðtypes.LegacyTx{ - Nonce: 0, - Data: nil, - To: &suite.to, - Value: big.NewInt(1), - GasPrice: exp_10_80, - Gas: 21000, - }) - tx, err := ethtypes.SignTx(tx, ethtypes.NewEIP2930Signer(suite.chainID), ethPriv) - suite.Require().NoError(err) - return tx - }}, - } - - for _, tc := range testCases { - ethTx := tc.buildTx() - tx := &types.MsgEthereumTx{} - err := tx.FromEthereumTx(ethTx) - if tc.expectPass { - suite.Require().NoError(err) - - // round-trip test - suite.Require().NoError(assertEqual(tx.AsTransaction(), ethTx)) - } else { - suite.Require().Error(err) - } - } -} - -// TestTransactionCoding tests serializing/de-serializing to/from rlp and JSON. -// adapted from go-ethereum -func (suite *MsgsTestSuite) TestTransactionCoding() { - key, err := crypto.GenerateKey() - if err != nil { - suite.T().Fatalf("could not generate key: %v", err) - } - var ( - signer = ethtypes.NewEIP2930Signer(common.Big1) - addr = common.HexToAddress("0x0000000000000000000000000000000000000001") - recipient = common.HexToAddress("095e7baea6a6c7c4c2dfeb977efac326af552d87") - accesses = ethtypes.AccessList{{Address: addr, StorageKeys: []common.Hash{{0}}}} - ) - for i := uint64(0); i < 500; i++ { - var txdata ethtypes.TxData - switch i % 5 { - case 0: - // Legacy tx. - txdata = ðtypes.LegacyTx{ - Nonce: i, - To: &recipient, - Gas: 1, - GasPrice: big.NewInt(2), - Data: []byte("abcdef"), - } - case 1: - // Legacy tx contract creation. - txdata = ðtypes.LegacyTx{ - Nonce: i, - Gas: 1, - GasPrice: big.NewInt(2), - Data: []byte("abcdef"), - } - case 2: - // Tx with non-zero access list. - txdata = ðtypes.AccessListTx{ - ChainID: big.NewInt(1), - Nonce: i, - To: &recipient, - Gas: 123457, - GasPrice: big.NewInt(10), - AccessList: accesses, - Data: []byte("abcdef"), - } - case 3: - // Tx with empty access list. - txdata = ðtypes.AccessListTx{ - ChainID: big.NewInt(1), - Nonce: i, - To: &recipient, - Gas: 123457, - GasPrice: big.NewInt(10), - Data: []byte("abcdef"), - } - case 4: - // Contract creation with access list. - txdata = ðtypes.AccessListTx{ - ChainID: big.NewInt(1), - Nonce: i, - Gas: 123457, - GasPrice: big.NewInt(10), - AccessList: accesses, - } - } - tx, err := ethtypes.SignNewTx(key, signer, txdata) - if err != nil { - suite.T().Fatalf("could not sign transaction: %v", err) - } - // RLP - parsedTx, err := encodeDecodeBinary(tx) - if err != nil { - suite.T().Fatal(err) - } - err = assertEqual(parsedTx.AsTransaction(), tx) - suite.Require().NoError(err) - } -} - -func encodeDecodeBinary(tx *ethtypes.Transaction) (*types.MsgEthereumTx, error) { - data, err := tx.MarshalBinary() - if err != nil { - return nil, fmt.Errorf("rlp encoding failed: %v", err) - } - parsedTx := &types.MsgEthereumTx{} - if err := parsedTx.UnmarshalBinary(data); err != nil { - return nil, fmt.Errorf("rlp decoding failed: %v", err) - } - return parsedTx, nil -} - -func assertEqual(orig *ethtypes.Transaction, cpy *ethtypes.Transaction) error { - // compare nonce, price, gaslimit, recipient, amount, payload, V, R, S - if want, got := orig.Hash(), cpy.Hash(); want != got { - return fmt.Errorf("parsed tx differs from original tx, want %v, got %v", want, got) - } - if want, got := orig.ChainId(), cpy.ChainId(); want.Cmp(got) != 0 { - return fmt.Errorf("invalid chain id, want %d, got %d", want, got) - } - if orig.AccessList() != nil { - if !reflect.DeepEqual(orig.AccessList(), cpy.AccessList()) { - return fmt.Errorf("access list wrong") - } - } - return nil -} diff --git a/legacy/evm/types/opcodes_hooks.go b/legacy/evm/types/opcodes_hooks.go deleted file mode 100644 index a3595a1..0000000 --- a/legacy/evm/types/opcodes_hooks.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package types - -import ( - "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v20/x/evm/core/vm" -) - -// OpCodeHooks extends the geth OpCodeHooks interface to add custom hooks for EVM operations. -// The hooks run before the respective opcode execution every time they are called. -type OpCodeHooks interface { - vm.OpCodeHooks - AddCallHooks(hooks ...CallHook) - AddCreateHooks(hooks ...CreateHook) -} - -// DefaultOpCodesHooks is the default implementation of OpCodeHooks for EVMOS chain -// The hooks are used to enforce access control policies on EVM operations. -// They are ran BEFORE the respective opcode execution every time they are called. -type DefaultOpCodesHooks struct { - callHooks []CallHook - createHooks []CreateHook -} - -// Make sure we comply with geth's OpCodeHooks interface -var _ OpCodeHooks = (*DefaultOpCodesHooks)(nil) - -type ( - CreateHook func(ev *vm.EVM, caller common.Address) error - CallHook func(ev *vm.EVM, caller common.Address, recipient common.Address) error -) - -// NewDefaultOpCodesHooks creates a new DefaultOpCodesHooks instance -func NewDefaultOpCodesHooks() OpCodeHooks { - return &DefaultOpCodesHooks{} -} - -// AddCallHooks adds one or more hooks to the queue to be executed before the CALL opcode. -// Hooks will be executed in the order they are added. -func (h *DefaultOpCodesHooks) AddCallHooks(hooks ...CallHook) { - h.callHooks = append(h.callHooks, hooks...) -} - -// AddCreateHooks adds one or more hooks to the queue to be executed before the CREATE opcode. -// Hooks will be executed in the order they are added. -func (h *DefaultOpCodesHooks) AddCreateHooks(hooks ...CreateHook) { - h.createHooks = append(h.createHooks, hooks...) -} - -// CreateHook checks if the caller has permission to deploy contracts -func (h *DefaultOpCodesHooks) CreateHook(evm *vm.EVM, caller common.Address) error { - for _, hook := range h.createHooks { - if err := hook(evm, caller); err != nil { - return err - } - } - return nil -} - -// CallHook checks if the caller has permission to perform a call -func (h *DefaultOpCodesHooks) CallHook(evm *vm.EVM, caller common.Address, recipient common.Address) error { - for _, hook := range h.callHooks { - if err := hook(evm, caller, recipient); err != nil { - return err - } - } - return nil -} diff --git a/legacy/evm/types/params.go b/legacy/evm/types/params.go deleted file mode 100644 index d416318..0000000 --- a/legacy/evm/types/params.go +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "fmt" - "math/big" - "slices" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - 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/common" - "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v20/types" - "github.com/evmos/evmos/v20/utils" - "github.com/evmos/evmos/v20/x/evm/core/vm" -) - -var ( - // DefaultEVMDenom defines the default EVM denomination on Evmos - DefaultEVMDenom = utils.BaseDenom - // DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false) - DefaultAllowUnprotectedTxs = false - // DefaultStaticPrecompiles defines the default active precompiles - DefaultStaticPrecompiles = []string{ - P256PrecompileAddress, // P256 precompile - Bech32PrecompileAddress, // Bech32 precompile - StakingPrecompileAddress, // Staking precompile - DistributionPrecompileAddress, // Distribution precompile - ICS20PrecompileAddress, // ICS20 transfer precompile - VestingPrecompileAddress, // Vesting precompile - BankPrecompileAddress, // Bank precompile - GovPrecompileAddress, // Gov precompile - } - // DefaultExtraEIPs defines the default extra EIPs to be included - // On v15, EIP 3855 was enabled - DefaultExtraEIPs = []string{"ethereum_3855"} - DefaultEVMChannels = []string{ - "channel-10", // Injective - "channel-31", // Cronos - "channel-83", // Kava - } - DefaultCreateAllowlistAddresses []string - DefaultCallAllowlistAddresses []string - DefaultAccessControl = AccessControl{ - Create: AccessControlType{ - AccessType: AccessTypePermissionless, - AccessControlList: DefaultCreateAllowlistAddresses, - }, - Call: AccessControlType{ - AccessType: AccessTypePermissionless, - AccessControlList: DefaultCreateAllowlistAddresses, - }, - } -) - -// NewParams creates a new Params instance -func NewParams( - evmDenom string, - allowUnprotectedTxs bool, - config ChainConfig, - extraEIPs []string, - activeStaticPrecompiles, - evmChannels []string, - accessControl AccessControl, -) Params { - return Params{ - EvmDenom: evmDenom, - AllowUnprotectedTxs: allowUnprotectedTxs, - ExtraEIPs: extraEIPs, - ChainConfig: config, - ActiveStaticPrecompiles: activeStaticPrecompiles, - EVMChannels: evmChannels, - AccessControl: accessControl, - } -} - -// DefaultParams returns default evm parameters -func DefaultParams() Params { - return Params{ - EvmDenom: DefaultEVMDenom, - ChainConfig: DefaultChainConfig(), - ExtraEIPs: DefaultExtraEIPs, - AllowUnprotectedTxs: DefaultAllowUnprotectedTxs, - ActiveStaticPrecompiles: DefaultStaticPrecompiles, - EVMChannels: DefaultEVMChannels, - AccessControl: DefaultAccessControl, - } -} - -// validateChannels checks if channels ids are valid -func validateChannels(i interface{}) error { - channels, ok := i.([]string) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - for _, channel := range channels { - if err := host.ChannelIdentifierValidator(channel); err != nil { - return errorsmod.Wrap( - channeltypes.ErrInvalidChannelIdentifier, err.Error(), - ) - } - } - - return nil -} - -// Validate performs basic validation on evm parameters. -func (p Params) Validate() error { - if err := validateEVMDenom(p.EvmDenom); err != nil { - return err - } - - if err := validateEIPs(p.ExtraEIPs); err != nil { - return err - } - - if err := validateBool(p.AllowUnprotectedTxs); err != nil { - return err - } - - if err := validateChainConfig(p.ChainConfig); err != nil { - return err - } - - if err := ValidatePrecompiles(p.ActiveStaticPrecompiles); err != nil { - return err - } - - if err := p.AccessControl.Validate(); err != nil { - return err - } - - return validateChannels(p.EVMChannels) -} - -// EIPs returns the ExtraEIPS as a slice. -func (p Params) EIPs() []string { - eips := make([]string, len(p.ExtraEIPs)) - copy(eips, p.ExtraEIPs) - return eips -} - -// GetActiveStaticPrecompilesAddrs is a util function that the Active Precompiles -// as a slice of addresses. -func (p Params) GetActiveStaticPrecompilesAddrs() []common.Address { - precompiles := make([]common.Address, len(p.ActiveStaticPrecompiles)) - for i, precompile := range p.ActiveStaticPrecompiles { - precompiles[i] = common.HexToAddress(precompile) - } - return precompiles -} - -// IsEVMChannel returns true if the channel provided is in the list of -// EVM channels -func (p Params) IsEVMChannel(channel string) bool { - return slices.Contains(p.EVMChannels, channel) -} - -func (ac AccessControl) Validate() error { - if err := ac.Create.Validate(); err != nil { - return err - } - - if err := ac.Call.Validate(); err != nil { - return err - } - - return nil -} - -func (act AccessControlType) Validate() error { - if err := validateAccessType(act.AccessType); err != nil { - return err - } - - if err := validateAllowlistAddresses(act.AccessControlList); err != nil { - return err - } - return nil -} - -func validateAccessType(i interface{}) error { - accessType, ok := i.(AccessType) - if !ok { - return fmt.Errorf("invalid access type type: %T", i) - } - - switch accessType { - case AccessTypePermissionless, AccessTypeRestricted, AccessTypePermissioned: - return nil - default: - return fmt.Errorf("invalid access type: %s", accessType) - } -} - -func validateAllowlistAddresses(i interface{}) error { - addresses, ok := i.([]string) - if !ok { - return fmt.Errorf("invalid whitelist addresses type: %T", i) - } - - for _, address := range addresses { - if err := types.ValidateAddress(address); err != nil { - return fmt.Errorf("invalid whitelist address: %s", address) - } - } - return nil -} - -func validateEVMDenom(i interface{}) error { - denom, ok := i.(string) - if !ok { - return fmt.Errorf("invalid parameter EVM denom type: %T", i) - } - - return sdk.ValidateDenom(denom) -} - -func validateBool(i interface{}) error { - _, ok := i.(bool) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateEIPs(i interface{}) error { - eips, ok := i.([]string) - if !ok { - return fmt.Errorf("invalid EIP slice type: %T", i) - } - - uniqueEIPs := make(map[string]struct{}) - - for _, eip := range eips { - if !vm.ExistsEipActivator(eip) { - return fmt.Errorf("EIP %s is not activateable, valid EIPs are: %s", eip, vm.ActivateableEips()) - } - - if err := vm.ValidateEIPName(eip); err != nil { - return fmt.Errorf("EIP %s name is not valid", eip) - } - - if _, ok := uniqueEIPs[eip]; ok { - return fmt.Errorf("found duplicate EIP: %s", eip) - } - uniqueEIPs[eip] = struct{}{} - - } - - return nil -} - -func validateChainConfig(i interface{}) error { - cfg, ok := i.(ChainConfig) - if !ok { - return fmt.Errorf("invalid chain config type: %T", i) - } - - return cfg.Validate() -} - -// ValidatePrecompiles checks if the precompile addresses are valid and unique. -func ValidatePrecompiles(i interface{}) error { - precompiles, ok := i.([]string) - if !ok { - return fmt.Errorf("invalid precompile slice type: %T", i) - } - - seenPrecompiles := make(map[string]struct{}) - for _, precompile := range precompiles { - if _, ok := seenPrecompiles[precompile]; ok { - return fmt.Errorf("duplicate precompile %s", precompile) - } - - if err := types.ValidateAddress(precompile); err != nil { - return fmt.Errorf("invalid precompile %s", precompile) - } - - seenPrecompiles[precompile] = struct{}{} - } - - // NOTE: Check that the precompiles are sorted. This is required - // to ensure determinism - if !slices.IsSorted(precompiles) { - return fmt.Errorf("precompiles need to be sorted: %s", precompiles) - } - - return nil -} - -// IsLondon returns if london hardfork is enabled. -func IsLondon(ethConfig *params.ChainConfig, height int64) bool { - return ethConfig.IsLondon(big.NewInt(height)) -} diff --git a/legacy/evm/types/params_legacy.go b/legacy/evm/types/params_legacy.go deleted file mode 100644 index 4cf1b76..0000000 --- a/legacy/evm/types/params_legacy.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - -// Parameter keys -var ( - ParamStoreKeyEVMDenom = []byte("EVMDenom") - ParamStoreKeyEnableCreate = []byte("EnableCreate") - ParamStoreKeyEnableCall = []byte("EnableCall") - ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs") - ParamStoreKeyChainConfig = []byte("ChainConfig") - ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs") -) - -// Deprecated: ParamKeyTable returns the parameter key table. -// Usage of x/params to manage parameters is deprecated in favor of x/gov -// controlled execution of MsgUpdateParams messages. These types remain solely -// for migration purposes and will be removed in a future release. -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - -// Deprecated: ParamSetPairs returns the parameter set pairs. -// Usage of x/params to manage parameters is deprecated in favor of x/gov -// controlled execution of MsgUpdateParams messages. These types remain solely -// for migration purposes and will be removed in a future release. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom), - paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs), - paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig), - paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool), - } -} diff --git a/legacy/evm/types/params_test.go b/legacy/evm/types/params_test.go deleted file mode 100644 index 52045cf..0000000 --- a/legacy/evm/types/params_test.go +++ /dev/null @@ -1,166 +0,0 @@ -package types - -import ( - "testing" - - ethparams "github.com/ethereum/go-ethereum/params" - - "github.com/stretchr/testify/require" -) - -func TestParamsValidate(t *testing.T) { - t.Parallel() - - extraEips := []string{"ethereum_2929", "ethereum_1884", "ethereum_1344"} - testCases := []struct { - name string - params Params - expPass bool - errContains string - }{ - { - name: "default", - params: DefaultParams(), - expPass: true, - }, - { - name: "valid", - params: NewParams(DefaultEVMDenom, false, DefaultChainConfig(), extraEips, nil, nil, DefaultAccessControl), - expPass: true, - }, - { - name: "empty", - params: Params{}, - errContains: "invalid denom: ", // NOTE: this returns the first error that occurs - }, - { - name: "invalid evm denom", - params: Params{ - EvmDenom: "@!#!@$!@5^32", - }, - errContains: "invalid denom: @!#!@$!@5^32", - }, - { - name: "invalid eip", - params: Params{ - EvmDenom: DefaultEVMDenom, - ExtraEIPs: []string{"os_1000000"}, - }, - errContains: "EIP os_1000000 is not activateable, valid EIPs are", - }, - { - name: "unsorted precompiles", - params: Params{ - EvmDenom: DefaultEVMDenom, - ActiveStaticPrecompiles: []string{ - "0x0000000000000000000000000000000000000801", - "0x0000000000000000000000000000000000000800", - }, - }, - errContains: "precompiles need to be sorted", - }, - } - - for _, tc := range testCases { - tc := tc - - t.Run(tc.name, func(t *testing.T) { - t.Parallel() - - if !tc.expPass { - // NOTE: check that the necessary information is provided. Otherwise, a false - // error message could be accepted when checking for an empty string. - require.NotEmpty(t, tc.errContains, "expected test case to provide expected error message") - } - - err := tc.params.Validate() - - if tc.expPass { - require.NoError(t, err, "expected parameters to be valid") - } else { - require.Error(t, err, "expected parameters to be invalid") - require.ErrorContains(t, err, tc.errContains, "expected different error message") - } - }) - } -} - -func TestParamsEIPs(t *testing.T) { - extraEips := []string{"ethereum_2929", "ethereum_1884", "ethereum_1344"} - params := NewParams("ara", false, DefaultChainConfig(), extraEips, nil, nil, DefaultAccessControl) - actual := params.EIPs() - - require.Equal(t, []string{"ethereum_2929", "ethereum_1884", "ethereum_1344"}, actual) -} - -func TestParamsValidatePriv(t *testing.T) { - require.Error(t, validateEVMDenom(false)) - require.NoError(t, validateEVMDenom("inj")) - require.Error(t, validateBool("")) - require.NoError(t, validateBool(true)) - require.Error(t, validateEIPs("")) - require.Error(t, validateEIPs([]int64{1884})) - require.NoError(t, validateEIPs([]string{"ethereum_1884"})) - require.ErrorContains(t, validateEIPs([]string{"ethereum_1884", "ethereum_1884", "ethereum_1885"}), "duplicate EIP: ethereum_1884") - require.NoError(t, validateChannels([]string{"channel-0"})) - require.Error(t, validateChannels(false)) - require.Error(t, validateChannels(int64(123))) - require.Error(t, validateChannels("")) -} - -func TestValidateChainConfig(t *testing.T) { - testCases := []struct { - name string - i interface{} - expError bool - }{ - { - "invalid chain config type", - "string", - true, - }, - { - "valid chain config type", - DefaultChainConfig(), - false, - }, - } - for _, tc := range testCases { - err := validateChainConfig(tc.i) - - if tc.expError { - require.Error(t, err, tc.name) - } else { - require.NoError(t, err, tc.name) - } - } -} - -func TestIsLondon(t *testing.T) { - testCases := []struct { - name string - height int64 - result bool - }{ - { - "Before london block", - 5, - false, - }, - { - "After london block", - 12_965_001, - true, - }, - { - "london block", - 12_965_000, - true, - }, - } - - for _, tc := range testCases { - ethConfig := ethparams.MainnetChainConfig - require.Equal(t, IsLondon(ethConfig, tc.height), tc.result) - } -} diff --git a/legacy/evm/types/permissions.go b/legacy/evm/types/permissions.go deleted file mode 100644 index a5fbafe..0000000 --- a/legacy/evm/types/permissions.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package types - -import ( - "fmt" - "slices" - - "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v20/x/evm/core/vm" -) - -// PermissionPolicy is the interface that defines the permission policy for contract creation and calls. -// It is used to enforce access control policies on EVM operations. -// The policy is ran BEFORE the respective opcode execution every time they are called. -type PermissionPolicy interface { - // CanCreate checks if the contract creation is allowed. - CanCreate(signer, caller common.Address) bool - // CanCall checks if the any type of CALL opcode execution is allowed. This includes - // contract calls and transfers. - CanCall(signer, caller, recipient common.Address) bool - - // GetCallHook returns a CallHook that checks if the caller is allowed to perform a call. - // This is used by the EVM opcode hooks to enforce access control policies. - GetCallHook(signer common.Address) CallHook - // GetCreateHook returns a CreateHook that checks if the caller is allowed to deploy contracts. - // This is used by the EVM opcode hooks to enforce access control policies. - GetCreateHook(signer common.Address) CreateHook -} - -// RestrictedPermissionPolicy is a permission policy that restricts contract creation and calls based on a set of accessControl. -// Note that all the properties are private, this enforces the permissions not to be modified -// anywhere else within the code. -// For users that require a custom permission policy, they can implement the PermissionPolicy interface. -type RestrictedPermissionPolicy struct { - accessControl *AccessControl - canCreate callerFn - canCall callerFn -} - -func NewRestrictedPermissionPolicy(accessControl *AccessControl, signer common.Address) PermissionPolicy { - // generate create function at instantiation for signer address to be check only once - // since it remains constant - canCreate := getCanCreateFn(accessControl, signer) - canCall := getCanCallFn(accessControl, signer) - return RestrictedPermissionPolicy{ - accessControl: accessControl, - canCreate: canCreate, - canCall: canCall, - } -} - -var _ PermissionPolicy = RestrictedPermissionPolicy{} - -// GetCallHook returns a CallHook that checks if the caller is allowed to perform a call. -func (p RestrictedPermissionPolicy) GetCallHook(signer common.Address) CallHook { - return func(_ *vm.EVM, caller, recipient common.Address) error { - if p.CanCall(signer, caller, recipient) { - return nil - } - return fmt.Errorf("caller address %s does not have permission to perform a call", caller) - } -} - -// GetCreateHook returns a CreateHook that checks if the caller is allowed to deploy contracts. -func (p RestrictedPermissionPolicy) GetCreateHook(signer common.Address) CreateHook { - return func(_ *vm.EVM, caller common.Address) error { - if p.CanCreate(signer, caller) { - return nil - } - return fmt.Errorf("caller address %s does not have permission to deploy contracts", caller) - } -} - -// CanCreate implements the PermissionPolicy interface. -// It allows contract creation if access type is set to everybody. -// Otherwise, it checks if: -// - The signer is allowed to do so. -// - If the signer is not allowed, then we check if the caller is allowed to do so. -func (p RestrictedPermissionPolicy) CanCreate(_, caller common.Address) bool { - return p.canCreate(caller) -} - -type callerFn = func(caller common.Address) bool - -func getCanCreateFn(accessControl *AccessControl, signer common.Address) callerFn { - addresses := accessControl.Create.AccessControlList - - switch accessControl.Create.AccessType { - case AccessTypePermissionless: - return permissionlessCheckFn(addresses, signer) - case AccessTypeRestricted: - return func(_ common.Address) bool { return false } - case AccessTypePermissioned: - return permissionedCheckFn(addresses, signer) - } - return func(_ common.Address) bool { return false } -} - -// CanCreate implements the PermissionPolicy interface. -// It allows calls if access type is set to everybody. -// Otherwise, it checks if: -// - The signer is allowed to do so. -// - If the signer is not allowed, then we check if the caller is allowed to do so. -func (p RestrictedPermissionPolicy) CanCall(_, caller, _ common.Address) bool { - return p.canCall(caller) -} - -func getCanCallFn(accessControl *AccessControl, signer common.Address) callerFn { - addresses := accessControl.Call.AccessControlList - - switch accessControl.Call.AccessType { - case AccessTypePermissionless: - return permissionlessCheckFn(addresses, signer) - case AccessTypeRestricted: - return func(_ common.Address) bool { return false } - case AccessTypePermissioned: - return permissionedCheckFn(addresses, signer) - } - return func(_ common.Address) bool { return false } -} - -// permissionlessCheckFn returns a callerFn that returns true unless the signer or the caller is -// within the addresses slice. -func permissionlessCheckFn(addresses []string, signer common.Address) callerFn { - strSigner := signer.String() - isSignerBlocked := !slices.Contains(addresses, strSigner) - return func(caller common.Address) bool { - strCaller := caller.String() - return isSignerBlocked && !slices.Contains(addresses, strCaller) - } -} - -// permissionedCheckFn returns a callerFn that returns true if the signer or caller -// is within the addresses slice. -func permissionedCheckFn(addresses []string, signer common.Address) callerFn { - strSigner := signer.String() - isSignerAllowed := slices.Contains(addresses, strSigner) - return func(caller common.Address) bool { - strCaller := caller.String() - return isSignerAllowed || slices.Contains(addresses, strCaller) - } -} diff --git a/legacy/evm/types/permissions_test.go b/legacy/evm/types/permissions_test.go deleted file mode 100644 index f79b7a2..0000000 --- a/legacy/evm/types/permissions_test.go +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package types_test - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - testkeyring "github.com/evmos/evmos/v20/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v20/x/evm/types" - "github.com/stretchr/testify/suite" -) - -type UnitTestSuite struct { - suite.Suite -} - -func TestPermissionsSuite(t *testing.T) { - suite.Run(t, new(UnitTestSuite)) -} - -func (suite *UnitTestSuite) TestAccessControl() { - keyring := testkeyring.New(2) - - testCases := []struct { - name string - getAccessControl func() types.AccessControl - canCall bool - canCreate bool - signer common.Address - caller common.Address - recipient common.Address - }{ - { - name: "should allow call and create with default accessControl", - getAccessControl: func() types.AccessControl { - return types.DefaultParams().AccessControl - }, - canCall: true, - canCreate: true, - signer: keyring.GetAddr(0), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(0), - }, - { - name: "should not allow call and create with nobody accessControl", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Create.AccessType = types.AccessTypeRestricted - p.Call.AccessType = types.AccessTypeRestricted - return p - }, - canCall: false, - canCreate: false, - signer: keyring.GetAddr(0), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(0), - }, - { - name: "should not allow call with permissionless policy and signer in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Call.AccessType = types.AccessTypePermissionless - p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} - return p - }, - canCall: false, - canCreate: true, - signer: keyring.GetAddr(0), - caller: keyring.GetAddr(1), - recipient: keyring.GetAddr(1), - }, - { - name: "should not allow call with permissionless policy and signer not in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Call.AccessType = types.AccessTypePermissionless - p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} - return p - }, - canCall: false, - canCreate: true, - signer: keyring.GetAddr(1), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(1), - }, - { - name: "should allow call with permissionless policy while caller nor signer are in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Call.AccessType = types.AccessTypePermissionless - p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} - return p - }, - canCall: true, - canCreate: true, - signer: keyring.GetAddr(1), - caller: keyring.GetAddr(1), - recipient: keyring.GetAddr(1), - }, - { - name: "should allow call with permissionless policy and caller not in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Call.AccessType = types.AccessTypePermissionless - p.Call.AccessControlList = []string{keyring.GetAddr(1).String()} - return p - }, - canCall: false, - canCreate: true, - signer: keyring.GetAddr(1), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(1), - }, - { - name: "should not allow create with permissionless policy and signer in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Create.AccessType = types.AccessTypePermissionless - p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} - return p - }, - canCall: true, - canCreate: false, - signer: keyring.GetAddr(0), - caller: keyring.GetAddr(1), - recipient: keyring.GetAddr(1), - }, - { - name: "should not allow create with permissionless policy and signer not in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Create.AccessType = types.AccessTypePermissionless - p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} - return p - }, - canCall: true, - canCreate: false, - signer: keyring.GetAddr(1), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(1), - }, - { - name: "should allow create with permissionless policy while caller nor signer are in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Create.AccessType = types.AccessTypePermissionless - p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} - return p - }, - canCall: true, - canCreate: true, - signer: keyring.GetAddr(1), - caller: keyring.GetAddr(1), - recipient: keyring.GetAddr(1), - }, - { - name: "should allow create with permissionless policy and caller not in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Create.AccessType = types.AccessTypePermissionless - p.Create.AccessControlList = []string{keyring.GetAddr(1).String()} - return p - }, - canCall: true, - canCreate: false, - signer: keyring.GetAddr(1), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(1), - }, - { - name: "should not allow call with permissioned policy and not in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Call.AccessType = types.AccessTypePermissioned - p.Call.AccessControlList = []string{keyring.GetAddr(1).String()} - return p - }, - canCall: false, - canCreate: true, - signer: keyring.GetAddr(0), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(0), - }, - { - name: "should not allow create with permissioned policy and not in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Create.AccessType = types.AccessTypePermissioned - p.Create.AccessControlList = []string{keyring.GetAddr(1).String()} - return p - }, - canCall: true, - canCreate: false, - signer: keyring.GetAddr(0), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(0), - }, - { - name: "should allow call and create with permissioned policy and address in AccessControlList", - getAccessControl: func() types.AccessControl { - p := types.DefaultParams().AccessControl - p.Create.AccessType = types.AccessTypePermissioned - p.Create.AccessControlList = []string{keyring.GetAddr(0).String()} - p.Call.AccessType = types.AccessTypePermissioned - p.Call.AccessControlList = []string{keyring.GetAddr(0).String()} - return p - }, - canCall: true, - canCreate: true, - signer: keyring.GetAddr(0), - caller: keyring.GetAddr(0), - recipient: keyring.GetAddr(0), - }, - } - - for _, tc := range testCases { - suite.Run(tc.name, func() { - accessControl := tc.getAccessControl() - permissionPolicy := types.NewRestrictedPermissionPolicy( - &accessControl, - tc.signer, - ) - - canCreate := permissionPolicy.CanCreate(tc.signer, tc.caller) - suite.Require().Equal(tc.canCreate, canCreate, "expected %v, got %v", tc.canCreate, canCreate) - - canCall := permissionPolicy.CanCall(tc.signer, tc.caller, tc.recipient) - suite.Require().Equal(tc.canCall, canCall, "expected %v, got %v", tc.canCall, canCall) - }) - } -} diff --git a/legacy/evm/types/precompiles.go b/legacy/evm/types/precompiles.go deleted file mode 100644 index 27e838d..0000000 --- a/legacy/evm/types/precompiles.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package types - -const ( - P256PrecompileAddress = "0x0000000000000000000000000000000000000100" - Bech32PrecompileAddress = "0x0000000000000000000000000000000000000400" -) - -const ( - StakingPrecompileAddress = "0x0000000000000000000000000000000000000800" - DistributionPrecompileAddress = "0x0000000000000000000000000000000000000801" - ICS20PrecompileAddress = "0x0000000000000000000000000000000000000802" - VestingPrecompileAddress = "0x0000000000000000000000000000000000000803" - BankPrecompileAddress = "0x0000000000000000000000000000000000000804" - GovPrecompileAddress = "0x0000000000000000000000000000000000000805" -) - -// AvailableStaticPrecompiles defines the full list of all available EVM extension addresses. -// -// NOTE: To be explicit, this list does not include the dynamically registered EVM extensions -// like the ERC-20 extensions. -var AvailableStaticPrecompiles = []string{ - P256PrecompileAddress, - Bech32PrecompileAddress, - StakingPrecompileAddress, - DistributionPrecompileAddress, - ICS20PrecompileAddress, - VestingPrecompileAddress, - BankPrecompileAddress, - GovPrecompileAddress, -} diff --git a/legacy/evm/types/query.go b/legacy/evm/types/query.go deleted file mode 100644 index 7fb4b0e..0000000 --- a/legacy/evm/types/query.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - codectypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - for _, msg := range m.Predecessors { - if err := msg.UnpackInterfaces(unpacker); err != nil { - return err - } - } - return m.Msg.UnpackInterfaces(unpacker) -} - -func (m QueryTraceBlockRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - for _, msg := range m.Txs { - if err := msg.UnpackInterfaces(unpacker); err != nil { - return err - } - } - return nil -} - -// Failed returns if the contract execution failed in vm errors -func (egr EstimateGasResponse) Failed() bool { - return len(egr.VmError) > 0 -} diff --git a/legacy/evm/types/storage.go b/legacy/evm/types/storage.go index 730c157..51650ee 100644 --- a/legacy/evm/types/storage.go +++ b/legacy/evm/types/storage.go @@ -4,22 +4,20 @@ package types import ( "fmt" - "strings" - errorsmod "cosmossdk.io/errors" "github.com/ethereum/go-ethereum/common" ) // Storage represents the account Storage map as a slice of single key value -// State pairs. This is to prevent non determinism at genesis initialization or export. +// State pairs. This is to prevent non-determinism at genesis initialization or export. type Storage []State // Validate performs a basic validation of the Storage fields. func (s Storage) Validate() error { seenStorage := make(map[string]bool) - for i, state := range s { + for _, state := range s { if seenStorage[state.Key] { - return errorsmod.Wrapf(ErrInvalidState, "duplicate state key %d: %s", i, state.Key) + return nil } if err := state.Validate(); err != nil { @@ -52,10 +50,6 @@ func (s Storage) Copy() Storage { // Validate performs a basic validation of the State fields. // NOTE: state value can be empty func (s State) Validate() error { - if strings.TrimSpace(s.Key) == "" { - return errorsmod.Wrap(ErrInvalidState, "state key hash cannot be blank") - } - return nil } diff --git a/legacy/evm/types/storage_test.go b/legacy/evm/types/storage_test.go deleted file mode 100644 index 515f2a8..0000000 --- a/legacy/evm/types/storage_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package types - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/require" -) - -func TestStorageValidate(t *testing.T) { - testCases := []struct { - name string - storage Storage - expPass bool - }{ - { - "valid storage", - Storage{ - NewState(common.BytesToHash([]byte{1, 2, 3}), common.BytesToHash([]byte{1, 2, 3})), - }, - true, - }, - { - "empty storage key bytes", - Storage{ - {Key: ""}, - }, - false, - }, - { - "duplicated storage key", - Storage{ - {Key: common.BytesToHash([]byte{1, 2, 3}).String()}, - {Key: common.BytesToHash([]byte{1, 2, 3}).String()}, - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - err := tc.storage.Validate() - if tc.expPass { - require.NoError(t, err, tc.name) - } else { - require.Error(t, err, tc.name) - } - } -} - -func TestStorageCopy(t *testing.T) { - testCases := []struct { - name string - storage Storage - }{ - { - "single storage", - Storage{ - NewState(common.BytesToHash([]byte{1, 2, 3}), common.BytesToHash([]byte{1, 2, 3})), - }, - }, - { - "empty storage key value bytes", - Storage{ - {Key: common.Hash{}.String(), Value: common.Hash{}.String()}, - }, - }, - { - "empty storage", - Storage{}, - }, - } - - for _, tc := range testCases { - tc := tc - require.Equal(t, tc.storage, tc.storage.Copy(), tc.name) - } -} - -func TestStorageString(t *testing.T) { - storage := Storage{NewState(common.BytesToHash([]byte("key")), common.BytesToHash([]byte("value")))} - str := "key:\"0x00000000000000000000000000000000000000000000000000000000006b6579\" value:\"0x00000000000000000000000000000000000000000000000000000076616c7565\" \n" - require.Equal(t, str, storage.String()) -} diff --git a/legacy/evm/types/testdata/SimpleContractHardhat.json b/legacy/evm/types/testdata/SimpleContractHardhat.json deleted file mode 100644 index bb65878..0000000 --- a/legacy/evm/types/testdata/SimpleContractHardhat.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SimpleContract", - "sourceName": "contracts/SimpleContract.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "setValue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "value", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610133806100206000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80633fa4f24514603757806355241077146051575b600080fd5b603d6069565b604051604891906090565b60405180910390f35b606760048036038101906063919060d5565b606f565b005b60005481565b8060008190555050565b6000819050919050565b608a816079565b82525050565b600060208201905060a360008301846083565b92915050565b600080fd5b60b5816079565b811460bf57600080fd5b50565b60008135905060cf8160ae565b92915050565b60006020828403121560e85760e760a9565b5b600060f48482850160c2565b9150509291505056fea2646970667358221220c9305ac8499dab6bde1cc24810af134727f1640c623f14bce015f6812a73762764736f6c63430008130033", - "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c80633fa4f24514603757806355241077146051575b600080fd5b603d6069565b604051604891906090565b60405180910390f35b606760048036038101906063919060d5565b606f565b005b60005481565b8060008190555050565b6000819050919050565b608a816079565b82525050565b600060208201905060a360008301846083565b92915050565b600080fd5b60b5816079565b811460bf57600080fd5b50565b60008135905060cf8160ae565b92915050565b60006020828403121560e85760e760a9565b5b600060f48482850160c2565b9150509291505056fea2646970667358221220c9305ac8499dab6bde1cc24810af134727f1640c623f14bce015f6812a73762764736f6c63430008130033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/legacy/evm/types/tracer.go b/legacy/evm/types/tracer.go deleted file mode 100644 index 9bcc678..0000000 --- a/legacy/evm/types/tracer.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math/big" - "os" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v20/x/evm/core/logger" - "github.com/evmos/evmos/v20/x/evm/core/vm" -) - -const ( - TracerAccessList = "access_list" - TracerJSON = "json" - TracerStruct = "struct" - TracerMarkdown = "markdown" -) - -// NewTracer creates a new Logger tracer to collect execution traces from an -// EVM transaction. -func NewTracer(tracer string, msg core.Message, cfg *params.ChainConfig, height int64) vm.EVMLogger { - // TODO: enable additional log configuration - logCfg := &logger.Config{ - Debug: true, - } - - switch tracer { - case TracerAccessList: - preCompiles := vm.DefaultActivePrecompiles(cfg.Rules(big.NewInt(height), cfg.MergeNetsplitBlock != nil)) - return logger.NewAccessListTracer(msg.AccessList(), msg.From(), *msg.To(), preCompiles) - case TracerJSON: - return logger.NewJSONLogger(logCfg, os.Stderr) - case TracerMarkdown: - return logger.NewMarkdownLogger(logCfg, os.Stdout) // TODO: Stderr ? - case TracerStruct: - return logger.NewStructLogger(logCfg) - default: - return NewNoOpTracer() - } -} - -// TxTraceResult is the result of a single transaction trace during a block trace. -type TxTraceResult struct { - Result interface{} `json:"result,omitempty"` // Trace results produced by the tracer - Error string `json:"error,omitempty"` // Trace failure produced by the tracer -} - -var _ vm.EVMLogger = &NoOpTracer{} - -// NoOpTracer is an empty implementation of vm.Tracer interface -type NoOpTracer struct{} - -// NewNoOpTracer creates a no-op vm.Tracer -func NewNoOpTracer() *NoOpTracer { - return &NoOpTracer{} -} - -// CaptureStart implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureStart(env *vm.EVM, - from common.Address, - to common.Address, - create bool, - input []byte, - gas uint64, - value *big.Int) { -} - -// CaptureState implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { -} - -// CaptureFault implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { -} - -// CaptureEnd implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, err error) {} - -// CaptureEnter implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -// CaptureExit implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} - -// CaptureTxStart implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureTxStart(gasLimit uint64) {} - -// CaptureTxEnd implements vm.Tracer interface -// -//nolint:revive // allow unused parameters to indicate expected signature -func (dt NoOpTracer) CaptureTxEnd(restGas uint64) {} diff --git a/legacy/evm/types/tracer_test.go b/legacy/evm/types/tracer_test.go deleted file mode 100644 index 6e21f93..0000000 --- a/legacy/evm/types/tracer_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestNewNoOpTracer(t *testing.T) { - require.Equal(t, &NoOpTracer{}, NewNoOpTracer()) -} diff --git a/legacy/evm/types/tx.go b/legacy/evm/types/tx.go deleted file mode 100644 index f2fbbe2..0000000 --- a/legacy/evm/types/tx.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math" - "math/big" - - ethtypes "github.com/ethereum/go-ethereum/core/types" - - "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v20/x/evm/core/vm" -) - -// EvmTxArgs encapsulates all possible params to create all EVM txs types. -// This includes LegacyTx, DynamicFeeTx and AccessListTx -type EvmTxArgs struct { - Nonce uint64 - GasLimit uint64 - Input []byte - GasFeeCap *big.Int - GasPrice *big.Int - ChainID *big.Int - Amount *big.Int - GasTipCap *big.Int - To *common.Address - Accesses *ethtypes.AccessList -} - -// ToTxData converts the EvmTxArgs to TxData -func (args *EvmTxArgs) ToTxData() (TxData, error) { - ethTx := NewTx(args).AsTransaction() - return NewTxDataFromTx(ethTx) -} - -// GetTxPriority returns the priority of a given Ethereum tx. It relies of the -// priority reduction global variable to calculate the tx priority given the tx -// tip price: -// -// tx_priority = tip_price / priority_reduction -func GetTxPriority(txData TxData, baseFee *big.Int) (priority int64) { - // calculate priority based on effective gas price - tipPrice := txData.EffectiveGasPrice(baseFee) - // if london hardfork is not enabled, tipPrice is the gasPrice - if baseFee != nil { - tipPrice = new(big.Int).Sub(tipPrice, baseFee) - } - - priority = math.MaxInt64 - priorityBig := new(big.Int).Quo(tipPrice, DefaultPriorityReduction.BigInt()) - - // safety check - if priorityBig.IsInt64() { - priority = priorityBig.Int64() - } - - return priority -} - -// Failed returns if the contract execution failed in vm errors -func (m *MsgEthereumTxResponse) Failed() bool { - return len(m.VmError) > 0 -} - -// Return is a helper function to help caller distinguish between revert reason -// and function return. Return returns the data after execution if no error occurs. -func (m *MsgEthereumTxResponse) Return() []byte { - if m.Failed() { - return nil - } - return common.CopyBytes(m.Ret) -} - -// Revert returns the concrete revert reason if the execution is aborted by `REVERT` -// opcode. Note the reason can be nil if no data supplied with revert opcode. -func (m *MsgEthereumTxResponse) Revert() []byte { - if m.VmError != vm.ErrExecutionReverted.Error() { - return nil - } - return common.CopyBytes(m.Ret) -} diff --git a/legacy/evm/types/tx_args.go b/legacy/evm/types/tx_args.go deleted file mode 100644 index 11f66e6..0000000 --- a/legacy/evm/types/tx_args.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "errors" - "fmt" - "math/big" - - sdkmath "cosmossdk.io/math" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - ethtypes "github.com/ethereum/go-ethereum/core/types" -) - -// TransactionArgs represents the arguments to construct a new transaction -// or a message call using JSON-RPC. -// Duplicate struct definition since geth struct is in internal package -// Ref: https://github.com/ethereum/go-ethereum/blob/release/1.10.4/internal/ethapi/transaction_args.go#L36 -type TransactionArgs struct { - From *common.Address `json:"from"` - To *common.Address `json:"to"` - Gas *hexutil.Uint64 `json:"gas"` - GasPrice *hexutil.Big `json:"gasPrice"` - MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"` - MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"` - Value *hexutil.Big `json:"value"` - Nonce *hexutil.Uint64 `json:"nonce"` - - // We accept "data" and "input" for backwards-compatibility reasons. - // "input" is the newer name and should be preferred by clients. - // Issue detail: https://github.com/ethereum/go-ethereum/issues/15628 - Data *hexutil.Bytes `json:"data"` - Input *hexutil.Bytes `json:"input"` - - // Introduced by AccessListTxType transaction. - AccessList *ethtypes.AccessList `json:"accessList,omitempty"` - ChainID *hexutil.Big `json:"chainId,omitempty"` -} - -// String return the struct in a string format -func (args *TransactionArgs) String() string { - // Todo: There is currently a bug with hexutil.Big when the value its nil, printing would trigger an exception - return fmt.Sprintf("TransactionArgs{From:%v, To:%v, Gas:%v,"+ - " Nonce:%v, Data:%v, Input:%v, AccessList:%v}", - args.From, - args.To, - args.Gas, - args.Nonce, - args.Data, - args.Input, - args.AccessList) -} - -// ToTransaction converts the arguments to an ethereum transaction. -// This assumes that setTxDefaults has been called. -func (args *TransactionArgs) ToTransaction() *MsgEthereumTx { - var ( - chainID, value, gasPrice, maxFeePerGas, maxPriorityFeePerGas sdkmath.Int - gas, nonce uint64 - from, to string - ) - - // Set sender address or use zero address if none specified. - if args.ChainID != nil { - chainID = sdkmath.NewIntFromBigInt(args.ChainID.ToInt()) - } - - if args.Nonce != nil { - nonce = uint64(*args.Nonce) - } - - if args.Gas != nil { - gas = uint64(*args.Gas) - } - - if args.GasPrice != nil { - gasPrice = sdkmath.NewIntFromBigInt(args.GasPrice.ToInt()) - } - - if args.MaxFeePerGas != nil { - maxFeePerGas = sdkmath.NewIntFromBigInt(args.MaxFeePerGas.ToInt()) - } - - if args.MaxPriorityFeePerGas != nil { - maxPriorityFeePerGas = sdkmath.NewIntFromBigInt(args.MaxPriorityFeePerGas.ToInt()) - } - - if args.Value != nil { - value = sdkmath.NewIntFromBigInt(args.Value.ToInt()) - } - - if args.To != nil { - to = args.To.Hex() - } - - var data TxData - switch { - case args.MaxFeePerGas != nil: - al := AccessList{} - if args.AccessList != nil { - al = NewAccessList(args.AccessList) - } - - data = &DynamicFeeTx{ - To: to, - ChainID: &chainID, - Nonce: nonce, - GasLimit: gas, - GasFeeCap: &maxFeePerGas, - GasTipCap: &maxPriorityFeePerGas, - Amount: &value, - Data: args.GetData(), - Accesses: al, - } - case args.AccessList != nil: - data = &AccessListTx{ - To: to, - ChainID: &chainID, - Nonce: nonce, - GasLimit: gas, - GasPrice: &gasPrice, - Amount: &value, - Data: args.GetData(), - Accesses: NewAccessList(args.AccessList), - } - default: - data = &LegacyTx{ - To: to, - Nonce: nonce, - GasLimit: gas, - GasPrice: &gasPrice, - Amount: &value, - Data: args.GetData(), - } - } - - anyData, err := PackTxData(data) - if err != nil { - return nil - } - - if args.From != nil { - from = args.From.Hex() - } - - msg := MsgEthereumTx{ - Data: anyData, - From: from, - } - msg.Hash = msg.AsTransaction().Hash().Hex() - return &msg -} - -// ToMessage converts the arguments to the Message type used by the core evm. -// This assumes that setTxDefaults has been called. -func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (ethtypes.Message, error) { - // Reject invalid combinations of pre- and post-1559 fee styles - if args.GasPrice != nil && (args.MaxFeePerGas != nil || args.MaxPriorityFeePerGas != nil) { - return ethtypes.Message{}, errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified") - } - - // Set sender address or use zero address if none specified. - addr := args.GetFrom() - - // Set default gas & gas price if none were set - gas := globalGasCap - if gas == 0 { - gas = uint64(math.MaxUint64 / 2) - } - if args.Gas != nil { - gas = uint64(*args.Gas) - } - if globalGasCap != 0 && globalGasCap < gas { - gas = globalGasCap - } - var ( - gasPrice *big.Int - gasFeeCap *big.Int - gasTipCap *big.Int - ) - if baseFee == nil { - // If there's no basefee, then it must be a non-1559 execution - gasPrice = new(big.Int) - if args.GasPrice != nil { - gasPrice = args.GasPrice.ToInt() - } - gasFeeCap, gasTipCap = gasPrice, gasPrice - } else { - // A basefee is provided, necessitating 1559-type execution - if args.GasPrice != nil { - // User specified the legacy gas field, convert to 1559 gas typing - gasPrice = args.GasPrice.ToInt() - gasFeeCap, gasTipCap = gasPrice, gasPrice - } else { - // User specified 1559 gas feilds (or none), use those - gasFeeCap = new(big.Int) - if args.MaxFeePerGas != nil { - gasFeeCap = args.MaxFeePerGas.ToInt() - } - gasTipCap = new(big.Int) - if args.MaxPriorityFeePerGas != nil { - gasTipCap = args.MaxPriorityFeePerGas.ToInt() - } - // Backfill the legacy gasPrice for EVM execution, unless we're all zeroes - gasPrice = new(big.Int) - if gasFeeCap.BitLen() > 0 || gasTipCap.BitLen() > 0 { - gasPrice = math.BigMin(new(big.Int).Add(gasTipCap, baseFee), gasFeeCap) - } - } - } - value := new(big.Int) - if args.Value != nil { - value = args.Value.ToInt() - } - data := args.GetData() - var accessList ethtypes.AccessList - if args.AccessList != nil { - accessList = *args.AccessList - } - - nonce := uint64(0) - if args.Nonce != nil { - nonce = uint64(*args.Nonce) - } - - msg := ethtypes.NewMessage(addr, args.To, nonce, value, gas, gasPrice, gasFeeCap, gasTipCap, data, accessList, true) - return msg, nil -} - -// GetFrom retrieves the transaction sender address. -func (args *TransactionArgs) GetFrom() common.Address { - if args.From == nil { - return common.Address{} - } - return *args.From -} - -// GetData retrieves the transaction calldata. Input field is preferred. -func (args *TransactionArgs) GetData() []byte { - if args.Input != nil { - return *args.Input - } - if args.Data != nil { - return *args.Data - } - return nil -} diff --git a/legacy/evm/types/tx_args_test.go b/legacy/evm/types/tx_args_test.go deleted file mode 100644 index 4f61fba..0000000 --- a/legacy/evm/types/tx_args_test.go +++ /dev/null @@ -1,289 +0,0 @@ -package types_test - -import ( - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - - "github.com/evmos/evmos/v20/x/evm/types" -) - -func (suite *TxDataTestSuite) TestTxArgsString() { - testCases := []struct { - name string - txArgs types.TransactionArgs - expectedString string - }{ - { - "empty tx args", - types.TransactionArgs{}, - "TransactionArgs{From:, To:, Gas:, Nonce:, Data:, Input:, AccessList:}", - }, - { - "tx args with fields", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - Nonce: &suite.hexUint64, - Input: &suite.hexInputBytes, - Data: &suite.hexDataBytes, - AccessList: ðtypes.AccessList{}, - }, - fmt.Sprintf("TransactionArgs{From:%v, To:%v, Gas:%v, Nonce:%v, Data:%v, Input:%v, AccessList:%v}", - &suite.addr, - &suite.addr, - &suite.hexUint64, - &suite.hexUint64, - &suite.hexDataBytes, - &suite.hexInputBytes, - ðtypes.AccessList{}), - }, - } - for _, tc := range testCases { - outputString := tc.txArgs.String() - suite.Require().Equal(outputString, tc.expectedString) - } -} - -func (suite *TxDataTestSuite) TestConvertTxArgsEthTx() { - testCases := []struct { - name string - txArgs types.TransactionArgs - }{ - { - "empty tx args", - types.TransactionArgs{}, - }, - { - "no nil args", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - GasPrice: &suite.hexBigInt, - MaxFeePerGas: &suite.hexBigInt, - MaxPriorityFeePerGas: &suite.hexBigInt, - Value: &suite.hexBigInt, - Nonce: &suite.hexUint64, - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - ChainID: &suite.hexBigInt, - }, - }, - { - "max fee per gas nil, but access list not nil", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - GasPrice: &suite.hexBigInt, - MaxFeePerGas: nil, - MaxPriorityFeePerGas: &suite.hexBigInt, - Value: &suite.hexBigInt, - Nonce: &suite.hexUint64, - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - ChainID: &suite.hexBigInt, - }, - }, - } - for _, tc := range testCases { - res := tc.txArgs.ToTransaction() - suite.Require().NotNil(res) - } -} - -func (suite *TxDataTestSuite) TestToMessageEVM() { - testCases := []struct { - name string - txArgs types.TransactionArgs - globalGasCap uint64 - baseFee *big.Int - expError bool - }{ - { - "empty tx args", - types.TransactionArgs{}, - uint64(0), - nil, - false, - }, - { - "specify gasPrice and (maxFeePerGas or maxPriorityFeePerGas)", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - GasPrice: &suite.hexBigInt, - MaxFeePerGas: &suite.hexBigInt, - MaxPriorityFeePerGas: &suite.hexBigInt, - Value: &suite.hexBigInt, - Nonce: &suite.hexUint64, - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - ChainID: &suite.hexBigInt, - }, - uint64(0), - nil, - true, - }, - { - "non-1559 execution, zero gas cap", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - GasPrice: &suite.hexBigInt, - MaxFeePerGas: nil, - MaxPriorityFeePerGas: nil, - Value: &suite.hexBigInt, - Nonce: &suite.hexUint64, - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - ChainID: &suite.hexBigInt, - }, - uint64(0), - nil, - false, - }, - { - "non-1559 execution, nonzero gas cap", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - GasPrice: &suite.hexBigInt, - MaxFeePerGas: nil, - MaxPriorityFeePerGas: nil, - Value: &suite.hexBigInt, - Nonce: &suite.hexUint64, - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - ChainID: &suite.hexBigInt, - }, - uint64(1), - nil, - false, - }, - { - "1559-type execution, nil gas price", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - GasPrice: nil, - MaxFeePerGas: &suite.hexBigInt, - MaxPriorityFeePerGas: &suite.hexBigInt, - Value: &suite.hexBigInt, - Nonce: &suite.hexUint64, - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - ChainID: &suite.hexBigInt, - }, - uint64(1), - suite.bigInt, - false, - }, - { - "1559-type execution, non-nil gas price", - types.TransactionArgs{ - From: &suite.addr, - To: &suite.addr, - Gas: &suite.hexUint64, - GasPrice: &suite.hexBigInt, - MaxFeePerGas: nil, - MaxPriorityFeePerGas: nil, - Value: &suite.hexBigInt, - Nonce: &suite.hexUint64, - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - AccessList: ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, - ChainID: &suite.hexBigInt, - }, - uint64(1), - suite.bigInt, - false, - }, - } - for _, tc := range testCases { - res, err := tc.txArgs.ToMessage(tc.globalGasCap, tc.baseFee) - - if tc.expError { - suite.Require().NotNil(err) - } else { - suite.Require().Nil(err) - suite.Require().NotNil(res) - } - } -} - -func (suite *TxDataTestSuite) TestGetFrom() { - testCases := []struct { - name string - txArgs types.TransactionArgs - expAddress common.Address - }{ - { - "empty from field", - types.TransactionArgs{}, - common.Address{}, - }, - { - "non-empty from field", - types.TransactionArgs{ - From: &suite.addr, - }, - suite.addr, - }, - } - for _, tc := range testCases { - retrievedAddress := tc.txArgs.GetFrom() - suite.Require().Equal(retrievedAddress, tc.expAddress) - } -} - -func (suite *TxDataTestSuite) TestGetData() { - testCases := []struct { - name string - txArgs types.TransactionArgs - expectedOutput []byte - }{ - { - "empty input and data fields", - types.TransactionArgs{ - Data: nil, - Input: nil, - }, - nil, - }, - { - "empty input field, non-empty data field", - types.TransactionArgs{ - Data: &suite.hexDataBytes, - Input: nil, - }, - []byte("data"), - }, - { - "non-empty input and data fields", - types.TransactionArgs{ - Data: &suite.hexDataBytes, - Input: &suite.hexInputBytes, - }, - []byte("input"), - }, - } - for _, tc := range testCases { - retrievedData := tc.txArgs.GetData() - suite.Require().Equal(retrievedData, tc.expectedOutput) - } -} diff --git a/legacy/evm/types/tx_data.go b/legacy/evm/types/tx_data.go deleted file mode 100644 index 189b49f..0000000 --- a/legacy/evm/types/tx_data.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" -) - -var ( - _ TxData = &LegacyTx{} - _ TxData = &AccessListTx{} - _ TxData = &DynamicFeeTx{} -) - -// TxData implements the Ethereum transaction tx structure. It is used -// solely as intended in Ethereum abiding by the protocol. -type TxData interface { - // TODO: embed ethtypes.TxData. See https://github.com/ethereum/go-ethereum/issues/23154 - - TxType() byte - Copy() TxData - GetChainID() *big.Int - GetAccessList() ethtypes.AccessList - GetData() []byte - GetNonce() uint64 - GetGas() uint64 - GetGasPrice() *big.Int - GetGasTipCap() *big.Int - GetGasFeeCap() *big.Int - GetValue() *big.Int - GetTo() *common.Address - - GetRawSignatureValues() (v, r, s *big.Int) - SetSignatureValues(chainID, v, r, s *big.Int) - - AsEthereumData() ethtypes.TxData - Validate() error - - // static fee - Fee() *big.Int - Cost() *big.Int - - // effective gasPrice/fee/cost according to current base fee - EffectiveGasPrice(baseFee *big.Int) *big.Int - EffectiveFee(baseFee *big.Int) *big.Int - EffectiveCost(baseFee *big.Int) *big.Int -} - -// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the -// AllowUnprotectedTxs parameter is disabled. -func NewTxDataFromTx(tx *ethtypes.Transaction) (TxData, error) { - var txData TxData - var err error - switch tx.Type() { - case ethtypes.DynamicFeeTxType: - txData, err = NewDynamicFeeTx(tx) - case ethtypes.AccessListTxType: - txData, err = newAccessListTx(tx) - default: - txData, err = NewLegacyTx(tx) - } - if err != nil { - return nil, err - } - - return txData, nil -} - -func fee(gasPrice *big.Int, gas uint64) *big.Int { - gasLimit := new(big.Int).SetUint64(gas) - return new(big.Int).Mul(gasPrice, gasLimit) -} - -func cost(fee, value *big.Int) *big.Int { - if value != nil { - return new(big.Int).Add(fee, value) - } - return fee -} diff --git a/legacy/evm/types/tx_data_test.go b/legacy/evm/types/tx_data_test.go deleted file mode 100644 index 99b9b0c..0000000 --- a/legacy/evm/types/tx_data_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package types - -import ( - "math/big" - "testing" - - sdkmath "cosmossdk.io/math" - ethutils "github.com/evmos/evmos/v20/utils/eth" - "github.com/stretchr/testify/require" -) - -func TestTxData_chainID(t *testing.T) { - chainID := sdkmath.NewInt(1) - - testCases := []struct { - msg string - data TxData - expChainID *big.Int - }{ - { - "access list tx", &AccessListTx{Accesses: AccessList{}, ChainID: &chainID}, big.NewInt(1), - }, - { - "access list tx, nil chain ID", &AccessListTx{Accesses: AccessList{}}, nil, - }, - { - "legacy tx, derived", &LegacyTx{}, nil, - }, - } - - for _, tc := range testCases { - chainID := tc.data.GetChainID() - require.Equal(t, chainID, tc.expChainID, tc.msg) - } -} - -func TestTxData_DeriveChainID(t *testing.T) { - bitLen64, ok := new(big.Int).SetString("0x8000000000000000", 0) - require.True(t, ok) - - bitLen80, ok := new(big.Int).SetString("0x80000000000000000000", 0) - require.True(t, ok) - - expBitLen80, ok := new(big.Int).SetString("302231454903657293676526", 0) - require.True(t, ok) - - testCases := []struct { - msg string - data TxData - expChainID *big.Int - }{ - { - "v = -1", &LegacyTx{V: big.NewInt(-1).Bytes()}, nil, - }, - { - "v = 0", &LegacyTx{V: big.NewInt(0).Bytes()}, nil, - }, - { - "v = 1", &LegacyTx{V: big.NewInt(1).Bytes()}, nil, - }, - { - "v = 27", &LegacyTx{V: big.NewInt(27).Bytes()}, new(big.Int), - }, - { - "v = 28", &LegacyTx{V: big.NewInt(28).Bytes()}, new(big.Int), - }, - { - "Ethereum mainnet", &LegacyTx{V: big.NewInt(37).Bytes()}, big.NewInt(1), - }, - { - "chain ID 9000", &LegacyTx{V: big.NewInt(18035).Bytes()}, big.NewInt(9000), - }, - { - "bit len 64", &LegacyTx{V: bitLen64.Bytes()}, big.NewInt(4611686018427387886), - }, - { - "bit len 80", &LegacyTx{V: bitLen80.Bytes()}, expBitLen80, - }, - { - "v = nil ", &LegacyTx{V: nil}, nil, - }, - } - - for _, tc := range testCases { - v, _, _ := tc.data.GetRawSignatureValues() - - chainID := ethutils.DeriveChainID(v) - require.Equal(t, tc.expChainID, chainID, tc.msg) - } -} diff --git a/legacy/evm/types/tx_types.go b/legacy/evm/types/tx_types.go deleted file mode 100644 index f1debce..0000000 --- a/legacy/evm/types/tx_types.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - gethtypes "github.com/ethereum/go-ethereum/core/types" -) - -func GetTxTypeName(txType int) string { - switch txType { - case gethtypes.DynamicFeeTxType: - return "DynamicFeeTxType" - case gethtypes.LegacyTxType: - return "LegacyTxType" - case gethtypes.AccessListTxType: - return "AccessListTxType" - default: - panic("unknown tx type") - } -} diff --git a/legacy/evm/types/utils.go b/legacy/evm/types/utils.go deleted file mode 100644 index 5d27b90..0000000 --- a/legacy/evm/types/utils.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package types - -import ( - "fmt" - "math/big" - - "github.com/cosmos/gogoproto/proto" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" -) - -// DefaultPriorityReduction is the default amount of price values required for 1 unit of priority. -// Because priority is `int64` while price is `big.Int`, it's necessary to scale down the range to keep it more pratical. -// The default value is the same as the `sdk.DefaultPowerReduction`. -var DefaultPriorityReduction = sdk.DefaultPowerReduction - -var EmptyCodeHash = crypto.Keccak256(nil) - -// DecodeTxResponse decodes an protobuf-encoded byte slice into TxResponse -func DecodeTxResponse(in []byte) (*MsgEthereumTxResponse, error) { - var txMsgData sdk.TxMsgData - if err := proto.Unmarshal(in, &txMsgData); err != nil { - return nil, err - } - - if len(txMsgData.MsgResponses) == 0 { - return &MsgEthereumTxResponse{}, nil - } - - var res MsgEthereumTxResponse - if err := proto.Unmarshal(txMsgData.MsgResponses[0].Value, &res); err != nil { - return nil, errorsmod.Wrap(err, "failed to unmarshal tx response message data") - } - - return &res, nil -} - -// EncodeTransactionLogs encodes TransactionLogs slice into a protobuf-encoded byte slice. -func EncodeTransactionLogs(res *TransactionLogs) ([]byte, error) { - return proto.Marshal(res) -} - -// DecodeTransactionLogs decodes an protobuf-encoded byte slice into TransactionLogs -func DecodeTransactionLogs(data []byte) (TransactionLogs, error) { - var logs TransactionLogs - err := proto.Unmarshal(data, &logs) - if err != nil { - return TransactionLogs{}, err - } - return logs, nil -} - -// UnwrapEthereumMsg extracts MsgEthereumTx from wrapping sdk.Tx -func UnwrapEthereumMsg(tx *sdk.Tx, ethHash common.Hash) (*MsgEthereumTx, error) { - if tx == nil { - return nil, fmt.Errorf("invalid tx: nil") - } - - for _, msg := range (*tx).GetMsgs() { - ethMsg, ok := msg.(*MsgEthereumTx) - if !ok { - return nil, fmt.Errorf("invalid tx type: %T", tx) - } - txHash := ethMsg.AsTransaction().Hash() - ethMsg.Hash = txHash.Hex() - if txHash == ethHash { - return ethMsg, nil - } - } - - return nil, fmt.Errorf("eth tx not found: %s", ethHash) -} - -// UnpackEthMsg unpacks an Ethereum message from a Cosmos SDK message -func UnpackEthMsg(msg sdk.Msg) ( - ethMsg *MsgEthereumTx, - txData TxData, - from sdk.AccAddress, - err error, -) { - msgEthTx, ok := msg.(*MsgEthereumTx) - if !ok { - return nil, nil, nil, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*MsgEthereumTx)(nil)) - } - - txData, err = UnpackTxData(msgEthTx.Data) - if err != nil { - return nil, nil, nil, errorsmod.Wrap(err, "failed to unpack tx data any for tx") - } - - // sender address should be in the tx cache from the previous AnteHandle call - from = msgEthTx.GetFrom() - return msgEthTx, txData, from, nil -} - -// BinSearch executes the binary search and hone in on an executable gas limit -func BinSearch(lo, hi uint64, executable func(uint64) (bool, *MsgEthereumTxResponse, error)) (uint64, error) { - for lo+1 < hi { - mid := (hi + lo) / 2 - failed, _, err := executable(mid) - // If the error is not nil(consensus error), it means the provided message - // call or transaction will never be accepted no matter how much gas it is - // assigned. Return the error directly, don't struggle any more. - if err != nil { - return 0, err - } - if failed { - lo = mid - } else { - hi = mid - } - } - return hi, nil -} - -// EffectiveGasPrice computes the effective gas price based on eip-1559 rules -// `effectiveGasPrice = min(baseFee + tipCap, feeCap)` -func EffectiveGasPrice(baseFee, feeCap, tipCap *big.Int) *big.Int { - return math.BigMin(new(big.Int).Add(tipCap, baseFee), feeCap) -} diff --git a/legacy/evm/types/utils_test.go b/legacy/evm/types/utils_test.go deleted file mode 100644 index fb5dd24..0000000 --- a/legacy/evm/types/utils_test.go +++ /dev/null @@ -1,127 +0,0 @@ -package types_test - -import ( - "errors" - "math/big" - "testing" - - "github.com/cosmos/cosmos-sdk/client" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - - "github.com/ethereum/go-ethereum/common" - - proto "github.com/cosmos/gogoproto/proto" - - "github.com/evmos/evmos/v20/encoding" - utiltx "github.com/evmos/evmos/v20/testutil/tx" - evmtypes "github.com/evmos/evmos/v20/x/evm/types" - - "github.com/stretchr/testify/require" -) - -func TestEvmDataEncoding(t *testing.T) { - ret := []byte{0x5, 0x8} - - data := &evmtypes.MsgEthereumTxResponse{ - Hash: common.BytesToHash([]byte("hash")).String(), - Logs: []*evmtypes.Log{{ - Data: []byte{1, 2, 3, 4}, - BlockNumber: 17, - }}, - Ret: ret, - } - - anyData := codectypes.UnsafePackAny(data) - txData := &sdk.TxMsgData{ - MsgResponses: []*codectypes.Any{anyData}, - } - - txDataBz, err := proto.Marshal(txData) - require.NoError(t, err) - - res, err := evmtypes.DecodeTxResponse(txDataBz) - require.NoError(t, err) - require.NotNil(t, res) - require.Equal(t, data.Logs, res.Logs) - require.Equal(t, ret, res.Ret) -} - -func TestUnwrapEthererumMsg(t *testing.T) { - _, err := evmtypes.UnwrapEthereumMsg(nil, common.Hash{}) - require.NotNil(t, err) - - encodingConfig := encoding.MakeConfig() - clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig) - builder, _ := clientCtx.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder) - - tx := builder.GetTx().(sdk.Tx) - _, err = evmtypes.UnwrapEthereumMsg(&tx, common.Hash{}) - require.NotNil(t, err) - - evmTxParams := &evmtypes.EvmTxArgs{ - ChainID: big.NewInt(1), - Nonce: 0, - To: &common.Address{}, - Amount: big.NewInt(0), - GasLimit: 0, - GasPrice: big.NewInt(0), - Input: []byte{}, - } - - msg := evmtypes.NewTx(evmTxParams) - err = builder.SetMsgs(msg) - require.Nil(t, err) - - tx = builder.GetTx().(sdk.Tx) - unwrappedMsg, err := evmtypes.UnwrapEthereumMsg(&tx, msg.AsTransaction().Hash()) - require.Nil(t, err) - require.Equal(t, unwrappedMsg, msg) -} - -func TestBinSearch(t *testing.T) { - successExecutable := func(gas uint64) (bool, *evmtypes.MsgEthereumTxResponse, error) { - target := uint64(21000) - return gas < target, nil, nil - } - failedExecutable := func(_ uint64) (bool, *evmtypes.MsgEthereumTxResponse, error) { - return true, nil, errors.New("contract failed") - } - - gas, err := evmtypes.BinSearch(20000, 21001, successExecutable) - require.NoError(t, err) - require.Equal(t, gas, uint64(21000)) - - gas, err = evmtypes.BinSearch(20000, 21001, failedExecutable) - require.Error(t, err) - require.Equal(t, gas, uint64(0)) -} - -func TestTransactionLogsEncodeDecode(t *testing.T) { - addr := utiltx.GenerateAddress().String() - - txLogs := evmtypes.TransactionLogs{ - Hash: common.BytesToHash([]byte("tx_hash")).String(), - Logs: []*evmtypes.Log{ - { - Address: addr, - Topics: []string{common.BytesToHash([]byte("topic")).String()}, - Data: []byte("data"), - BlockNumber: 1, - TxHash: common.BytesToHash([]byte("tx_hash")).String(), - TxIndex: 1, - BlockHash: common.BytesToHash([]byte("block_hash")).String(), - Index: 1, - Removed: false, - }, - }, - } - - txLogsEncoded, encodeErr := evmtypes.EncodeTransactionLogs(&txLogs) - require.Nil(t, encodeErr) - - txLogsEncodedDecoded, decodeErr := evmtypes.DecodeTransactionLogs(txLogsEncoded) - require.Nil(t, decodeErr) - require.Equal(t, txLogs, txLogsEncodedDecoded) -} From a327ed32e2467e67520b7e5433a21f5ea63d5168 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 25 Aug 2025 11:17:04 +0200 Subject: [PATCH 34/66] fix: v9 upgrade handler logger --- app/upgrades/v9/upgrades.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index 5ae49b4..aa7c40d 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -4,6 +4,7 @@ import ( "context" "errors" "strconv" + "strings" storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" @@ -35,7 +36,7 @@ func CreateUpgradeHandler( storeKeys, erc20Keeper, ) - ctx.Logger().Info("erc20 module is ready") + ctx.Logger().Info("erc20 module migrated successfully") ctx.Logger().Info("migrating evm module...") if err := migrateEvmModule( ctx, @@ -45,7 +46,7 @@ func CreateUpgradeHandler( ); err != nil { return nil, err } - ctx.Logger().Info("evm module is ready") + ctx.Logger().Info("evm module migrated successfully") logger.Info("Finished v9 upgrade handler") @@ -64,10 +65,11 @@ func migrateEvmModule(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, c codec.MustUnmarshal(legacyBz, &legacyEvmParams) - eips := make([]int64, 0, len(legacyEvmParams.ExtraEIPs)) + eips := make([]int64, len(legacyEvmParams.ExtraEIPs)) for i, extraEIP := range legacyEvmParams.ExtraEIPs { - intEIP, err := strconv.ParseInt(extraEIP, 10, 64) + sanitized := strings.Trim(extraEIP, "ethereum_") + intEIP, err := strconv.ParseInt(sanitized, 10, 64) if err != nil { return err } From 846fa0fa5fdb9939d082803472426599f8e87219 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 25 Aug 2025 15:57:04 +0200 Subject: [PATCH 35/66] fix: ProtoBaseAccount + EthAccount migration --- app/app.go | 3 +-- app/encoding.go | 35 ++++++++++++++++------------------- app/upgrades.go | 1 + app/upgrades/v9/keepers.go | 1 + app/upgrades/v9/upgrades.go | 37 +++++++++++++++++++++++++++++++++---- 5 files changed, 52 insertions(+), 25 deletions(-) diff --git a/app/app.go b/app/app.go index b43157b..28f5d75 100644 --- a/app/app.go +++ b/app/app.go @@ -350,8 +350,7 @@ func New( app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), - // TODO: Update when replacing with forked cosmos/evm version is installed - etherminttypes.ProtoAccount, + authtypes.ProtoBaseAccount, maccPerms, authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), sdk.Bech32PrefixAccAddr, diff --git a/app/encoding.go b/app/encoding.go index 61301f2..40ccd22 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,11 +3,6 @@ package app import ( "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec/address" - types2 "github.com/cosmos/cosmos-sdk/crypto/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - evmethsecp256k1 "github.com/cosmos/evm/crypto/ethsecp256k1" - "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" - sdk "github.com/cosmos/cosmos-sdk/types" sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" @@ -17,11 +12,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" enccodec "github.com/cosmos/evm/encoding/codec" "github.com/cosmos/evm/ethereum/eip712" - evmtypes "github.com/cosmos/evm/types" erc20types "github.com/cosmos/evm/x/erc20/types" vmtypes "github.com/cosmos/evm/x/vm/types" "github.com/cosmos/gogoproto/proto" - legacytypes "github.com/xrplevm/node/v9/legacy/types" "google.golang.org/protobuf/reflect/protoreflect" ) @@ -50,18 +43,22 @@ func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { SigningOptions: signingOptions, }) - interfaceRegistry.RegisterImplementations((*authtypes.AccountI)(nil), - &evmtypes.EthAccount{}, // cosmos-evm - &legacytypes.EthAccount{}, // evmos (legacy) - ) - interfaceRegistry.RegisterImplementations((*types2.PubKey)(nil), - &evmethsecp256k1.PubKey{}, // cosmos-evm - ðsecp256k1.PubKey{}, // evmos (legacy) - ) - interfaceRegistry.RegisterImplementations((*types2.PrivKey)(nil), - &evmethsecp256k1.PrivKey{}, // cosmos-evm - ðsecp256k1.PrivKey{}, // evmos (legacy) - ) + //interfaceRegistry.RegisterImplementations((*sdk.AccountI)(nil), + // &evmtypes.EthAccount{}, // cosmos-evm + // &legacytypes.EthAccount{}, // evmos (legacy) + //) + //interfaceRegistry.RegisterImplementations((*authtypes.AccountI)(nil), + // &evmtypes.EthAccount{}, // cosmos-evm + // &legacytypes.EthAccount{}, // evmos (legacy) + //) + //interfaceRegistry.RegisterImplementations((*types2.PubKey)(nil), + // &evmethsecp256k1.PubKey{}, // cosmos-evm + // ðsecp256k1.PubKey{}, // evmos (legacy) + //) + //interfaceRegistry.RegisterImplementations((*types2.PrivKey)(nil), + // &evmethsecp256k1.PrivKey{}, // cosmos-evm + // ðsecp256k1.PrivKey{}, // evmos (legacy) + //) codec := amino.NewProtoCodec(interfaceRegistry) enccodec.RegisterLegacyAminoCodec(cdc) diff --git a/app/upgrades.go b/app/upgrades.go index 75c03be..3c76450 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -49,6 +49,7 @@ func (app *App) setupUpgradeHandlers() { app.configurator, app.keys, app.appCodec, + app.AccountKeeper, app.EvmKeeper, app.Erc20Keeper, ), diff --git a/app/upgrades/v9/keepers.go b/app/upgrades/v9/keepers.go index 864921b..16b4427 100644 --- a/app/upgrades/v9/keepers.go +++ b/app/upgrades/v9/keepers.go @@ -14,4 +14,5 @@ type ERC20Keeper interface { type EvmKeeper interface { GetParams(ctx sdk.Context) evmtypes.Params SetParams(ctx sdk.Context, params evmtypes.Params) error + SetCodeHash(ctx sdk.Context, addrBytes, hashBytes []byte) } diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index aa7c40d..c69aefc 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -11,10 +11,12 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" erc20types "github.com/cosmos/evm/x/erc20/types" evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/common" legacyevmtypes "github.com/xrplevm/node/v9/legacy/evm/types" + legacytypes "github.com/xrplevm/node/v9/legacy/types" ) func CreateUpgradeHandler( @@ -22,6 +24,7 @@ func CreateUpgradeHandler( configurator module.Configurator, storeKeys map[string]*storetypes.KVStoreKey, appCodec codec.Codec, + accountKeeper authkeeper.AccountKeeper, evmKeeper EvmKeeper, erc20Keeper ERC20Keeper, ) upgradetypes.UpgradeHandler { @@ -30,15 +33,18 @@ func CreateUpgradeHandler( logger := ctx.Logger().With("upgrade", UpgradeName) logger.Info("Running v9 upgrade handler...") + ctx.Logger().Info("migration EthAccounts to BaseAccounts...") + MigrateEthAccountsToBaseAccounts(ctx, accountKeeper, evmKeeper) + ctx.Logger().Info("migrating erc20 module...") - migrateErc20Module( + MigrateErc20Module( ctx, storeKeys, erc20Keeper, ) ctx.Logger().Info("erc20 module migrated successfully") ctx.Logger().Info("migrating evm module...") - if err := migrateEvmModule( + if err := MigrateEvmModule( ctx, storeKeys, appCodec, @@ -54,7 +60,7 @@ func CreateUpgradeHandler( } } -func migrateEvmModule(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, codec codec.Codec, evmKeeper EvmKeeper) error { +func MigrateEvmModule(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, codec codec.Codec, evmKeeper EvmKeeper) error { store := ctx.KVStore(keys[evmtypes.StoreKey]) legacyBz := store.Get(evmtypes.KeyPrefixParams) @@ -99,7 +105,7 @@ func migrateEvmModule(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, c return evmKeeper.SetParams(ctx, params) } -func migrateErc20Module(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, keeper ERC20Keeper) { +func MigrateErc20Module(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, keeper ERC20Keeper) { // In your upgrade handler store := ctx.KVStore(keys[erc20types.StoreKey]) const addressLength = 42 // "0x" + 40 hex characters @@ -122,3 +128,26 @@ func migrateErc20Module(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, store.Delete([]byte("NativePrecompiles")) } } + +// MigrateEthAccountsToBaseAccounts is used to store the code hash of the associated +// smart contracts in the dedicated store in the EVM module and convert the former +// EthAccounts to standard Cosmos SDK accounts. +func MigrateEthAccountsToBaseAccounts(ctx sdk.Context, ak authkeeper.AccountKeeper, ek EvmKeeper) { + ak.IterateAccounts(ctx, func(account sdk.AccountI) (stop bool) { + ethAcc, ok := account.(*legacytypes.EthAccount) + if !ok { + return false + } + + // NOTE: we only need to add store entries for smart contracts + codeHashBytes := common.HexToHash(ethAcc.CodeHash).Bytes() + if !evmtypes.IsEmptyCodeHash(codeHashBytes) { + ek.SetCodeHash(ctx, ethAcc.EthAddress().Bytes(), codeHashBytes) + } + + // Set the base account in the account keeper instead of the EthAccount + ak.SetAccount(ctx, ethAcc.BaseAccount) + + return false + }) +} From 93cb403bfa3ef3c443f244b0fc27e5b940b1e7df Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 26 Aug 2025 09:40:59 +0200 Subject: [PATCH 36/66] fix: register implementations --- app/encoding.go | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/app/encoding.go b/app/encoding.go index 40ccd22..a05bbba 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,10 +3,16 @@ package app import ( "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec/address" + types2 "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + evmethsecp256k1 "github.com/cosmos/evm/crypto/ethsecp256k1" + evmtypes "github.com/cosmos/evm/types" + "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" + legacytypes "github.com/xrplevm/node/v9/legacy/types" amino "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" @@ -43,22 +49,22 @@ func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { SigningOptions: signingOptions, }) - //interfaceRegistry.RegisterImplementations((*sdk.AccountI)(nil), - // &evmtypes.EthAccount{}, // cosmos-evm - // &legacytypes.EthAccount{}, // evmos (legacy) - //) - //interfaceRegistry.RegisterImplementations((*authtypes.AccountI)(nil), - // &evmtypes.EthAccount{}, // cosmos-evm - // &legacytypes.EthAccount{}, // evmos (legacy) - //) - //interfaceRegistry.RegisterImplementations((*types2.PubKey)(nil), - // &evmethsecp256k1.PubKey{}, // cosmos-evm - // ðsecp256k1.PubKey{}, // evmos (legacy) - //) - //interfaceRegistry.RegisterImplementations((*types2.PrivKey)(nil), - // &evmethsecp256k1.PrivKey{}, // cosmos-evm - // ðsecp256k1.PrivKey{}, // evmos (legacy) - //) + interfaceRegistry.RegisterImplementations((*sdk.AccountI)(nil), + &evmtypes.EthAccount{}, // cosmos-evm + &legacytypes.EthAccount{}, // evmos (legacy) + ) + interfaceRegistry.RegisterImplementations((*authtypes.AccountI)(nil), + &evmtypes.EthAccount{}, // cosmos-evm + &legacytypes.EthAccount{}, // evmos (legacy) + ) + interfaceRegistry.RegisterImplementations((*types2.PubKey)(nil), + &evmethsecp256k1.PubKey{}, // cosmos-evm + ðsecp256k1.PubKey{}, // evmos (legacy) + ) + interfaceRegistry.RegisterImplementations((*types2.PrivKey)(nil), + &evmethsecp256k1.PrivKey{}, // cosmos-evm + ðsecp256k1.PrivKey{}, // evmos (legacy) + ) codec := amino.NewProtoCodec(interfaceRegistry) enccodec.RegisterLegacyAminoCodec(cdc) From 4097678bb6c5bfb672847e16f7896b0c1f92ec75 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 26 Aug 2025 11:16:00 +0200 Subject: [PATCH 37/66] feat: custom keyring options --- cmd/exrpd/cmd/keyring.go | 26 ++++ cmd/exrpd/cmd/root.go | 2 +- legacy/crypto/ethsecp256k1/benchmark_test.go | 34 ----- .../crypto/ethsecp256k1/ethsecp256k1_test.go | 124 ------------------ legacy/crypto/hd/algorithm.go | 113 ++++++++++++++++ 5 files changed, 140 insertions(+), 159 deletions(-) create mode 100644 cmd/exrpd/cmd/keyring.go delete mode 100644 legacy/crypto/ethsecp256k1/benchmark_test.go delete mode 100644 legacy/crypto/ethsecp256k1/ethsecp256k1_test.go create mode 100644 legacy/crypto/hd/algorithm.go diff --git a/cmd/exrpd/cmd/keyring.go b/cmd/exrpd/cmd/keyring.go new file mode 100644 index 0000000..b38780c --- /dev/null +++ b/cmd/exrpd/cmd/keyring.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/cosmos/cosmos-sdk/crypto/keyring" + cosmosLedger "github.com/cosmos/cosmos-sdk/crypto/ledger" + evmhd "github.com/cosmos/evm/crypto/hd" + evmkeyring "github.com/cosmos/evm/crypto/keyring" + legacyhd "github.com/xrplevm/node/v9/legacy/crypto/hd" +) + +var ( + SupportedAlgorithms = keyring.SigningAlgoList{evmhd.EthSecp256k1, legacyhd.EthSecp256k1} + SupportedAlgorithmsLedger = keyring.SigningAlgoList{evmhd.EthSecp256k1, legacyhd.EthSecp256k1} +) + +func CustomKeyringOption() keyring.Option { + return func(options *keyring.Options) { + options.SupportedAlgos = SupportedAlgorithms + options.SupportedAlgosLedger = SupportedAlgorithmsLedger + options.LedgerDerivation = func() (cosmosLedger.SECP256K1, error) { return evmkeyring.LedgerDerivation() } + options.LedgerCreateKey = evmkeyring.CreatePubkey + options.LedgerAppName = evmkeyring.AppName + options.LedgerSigSkipDERConv = evmkeyring.SkipDERConversion + + } +} diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 09c3b5a..069206b 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -9,8 +9,8 @@ import ( "cosmossdk.io/store" storetypes "cosmossdk.io/store/types" - evmkeyring "github.com/cosmos/evm/crypto/keyring" + evmserver "github.com/cosmos/evm/server" "github.com/cosmos/cosmos-sdk/client/pruning" diff --git a/legacy/crypto/ethsecp256k1/benchmark_test.go b/legacy/crypto/ethsecp256k1/benchmark_test.go deleted file mode 100644 index 815cc58..0000000 --- a/legacy/crypto/ethsecp256k1/benchmark_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package ethsecp256k1 - -import ( - "fmt" - "testing" -) - -func BenchmarkGenerateKey(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - if _, err := GenerateKey(); err != nil { - b.Fatal(err) - } - } -} - -func BenchmarkPubKey_VerifySignature(b *testing.B) { - privKey, err := GenerateKey() - if err != nil { - b.Fatal(err) - } - pubKey := privKey.PubKey() - - b.ResetTimer() - b.ReportAllocs() - for i := 0; i < b.N; i++ { - msg := []byte(fmt.Sprintf("%10d", i)) - sig, err := privKey.Sign(msg) - if err != nil { - b.Fatal(err) - } - pubKey.VerifySignature(msg, sig) - } -} diff --git a/legacy/crypto/ethsecp256k1/ethsecp256k1_test.go b/legacy/crypto/ethsecp256k1/ethsecp256k1_test.go deleted file mode 100644 index 044f1c2..0000000 --- a/legacy/crypto/ethsecp256k1/ethsecp256k1_test.go +++ /dev/null @@ -1,124 +0,0 @@ -package ethsecp256k1 - -import ( - "encoding/base64" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/codec" - - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/secp256k1" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" -) - -func TestPrivKey(t *testing.T) { - // validate type and equality - privKey, err := GenerateKey() - require.NoError(t, err) - require.Implements(t, (*cryptotypes.PrivKey)(nil), privKey) - - // validate inequality - privKey2, err := GenerateKey() - require.NoError(t, err) - require.False(t, privKey.Equals(privKey2)) - - // validate Ethereum address equality - addr := privKey.PubKey().Address() - key, err := privKey.ToECDSA() - require.NoError(t, err) - expectedAddr := crypto.PubkeyToAddress(key.PublicKey) - require.Equal(t, expectedAddr.Bytes(), addr.Bytes()) - - // validate we can sign some bytes - msg := []byte("hello world") - sigHash := crypto.Keccak256Hash(msg) - expectedSig, err := secp256k1.Sign(sigHash.Bytes(), privKey.Bytes()) - require.NoError(t, err) - - sig, err := privKey.Sign(sigHash.Bytes()) - require.NoError(t, err) - require.Equal(t, expectedSig, sig) -} - -func TestPrivKey_PubKey(t *testing.T) { - privKey, err := GenerateKey() - require.NoError(t, err) - - // validate type and equality - pubKey := &PubKey{ - Key: privKey.PubKey().Bytes(), - } - require.Implements(t, (*cryptotypes.PubKey)(nil), pubKey) - - // validate inequality - privKey2, err := GenerateKey() - require.NoError(t, err) - require.False(t, pubKey.Equals(privKey2.PubKey())) - - // validate signature - msg := []byte("hello world") - sigHash := crypto.Keccak256Hash(msg) - sig, err := privKey.Sign(sigHash.Bytes()) - require.NoError(t, err) - - res := pubKey.VerifySignature(msg, sig) - require.True(t, res) -} - -func TestMarshalAmino(t *testing.T) { - aminoCdc := codec.NewLegacyAmino() - privKey, err := GenerateKey() - require.NoError(t, err) - - pubKey := privKey.PubKey().(*PubKey) - - testCases := []struct { - desc string - msg codec.AminoMarshaler - typ interface{} - expBinary []byte - expJSON string - }{ - { - "ethsecp256k1 private key", - privKey, - &PrivKey{}, - append([]byte{32}, privKey.Bytes()...), // Length-prefixed. - "\"" + base64.StdEncoding.EncodeToString(privKey.Bytes()) + "\"", - }, - { - "ethsecp256k1 public key", - pubKey, - &PubKey{}, - append([]byte{33}, pubKey.Bytes()...), // Length-prefixed. - "\"" + base64.StdEncoding.EncodeToString(pubKey.Bytes()) + "\"", - }, - } - - for _, tc := range testCases { - t.Run(tc.desc, func(t *testing.T) { - // Do a round trip of encoding/decoding binary. - bz, err := aminoCdc.Marshal(tc.msg) - require.NoError(t, err) - require.Equal(t, tc.expBinary, bz) - - err = aminoCdc.Unmarshal(bz, tc.typ) - require.NoError(t, err) - - require.Equal(t, tc.msg, tc.typ) - - // Do a round trip of encoding/decoding JSON. - bz, err = aminoCdc.MarshalJSON(tc.msg) - require.NoError(t, err) - require.Equal(t, tc.expJSON, string(bz)) - - err = aminoCdc.UnmarshalJSON(bz, tc.typ) - require.NoError(t, err) - - require.Equal(t, tc.msg, tc.typ) - }) - } -} diff --git a/legacy/crypto/hd/algorithm.go b/legacy/crypto/hd/algorithm.go new file mode 100644 index 0000000..9625a6f --- /dev/null +++ b/legacy/crypto/hd/algorithm.go @@ -0,0 +1,113 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +package hd + +import ( + "github.com/btcsuite/btcd/btcutil/hdkeychain" + "github.com/btcsuite/btcd/chaincfg" + bip39 "github.com/tyler-smith/go-bip39" + + "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/crypto" + + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + + "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" +) + +const ( + // EthSecp256k1Type defines the ECDSA secp256k1 used on Ethereum + EthSecp256k1Type = hd.PubKeyType(ethsecp256k1.KeyType) +) + +var ( + // SupportedAlgorithms defines the list of signing algorithms used on Evmos: + // - eth_secp256k1 (Ethereum) + // - secp256k1 (Tendermint) + SupportedAlgorithms = keyring.SigningAlgoList{EthSecp256k1, hd.Secp256k1} + // SupportedAlgorithmsLedger defines the list of signing algorithms used on Evmos for the Ledger device: + // - eth_secp256k1 (Ethereum) + // - secp256k1 (Tendermint) + SupportedAlgorithmsLedger = keyring.SigningAlgoList{EthSecp256k1, hd.Secp256k1} +) + +// EthSecp256k1Option defines a function keys options for the ethereum Secp256k1 curve. +// It supports eth_secp256k1 and secp256k1 keys for accounts. +func EthSecp256k1Option() keyring.Option { + return func(options *keyring.Options) { + options.SupportedAlgos = SupportedAlgorithms + options.SupportedAlgosLedger = SupportedAlgorithmsLedger + } +} + +var ( + _ keyring.SignatureAlgo = EthSecp256k1 + + // EthSecp256k1 uses the Bitcoin secp256k1 ECDSA parameters. + EthSecp256k1 = ethSecp256k1Algo{} +) + +type ethSecp256k1Algo struct{} + +// Name returns eth_secp256k1 +func (s ethSecp256k1Algo) Name() hd.PubKeyType { + return EthSecp256k1Type +} + +// Derive derives and returns the eth_secp256k1 private key for the given mnemonic and HD path. +func (s ethSecp256k1Algo) Derive() hd.DeriveFn { + return func(mnemonic, bip39Passphrase, path string) ([]byte, error) { + hdpath, err := accounts.ParseDerivationPath(path) + if err != nil { + return nil, err + } + + seed, err := bip39.NewSeedWithErrorChecking(mnemonic, bip39Passphrase) + if err != nil { + return nil, err + } + + // create a BTC-utils hd-derivation key chain + masterKey, err := hdkeychain.NewMaster(seed, &chaincfg.MainNetParams) + if err != nil { + return nil, err + } + + key := masterKey + for _, n := range hdpath { + key, err = key.Derive(n) + if err != nil { + return nil, err + } + } + + // btc-utils representation of a secp256k1 private key + privateKey, err := key.ECPrivKey() + if err != nil { + return nil, err + } + + // cast private key to a convertible form (single scalar field element of secp256k1) + // and then load into ethcrypto private key format. + // TODO: add links to godocs of the two methods or implementations of them, to compare equivalency + privateKeyECDSA := privateKey.ToECDSA() + derivedKey := crypto.FromECDSA(privateKeyECDSA) + + return derivedKey, nil + } +} + +// Generate generates a eth_secp256k1 private key from the given bytes. +func (s ethSecp256k1Algo) Generate() hd.GenerateFn { + return func(bz []byte) cryptotypes.PrivKey { + bzArr := make([]byte, ethsecp256k1.PrivKeySize) + copy(bzArr, bz) + + // TODO: modulo P + return ðsecp256k1.PrivKey{ + Key: bzArr, + } + } +} From dcc2a3fe8cc967547cffa315c797dde66e461916 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 26 Aug 2025 16:50:10 +0200 Subject: [PATCH 38/66] fix: localnet denoms on config --- app/app.go | 4 ++-- testutil/constants/constants.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/app.go b/app/app.go index 28f5d75..ee2119c 100644 --- a/app/app.go +++ b/app/app.go @@ -161,9 +161,9 @@ const ( Bip44CoinType = 60 Name = "exrp" // DisplayDenom defines the denomination displayed to users in client applications. - DisplayDenom = "xrp" + DisplayDenom = "token" // BaseDenom defines to the default denomination used in EVM - BaseDenom = "axrp" + BaseDenom = "token" // BaseDenomUnit defines the unit of the base denomination BaseDenomUnit = 18 ) diff --git a/testutil/constants/constants.go b/testutil/constants/constants.go index a05bd2c..a53b7de 100644 --- a/testutil/constants/constants.go +++ b/testutil/constants/constants.go @@ -6,9 +6,9 @@ import ( ) const ( - DisplayDenom = "xrp" + DisplayDenom = "token" // BaseDenom defines to the default denomination used in EVM - BaseDenom = "axrp" + BaseDenom = "token" // BaseDenomUnit defines the unit of the base denomination BaseDenomUnit = 18 ) From e4671f8e53cd08ec50a00e2bbd41b88bb83afc8a Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 26 Aug 2025 17:25:46 +0200 Subject: [PATCH 39/66] tmp: avoid default 0 chainid --- cmd/exrpd/cmd/root.go | 4 ++-- cmd/exrpd/main.go | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 069206b..bd0222a 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -133,7 +133,7 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { } // TODO: retrieve evmChainID from genesis file - customAppTemplate, customAppConfig := InitAppConfig(app.BaseDenom, 0) + customAppTemplate, customAppConfig := InitAppConfig(app.BaseDenom, 1440002) customTMConfig := initTendermintConfig() return sdkserver.InterceptConfigsPreRunHandler( cmd, customAppTemplate, customAppConfig, customTMConfig, @@ -427,7 +427,7 @@ func (a appCreator) appExport( height == -1, // -1: no height provided map[int64]bool{}, homePath, - 0, + 1440002, uint(1), appOpts, app.EVMAppOptions, diff --git a/cmd/exrpd/main.go b/cmd/exrpd/main.go index 711421a..512824b 100644 --- a/cmd/exrpd/main.go +++ b/cmd/exrpd/main.go @@ -4,8 +4,6 @@ import ( "fmt" "os" - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" @@ -16,7 +14,6 @@ import ( func main() { initSDKConfig() - registerDenoms() rootCmd, _ := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { fmt.Fprintln(rootCmd.OutOrStderr(), err) @@ -42,13 +39,3 @@ func initSDKConfig() { // config.SetFullFundraiserPath(ethermint.BIP44HDPath) // nolint: staticcheck config.Seal() } - -func registerDenoms() { - if err := sdk.RegisterDenom(app.DisplayDenom, math.LegacyOneDec()); err != nil { - panic(err) - } - - if err := sdk.RegisterDenom(app.BaseDenom, math.LegacyNewDecWithPrec(1, app.BaseDenomUnit)); err != nil { - panic(err) - } -} From 5e82ac43fe9643395f8a608326230040b7273053 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 27 Aug 2025 08:27:10 +0200 Subject: [PATCH 40/66] tmp: disable mempool --- app/app.go | 86 +++++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/app/app.go b/app/app.go index ee2119c..f60410a 100644 --- a/app/app.go +++ b/app/app.go @@ -10,7 +10,7 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + //sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/ethereum/go-ethereum/common" ratelimitv2 "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/v2" @@ -825,45 +825,45 @@ func New( app.SetBeginBlocker(app.BeginBlocker) app.setAnteHandler(app.txConfig, cast.ToUint64(appOpts.Get(srvflags.EVMMaxTxGasWanted))) - - if evmtypes.GetChainConfig() != nil { - mempoolConfig := &evmmempool.EVMMempoolConfig{ - AnteHandler: app.GetAnteHandler(), - BlockGasLimit: 100_000_000, - } - - evmMempool := evmmempool.NewExperimentalEVMMempool( - app.CreateQueryContext, - logger, - app.EvmKeeper, - app.FeeMarketKeeper, - app.txConfig, - app.clientCtx, - mempoolConfig, - ) - app.EVMMempool = evmMempool - - // Set the global mempool for RPC access - if err := evmmempool.SetGlobalEVMMempool(evmMempool); err != nil { - panic(err) - } - - // Replace BaseApp mempool - app.SetMempool(evmMempool) - - // Set custom CheckTx handler for nonce gap support - checkTxHandler := evmmempool.NewCheckTxHandler(evmMempool) - app.SetCheckTxHandler(checkTxHandler) - - // Set custom PrepareProposal handler - abciProposalHandler := baseapp.NewDefaultProposalHandler(evmMempool, app) - abciProposalHandler.SetSignerExtractionAdapter( - evmmempool.NewEthSignerExtractionAdapter( - sdkmempool.NewDefaultSignerExtractionAdapter(), - ), - ) - app.SetPrepareProposal(abciProposalHandler.PrepareProposalHandler()) - } + // + //if evmtypes.GetChainConfig() != nil { + // mempoolConfig := &evmmempool.EVMMempoolConfig{ + // AnteHandler: app.GetAnteHandler(), + // BlockGasLimit: 100_000_000, + // } + // + // evmMempool := evmmempool.NewExperimentalEVMMempool( + // app.CreateQueryContext, + // logger, + // app.EvmKeeper, + // app.FeeMarketKeeper, + // app.txConfig, + // app.clientCtx, + // mempoolConfig, + // ) + // app.EVMMempool = evmMempool + // + // // Set the global mempool for RPC access + // if err := evmmempool.SetGlobalEVMMempool(evmMempool); err != nil { + // panic(err) + // } + // + // // Replace BaseApp mempool + // app.SetMempool(evmMempool) + // + // // Set custom CheckTx handler for nonce gap support + // checkTxHandler := evmmempool.NewCheckTxHandler(evmMempool) + // app.SetCheckTxHandler(checkTxHandler) + // + // // Set custom PrepareProposal handler + // abciProposalHandler := baseapp.NewDefaultProposalHandler(evmMempool, app) + // abciProposalHandler.SetSignerExtractionAdapter( + // evmmempool.NewEthSignerExtractionAdapter( + // sdkmempool.NewDefaultSignerExtractionAdapter(), + // ), + // ) + // app.SetPrepareProposal(abciProposalHandler.PrepareProposalHandler()) + //} app.setPostHandler() app.SetEndBlocker(app.EndBlocker) @@ -1130,9 +1130,9 @@ func (app *App) GetStakingKeeperSDK() *stakingkeeper.Keeper { return app.StakingKeeper } -func (app *App) GetMempool() sdkmempool.ExtMempool { - return app.EVMMempool -} +//func (app *App) GetMempool() sdkmempool.ExtMempool { +// return app.EVMMempool +//} func (app *App) GetAnteHandler() sdk.AnteHandler { return app.BaseApp.AnteHandler() From c64173a6615a5ca25ba0f1e29c7bb19eec1efc84 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 27 Aug 2025 08:44:18 +0200 Subject: [PATCH 41/66] tmp: remove zeroed evm chain id --- app/config.go | 1 + app/encoding.go | 3 +++ cmd/exrpd/cmd/config.go | 4 ++++ cmd/exrpd/cmd/root.go | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/config.go b/app/config.go index 259442a..138a7f5 100644 --- a/app/config.go +++ b/app/config.go @@ -33,6 +33,7 @@ var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ // EVMAppOptions sets up global configuration func EVMAppOptions(chainID uint64) error { + fmt.Println("chainID:", chainID) if sealed { return nil } diff --git a/app/encoding.go b/app/encoding.go index a05bbba..93991ce 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -1,6 +1,8 @@ package app import ( + "fmt" + "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec/address" types2 "github.com/cosmos/cosmos-sdk/crypto/types" @@ -30,6 +32,7 @@ import ( // } func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { + fmt.Println("MakeEncodingConfig chainID", evmChainID) cdc := amino.NewLegacyAmino() signingOptions := signing.Options{ AddressCodec: address.Bech32Codec{ diff --git a/cmd/exrpd/cmd/config.go b/cmd/exrpd/cmd/config.go index 2c0e720..04ec6f0 100644 --- a/cmd/exrpd/cmd/config.go +++ b/cmd/exrpd/cmd/config.go @@ -1,6 +1,8 @@ package cmd import ( + "fmt" + cosmosevmserverconfig "github.com/cosmos/evm/server/config" serverconfig "github.com/cosmos/cosmos-sdk/server/config" @@ -37,6 +39,8 @@ func InitAppConfig(denom string, evmChainID uint64) (string, interface{}) { evmCfg := cosmosevmserverconfig.DefaultEVMConfig() evmCfg.EVMChainID = evmChainID + fmt.Println("InitAppConfig evmchainid: ", evmChainID) + customAppConfig := CustomAppConfig{ Config: *srvCfg, EVM: *evmCfg, diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index bd0222a..20179c6 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -68,7 +68,7 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { dbm.NewMemDB(), nil, true, nil, tempDir(app.DefaultNodeHome), - 0, + 1440002, 0, emptyAppOptions{}, app.NoOpEVMOptions, From adf32350e76ef5af1064c248d7aae9a1125da7f1 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 27 Aug 2025 11:47:03 +0200 Subject: [PATCH 42/66] feat: add mainnet, testnet and devnet chain configs --- app/app.go | 7 +++++-- app/config.go | 28 ++++++++++++++++++++++------ app/encoding.go | 3 --- cmd/exrpd/cmd/config.go | 4 ---- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/app.go b/app/app.go index f60410a..51b6814 100644 --- a/app/app.go +++ b/app/app.go @@ -164,8 +164,11 @@ const ( DisplayDenom = "token" // BaseDenom defines to the default denomination used in EVM BaseDenom = "token" - // BaseDenomUnit defines the unit of the base denomination - BaseDenomUnit = 18 + + // XrpDenom defines the xrp denomination used in EVM + XrpDenom = "axrp" + // XrpDisplayDenom defines the denomination dispkated to users in client applications. + XrpDisplayDenom = "xrp" ) var ( diff --git a/app/config.go b/app/config.go index 138a7f5..35b4af6 100644 --- a/app/config.go +++ b/app/config.go @@ -13,27 +13,43 @@ func NoOpEVMOptions(_ uint64) error { } var ( - sealed = false + // sealed specifies if the EVMConfigurator has been sealed or not. + sealed = false + DefaultEvmCoinInfo = evmtypes.EvmCoinInfo{ Denom: BaseDenom, DisplayDenom: DisplayDenom, ExtendedDenom: BaseDenom, Decimals: evmtypes.EighteenDecimals, } - DefaultLocalnetChainID uint64 = 1440002 - DefaultSimulationChainID uint64 = 777 + + XrpEvmCoinInfo = evmtypes.EvmCoinInfo{ + Denom: XrpDenom, + DisplayDenom: XrpDisplayDenom, + ExtendedDenom: XrpDenom, + Decimals: evmtypes.EighteenDecimals, + } + + LocalnetEVMChainID uint64 = 1440002 + MainnetEVMChainID uint64 = 1440000 + TestnetEVMChainID uint64 = 1449000 + DevnetEVMChainID uint64 = 1440002 + + SimulationEVMChainID uint64 = 777 ) // ChainsCoinInfo maps EVM chain IDs to coin configuration // IMPORTANT: Uses uint64 EVM chain IDs as keys, not Cosmos chain ID strings var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{ - DefaultLocalnetChainID: DefaultEvmCoinInfo, - DefaultSimulationChainID: DefaultEvmCoinInfo, + MainnetEVMChainID: XrpEvmCoinInfo, + TestnetEVMChainID: XrpEvmCoinInfo, + DevnetEVMChainID: XrpEvmCoinInfo, + LocalnetEVMChainID: DefaultEvmCoinInfo, + SimulationEVMChainID: DefaultEvmCoinInfo, } // EVMAppOptions sets up global configuration func EVMAppOptions(chainID uint64) error { - fmt.Println("chainID:", chainID) if sealed { return nil } diff --git a/app/encoding.go b/app/encoding.go index 93991ce..a05bbba 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -1,8 +1,6 @@ package app import ( - "fmt" - "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec/address" types2 "github.com/cosmos/cosmos-sdk/crypto/types" @@ -32,7 +30,6 @@ import ( // } func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { - fmt.Println("MakeEncodingConfig chainID", evmChainID) cdc := amino.NewLegacyAmino() signingOptions := signing.Options{ AddressCodec: address.Bech32Codec{ diff --git a/cmd/exrpd/cmd/config.go b/cmd/exrpd/cmd/config.go index 04ec6f0..2c0e720 100644 --- a/cmd/exrpd/cmd/config.go +++ b/cmd/exrpd/cmd/config.go @@ -1,8 +1,6 @@ package cmd import ( - "fmt" - cosmosevmserverconfig "github.com/cosmos/evm/server/config" serverconfig "github.com/cosmos/cosmos-sdk/server/config" @@ -39,8 +37,6 @@ func InitAppConfig(denom string, evmChainID uint64) (string, interface{}) { evmCfg := cosmosevmserverconfig.DefaultEVMConfig() evmCfg.EVMChainID = evmChainID - fmt.Println("InitAppConfig evmchainid: ", evmChainID) - customAppConfig := CustomAppConfig{ Config: *srvCfg, EVM: *evmCfg, From bcb7c9eaa851bdf5e00ef64b755691aed8d00c19 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 27 Aug 2025 12:54:32 +0200 Subject: [PATCH 43/66] fix: mempool module configuration --- app/ante/handler_options.go | 2 + app/app.go | 92 ++++++++++++++++++++----------------- cmd/exrpd/cmd/root.go | 13 ------ 3 files changed, 53 insertions(+), 54 deletions(-) diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index 92c7558..785af70 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + evmante "github.com/cosmos/evm/ante" ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" txsigning "cosmossdk.io/x/tx/signing" @@ -33,6 +34,7 @@ type HandlerOptions struct { DistributionKeeper DistributionKeeper ExtraDecorator sdk.AnteDecorator AuthzDisabledMsgTypes []string + PendingTxListener evmante.PendingTxListener } // Validate checks if the keepers are defined diff --git a/app/app.go b/app/app.go index 51b6814..3f3e4e5 100644 --- a/app/app.go +++ b/app/app.go @@ -10,7 +10,8 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" - //sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/ethereum/go-ethereum/common" ratelimitv2 "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/v2" @@ -291,6 +292,7 @@ func New( appCodec := encodingConfig.Codec cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry + txConfig := encodingConfig.TxConfig bApp := baseapp.NewBaseApp( Name, @@ -302,6 +304,7 @@ func New( bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) + bApp.SetTxEncoder(txConfig.TxEncoder()) if err := evmAppOptions(evmChainID); err != nil { panic(err) @@ -826,50 +829,50 @@ func New( app.SetInitChainer(app.InitChainer) app.SetPreBlocker(app.PreBlocker) app.SetBeginBlocker(app.BeginBlocker) + app.SetEndBlocker(app.EndBlocker) app.setAnteHandler(app.txConfig, cast.ToUint64(appOpts.Get(srvflags.EVMMaxTxGasWanted))) - // - //if evmtypes.GetChainConfig() != nil { - // mempoolConfig := &evmmempool.EVMMempoolConfig{ - // AnteHandler: app.GetAnteHandler(), - // BlockGasLimit: 100_000_000, - // } - // - // evmMempool := evmmempool.NewExperimentalEVMMempool( - // app.CreateQueryContext, - // logger, - // app.EvmKeeper, - // app.FeeMarketKeeper, - // app.txConfig, - // app.clientCtx, - // mempoolConfig, - // ) - // app.EVMMempool = evmMempool - // - // // Set the global mempool for RPC access - // if err := evmmempool.SetGlobalEVMMempool(evmMempool); err != nil { - // panic(err) - // } - // - // // Replace BaseApp mempool - // app.SetMempool(evmMempool) - // - // // Set custom CheckTx handler for nonce gap support - // checkTxHandler := evmmempool.NewCheckTxHandler(evmMempool) - // app.SetCheckTxHandler(checkTxHandler) - // - // // Set custom PrepareProposal handler - // abciProposalHandler := baseapp.NewDefaultProposalHandler(evmMempool, app) - // abciProposalHandler.SetSignerExtractionAdapter( - // evmmempool.NewEthSignerExtractionAdapter( - // sdkmempool.NewDefaultSignerExtractionAdapter(), - // ), - // ) - // app.SetPrepareProposal(abciProposalHandler.PrepareProposalHandler()) - //} + + if evmtypes.GetChainConfig() != nil { + mempoolConfig := &evmmempool.EVMMempoolConfig{ + AnteHandler: app.GetAnteHandler(), + BlockGasLimit: 100_000_000, + } + + evmMempool := evmmempool.NewExperimentalEVMMempool( + app.CreateQueryContext, + logger, + app.EvmKeeper, + app.FeeMarketKeeper, + app.txConfig, + app.clientCtx, + mempoolConfig, + ) + app.EVMMempool = evmMempool + + // Set the global mempool for RPC access + if err := evmmempool.SetGlobalEVMMempool(evmMempool); err != nil { + panic(err) + } + + // Replace BaseApp mempool + app.SetMempool(evmMempool) + + // Set custom CheckTx handler for nonce gap support + checkTxHandler := evmmempool.NewCheckTxHandler(evmMempool) + app.SetCheckTxHandler(checkTxHandler) + + // Set custom PrepareProposal handler + abciProposalHandler := baseapp.NewDefaultProposalHandler(evmMempool, app) + abciProposalHandler.SetSignerExtractionAdapter( + evmmempool.NewEthSignerExtractionAdapter( + sdkmempool.NewDefaultSignerExtractionAdapter(), + ), + ) + app.SetPrepareProposal(abciProposalHandler.PrepareProposalHandler()) + } app.setPostHandler() - app.SetEndBlocker(app.EndBlocker) app.setupUpgradeHandlers() // At startup, after all modules have been registered, check that all prot @@ -918,6 +921,7 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), }, + PendingTxListener: app.onPendingTx, } if err := handlerOpts.Validate(); err != nil { @@ -1228,3 +1232,9 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino func (app *App) SimulationManager() *module.SimulationManager { return app.sm } + +func (app *App) onPendingTx(hash common.Hash) { + for _, listener := range app.pendingTxListeners { + listener(hash) + } +} diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 20179c6..d380a61 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -2,7 +2,6 @@ package cmd import ( "errors" - "fmt" "io" "os" "path/filepath" @@ -15,7 +14,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/snapshot" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/tx" txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" @@ -375,17 +373,6 @@ func (a appCreator) newApp( baseapp.SetChainID(chainID), } - baseappOptions = append(baseappOptions, func(app *baseapp.BaseApp) { - mempool := sdkmempool.NoOpMempool{} - app.SetMempool(mempool) - - handler := baseapp.NewDefaultProposalHandler(mempool, app) - app.SetPrepareProposal(handler.PrepareProposalHandler()) - app.SetProcessProposal(handler.ProcessProposalHandler()) - }) - - fmt.Println(appOpts.Get(flags.FlagChainID)) - _ = cast.ToUint64(appOpts.Get(flags.FlagChainID)) return app.New( From 175e2606a458c0b5d5f4fbcfd1072e7c1cd507c4 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 29 Aug 2025 11:50:34 +0200 Subject: [PATCH 44/66] fix: add ratelimit module to SetOrderEndBlockers --- app/app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/app.go b/app/app.go index 3f3e4e5..4e67e55 100644 --- a/app/app.go +++ b/app/app.go @@ -751,6 +751,7 @@ func New( feemarkettypes.ModuleName, erc20types.ModuleName, feegrant.ModuleName, + ratelimittypes.ModuleName, ) genesisModuleOrder := []string{ From c29bff75ba0c168be7be4a1c71a33f36fafe3a5d Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 29 Aug 2025 15:21:33 +0200 Subject: [PATCH 45/66] refactor: move config constants to config --- app/app.go | 15 --------------- app/config.go | 20 +++++++++++++++----- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/app/app.go b/app/app.go index 4e67e55..9379bdb 100644 --- a/app/app.go +++ b/app/app.go @@ -157,21 +157,6 @@ import ( _ "github.com/ethereum/go-ethereum/eth/tracers/native" ) -const ( - AccountAddressPrefix = "ethm" - Bip44CoinType = 60 - Name = "exrp" - // DisplayDenom defines the denomination displayed to users in client applications. - DisplayDenom = "token" - // BaseDenom defines to the default denomination used in EVM - BaseDenom = "token" - - // XrpDenom defines the xrp denomination used in EVM - XrpDenom = "axrp" - // XrpDisplayDenom defines the denomination dispkated to users in client applications. - XrpDisplayDenom = "xrp" -) - var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string diff --git a/app/config.go b/app/config.go index 35b4af6..d9af93b 100644 --- a/app/config.go +++ b/app/config.go @@ -12,6 +12,21 @@ func NoOpEVMOptions(_ uint64) error { return nil } +const ( + AccountAddressPrefix = "ethm" + Bip44CoinType = 60 + Name = "exrp" + // DisplayDenom defines the denomination displayed to users in client applications. + DisplayDenom = "token" + // BaseDenom defines to the default denomination used in EVM + BaseDenom = "token" + + // XrpDenom defines the xrp denomination used in EVM + XrpDenom = "axrp" + // XrpDisplayDenom defines the denomination dispkated to users in client applications. + XrpDisplayDenom = "xrp" +) + var ( // sealed specifies if the EVMConfigurator has been sealed or not. sealed = false @@ -60,11 +75,6 @@ func EVMAppOptions(chainID uint64) error { return fmt.Errorf("unknown EVM chain id: %d", chainID) } - //// Set denom info for the chain - // if err := setBaseDenom(coinInfo); err != nil { - // return err - //} - ethCfg := evmtypes.DefaultChainConfig(chainID) err := evmtypes.NewEVMConfigurator(). From 8889ce4efed9afb54151a263b0bb68991a545aef Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 4 Sep 2025 12:20:58 +0200 Subject: [PATCH 46/66] fix(tests/upgrade): remove deprecated update testsuite --- tests/upgrade/README.md | 14 - tests/upgrade/network.go | 73 -- tests/upgrade/suite.go | 43 -- tests/upgrade/suite_test.go | 36 - tests/upgrade/upgrade-state.json | 656 ------------------ testutil/integration/exrp/upgrade/abci.go | 101 --- testutil/integration/exrp/upgrade/config.go | 25 - testutil/integration/exrp/upgrade/ibc.go | 26 - testutil/integration/exrp/upgrade/keepers.go | 60 -- testutil/integration/exrp/upgrade/network.go | 332 --------- .../integration/exrp/upgrade/unit_network.go | 57 -- 11 files changed, 1423 deletions(-) delete mode 100644 tests/upgrade/README.md delete mode 100644 tests/upgrade/network.go delete mode 100644 tests/upgrade/suite.go delete mode 100644 tests/upgrade/suite_test.go delete mode 100644 tests/upgrade/upgrade-state.json delete mode 100644 testutil/integration/exrp/upgrade/abci.go delete mode 100644 testutil/integration/exrp/upgrade/config.go delete mode 100644 testutil/integration/exrp/upgrade/ibc.go delete mode 100644 testutil/integration/exrp/upgrade/keepers.go delete mode 100644 testutil/integration/exrp/upgrade/network.go delete mode 100644 testutil/integration/exrp/upgrade/unit_network.go diff --git a/tests/upgrade/README.md b/tests/upgrade/README.md deleted file mode 100644 index 0a05141..0000000 --- a/tests/upgrade/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Upgrade testsuite - -## Download exported state - -```bash - -``` - -## Setup - -Set the `UPGRADE_STATE_FILE` environment variable to the path to the exported state file. -```bash -UPGRADE_STATE_FILE="path/to/exported-state.json" -``` \ No newline at end of file diff --git a/tests/upgrade/network.go b/tests/upgrade/network.go deleted file mode 100644 index d50a714..0000000 --- a/tests/upgrade/network.go +++ /dev/null @@ -1,73 +0,0 @@ -package testupgrade - -import ( - 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" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - erc20types "github.com/cosmos/evm/x/erc20/types" - feemarkettypes "github.com/cosmos/evm/x/feemarket/types" - evmtypes "github.com/cosmos/evm/x/vm/types" - exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" - upgradenetwork "github.com/xrplevm/node/v9/testutil/integration/exrp/upgrade" - poatypes "github.com/xrplevm/node/v9/x/poa/types" -) - -var _ exrpcommon.Network = (*UpgradeTestNetwork)(nil) - -type UpgradeTestNetwork struct { - upgradenetwork.UpgradeIntegrationNetwork -} - -func NewUpgradeTestNetwork(opts ...exrpcommon.ConfigOption) *UpgradeTestNetwork { - network := upgradenetwork.New(opts...) - return &UpgradeTestNetwork{ - UpgradeIntegrationNetwork: *network, - } -} - -func (n *UpgradeTestNetwork) SetupSdkConfig() { - exrpcommon.SetupSdkConfig() -} - -func (n *UpgradeTestNetwork) GetERC20Client() erc20types.QueryClient { - return exrpcommon.GetERC20Client(n) -} - -func (n *UpgradeTestNetwork) GetEvmClient() evmtypes.QueryClient { - return exrpcommon.GetEvmClient(n) -} - -func (n *UpgradeTestNetwork) GetGovClient() govtypes.QueryClient { - return exrpcommon.GetGovClient(n) -} - -func (n *UpgradeTestNetwork) GetBankClient() banktypes.QueryClient { - return exrpcommon.GetBankClient(n) -} - -func (n *UpgradeTestNetwork) GetFeeMarketClient() feemarkettypes.QueryClient { - return exrpcommon.GetFeeMarketClient(n) -} - -func (n *UpgradeTestNetwork) GetAuthClient() authtypes.QueryClient { - return exrpcommon.GetAuthClient(n) -} - -func (n *UpgradeTestNetwork) GetAuthzClient() authz.QueryClient { - return exrpcommon.GetAuthzClient(n) -} - -func (n *UpgradeTestNetwork) GetStakingClient() stakingtypes.QueryClient { - return exrpcommon.GetStakingClient(n) -} - -func (n *UpgradeTestNetwork) GetDistrClient() distrtypes.QueryClient { - return exrpcommon.GetDistrClient(n) -} - -func (n *UpgradeTestNetwork) GetPoaClient() poatypes.QueryClient { - return exrpcommon.GetPoaClient(n) -} diff --git a/tests/upgrade/suite.go b/tests/upgrade/suite.go deleted file mode 100644 index 13ce43e..0000000 --- a/tests/upgrade/suite.go +++ /dev/null @@ -1,43 +0,0 @@ -package testupgrade - -import ( - "os" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/suite" - exrpupgrade "github.com/xrplevm/node/v9/testutil/integration/exrp/upgrade" -) - -const defaultStateFile = "upgrade-state.json" - -type UpgradeTestSuite struct { - suite.Suite - - network *UpgradeTestNetwork -} - -func (s *UpgradeTestSuite) Network() *UpgradeTestNetwork { - return s.network -} - -func (s *UpgradeTestSuite) SetupTest() { - // Get the state file from the environment variable, or use the default one - stateFile := os.Getenv("UPGRADE_STATE_FILE") - if stateFile == "" { - stateFile = defaultStateFile - } - s.Require().NotEmpty(stateFile) - - // Setup the SDK config - s.network.SetupSdkConfig() - - s.Require().Equal(sdk.GetConfig().GetBech32AccountAddrPrefix(), "ethm") - - // Create the network - s.network = NewUpgradeTestNetwork( - exrpupgrade.WithGenesisFile(stateFile), - ) - - // Check that the network was created successfully - s.Require().NotNil(s.network) -} diff --git a/tests/upgrade/suite_test.go b/tests/upgrade/suite_test.go deleted file mode 100644 index 7ab0c83..0000000 --- a/tests/upgrade/suite_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package testupgrade - -import ( - "testing" - - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/suite" - "github.com/xrplevm/node/v9/app" -) - -func TestUpgradeTestSuite(t *testing.T) { - suite.Run(t, new(UpgradeTestSuite)) -} - -func (s *UpgradeTestSuite) TestUpgrade() { - denom := s.network.GetDenom() - s.Require().NotEmpty(denom) - s.Require().Equal(denom, app.BaseDenom) - - balances, err := s.Network().GetBankClient().AllBalances(s.network.GetContext(), &banktypes.QueryAllBalancesRequest{ - Address: "ethm1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3w48d64", - }) - - s.T().Log("balances", balances) - s.Require().NoError(err) - - err = s.network.NextBlock() - s.Require().NoError(err) - - res, err := s.Network().GetStakingClient().Validators(s.network.GetContext(), &stakingtypes.QueryValidatorsRequest{}) - s.Require().NoError(err) - - s.T().Log("validators", len(res.Validators)) - s.Require().Equal(len(res.Validators), 1) -} diff --git a/tests/upgrade/upgrade-state.json b/tests/upgrade/upgrade-state.json deleted file mode 100644 index af21608..0000000 --- a/tests/upgrade/upgrade-state.json +++ /dev/null @@ -1,656 +0,0 @@ -{ - "app_name": "exrpd", - "app_version": "v4.0.0-7-g40ab899", - "genesis_time": "2024-11-27T17:14:04.871328Z", - "chain_id": "exrp_1440002-1", - "initial_height": 8, - "app_hash": null, - "app_state": { - "auth": { - "params": { - "max_memo_characters": "256", - "tx_sig_limit": "7", - "tx_size_cost_per_byte": "10", - "sig_verify_cost_ed25519": "590", - "sig_verify_cost_secp256k1": "1000" - }, - "accounts": [ - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "address": "ethm1glht96kr2rseywuvhhay894qw7ekuc4q32ac2y", - "pub_key": null, - "account_number": "7", - "sequence": "0" - }, - "name": "erc20", - "permissions": [ - "minter", - "burner" - ] - }, - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "address": "ethm1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3w48d64", - "pub_key": null, - "account_number": "3", - "sequence": "0" - }, - "name": "bonded_tokens_pool", - "permissions": [ - "burner", - "staking" - ] - }, - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "address": "ethm1tygms3xhhs3yv487phx3dw4a95jn7t7l64muvp", - "pub_key": null, - "account_number": "4", - "sequence": "0" - }, - "name": "not_bonded_tokens_pool", - "permissions": [ - "burner", - "staking" - ] - }, - { - "@type": "/cosmos.auth.v1beta1.BaseAccount", - "address": "ethm1dakgyqjulg29m5fmv992g2y66m9g2mjn6hahwg", - "pub_key": { - "@type": "/ethermint.crypto.v1.ethsecp256k1.PubKey", - "key": "AyzS/NPje8oX+4+4uWP9f3060duAFXh3MpNWELtTxPz1" - }, - "account_number": "0", - "sequence": "1" - }, - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "address": "ethm1wztruvatpslu6ngetc65272cshcnzsxgphqyau", - "pub_key": null, - "account_number": "8", - "sequence": "0" - }, - "name": "poa", - "permissions": [ - "minter", - "burner" - ] - }, - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "address": "ethm10d07y265gmmuvt4z0w9aw880jnsr700jpva843", - "pub_key": null, - "account_number": "5", - "sequence": "0" - }, - "name": "gov", - "permissions": [ - "burner" - ] - }, - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "address": "ethm1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8u3272a", - "pub_key": null, - "account_number": "2", - "sequence": "0" - }, - "name": "distribution", - "permissions": [] - }, - { - "@type": "/ethermint.types.v1.EthAccount", - "base_account": { - "address": "ethm16j2fvexdsfnq4t5ehmwqxjsda29qh4gh75fmg2", - "pub_key": null, - "account_number": "6", - "sequence": "0" - }, - "code_hash": "0x7b477c761b4d0469f03f27ba58d0a7eacbfdd62b69b82c6c683ae5f81c67fe80" - }, - { - "@type": "/cosmos.auth.v1beta1.ModuleAccount", - "base_account": { - "address": "ethm17xpfvakm2amg962yls6f84z3kell8c5lthdzgl", - "pub_key": null, - "account_number": "1", - "sequence": "0" - }, - "name": "fee_collector", - "permissions": [] - } - ] - }, - "authz": { - "authorization": [] - }, - "bank": { - "params": { - "send_enabled": [], - "default_send_enabled": true - }, - "balances": [ - { - "address": "ethm1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3w48d64", - "coins": [ - { - "denom": "apoa", - "amount": "1000000" - } - ] - }, - { - "address": "ethm1dakgyqjulg29m5fmv992g2y66m9g2mjn6hahwg", - "coins": [ - { - "denom": "token", - "amount": "1000000000000000000000000000" - } - ] - } - ], - "supply": [ - { - "denom": "apoa", - "amount": "1000000" - }, - { - "denom": "token", - "amount": "1000000000000000000000000000" - } - ], - "denom_metadata": [], - "send_enabled": [] - }, - "capability": { - "index": "3", - "owners": [ - { - "index": "1", - "index_owners": { - "owners": [ - { - "module": "ibc", - "name": "ports/transfer" - }, - { - "module": "transfer", - "name": "ports/transfer" - } - ] - } - }, - { - "index": "2", - "index_owners": { - "owners": [ - { - "module": "ibc", - "name": "ports/icahost" - }, - { - "module": "icahost", - "name": "ports/icahost" - } - ] - } - } - ] - }, - "crisis": { - "constant_fee": { - "denom": "token", - "amount": "1000" - } - }, - "distribution": { - "params": { - "community_tax": "0.020000000000000000", - "base_proposer_reward": "0.000000000000000000", - "bonus_proposer_reward": "0.000000000000000000", - "withdraw_addr_enabled": true - }, - "fee_pool": { - "community_pool": [] - }, - "delegator_withdraw_infos": [], - "previous_proposer": "ethmvalcons123s7tvluhrla7tpj5mwysxqlcgwwzwavxenru7", - "outstanding_rewards": [ - { - "validator_address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "outstanding_rewards": [] - } - ], - "validator_accumulated_commissions": [ - { - "validator_address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "accumulated": { - "commission": [] - } - } - ], - "validator_historical_rewards": [ - { - "validator_address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "period": "1", - "rewards": { - "cumulative_reward_ratio": [], - "reference_count": 2 - } - } - ], - "validator_current_rewards": [ - { - "validator_address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "rewards": { - "rewards": [], - "period": "2" - } - } - ], - "delegator_starting_infos": [ - { - "delegator_address": "ethm1dakgyqjulg29m5fmv992g2y66m9g2mjn6hahwg", - "validator_address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "starting_info": { - "previous_period": "1", - "stake": "1000000.000000000000000000", - "height": "0" - } - } - ], - "validator_slash_events": [] - }, - "erc20": { - "params": { - "enable_erc20": true, - "native_precompiles": [ - "0xD4949664cD82660AaE99bEdc034a0deA8A0bd517" - ], - "dynamic_precompiles": [] - }, - "token_pairs": [ - { - "erc20_address": "0xD4949664cD82660AaE99bEdc034a0deA8A0bd517", - "denom": "token", - "enabled": true, - "contract_owner": "OWNER_MODULE", - "owner_address": "ethm1zrxl239wa6ad5xge3gs68rt98227xgnjq0xyw2" - } - ] - }, - "evidence": { - "evidence": [] - }, - "evm": { - "accounts": [ - { - "address": "0xD4949664cD82660AaE99bEdc034a0deA8A0bd517", - "code": "608060405234801561001057600080fd5b50600436106101da5760003560e01c80635c975abb11610104578063a217fddf116100a2578063d539139311610071578063d53913931461057d578063d547741f1461059b578063dd62ed3e146105b7578063e63ab1e9146105e7576101da565b8063a217fddf146104cf578063a457c2d7146104ed578063a9059cbb1461051d578063ca15c8731461054d576101da565b80638456cb59116100de5780638456cb59146104475780639010d07c1461045157806391d148541461048157806395d89b41146104b1576101da565b80635c975abb146103dd57806370a08231146103fb57806379cc67901461042b576101da565b8063282c51f31161017c578063395093511161014b578063395093511461036b5780633f4ba83a1461039b57806340c10f19146103a557806342966c68146103c1576101da565b8063282c51f3146102f75780632f2ff15d14610315578063313ce5671461033157806336568abe1461034f576101da565b806318160ddd116101b857806318160ddd1461025d5780631cf2c7e21461027b57806323b872dd14610297578063248a9ca3146102c7576101da565b806301ffc9a7146101df57806306fdde031461020f578063095ea7b31461022d575b600080fd5b6101f960048036038101906101f49190612216565b610605565b604051610206919061225e565b60405180910390f35b61021761067f565b6040516102249190612312565b60405180910390f35b610247600480360381019061024291906123c8565b610711565b604051610254919061225e565b60405180910390f35b61026561072f565b6040516102729190612417565b60405180910390f35b610295600480360381019061029091906123c8565b610739565b005b6102b160048036038101906102ac9190612432565b6107b7565b6040516102be919061225e565b60405180910390f35b6102e160048036038101906102dc91906124bb565b6108af565b6040516102ee91906124f7565b60405180910390f35b6102ff6108ce565b60405161030c91906124f7565b60405180910390f35b61032f600480360381019061032a9190612512565b6108f2565b005b61033961091b565b604051610346919061256e565b60405180910390f35b61036960048036038101906103649190612512565b610932565b005b610385600480360381019061038091906123c8565b6109b5565b604051610392919061225e565b60405180910390f35b6103a3610a61565b005b6103bf60048036038101906103ba91906123c8565b610adb565b005b6103db60048036038101906103d69190612589565b610b59565b005b6103e5610b6d565b6040516103f2919061225e565b60405180910390f35b610415600480360381019061041091906125b6565b610b84565b6040516104229190612417565b60405180910390f35b610445600480360381019061044091906123c8565b610bcd565b005b61044f610c48565b005b61046b600480360381019061046691906125e3565b610cc2565b6040516104789190612632565b60405180910390f35b61049b60048036038101906104969190612512565b610cf1565b6040516104a8919061225e565b60405180910390f35b6104b9610d5b565b6040516104c69190612312565b60405180910390f35b6104d7610ded565b6040516104e491906124f7565b60405180910390f35b610507600480360381019061050291906123c8565b610df4565b604051610514919061225e565b60405180910390f35b610537600480360381019061053291906123c8565b610edf565b604051610544919061225e565b60405180910390f35b610567600480360381019061056291906124bb565b610efd565b6040516105749190612417565b60405180910390f35b610585610f21565b60405161059291906124f7565b60405180910390f35b6105b560048036038101906105b09190612512565b610f45565b005b6105d160048036038101906105cc919061264d565b610f6e565b6040516105de9190612417565b60405180910390f35b6105ef610ff5565b6040516105fc91906124f7565b60405180910390f35b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610678575061067782611129565b5b9050919050565b60606005805461068e906126bc565b80601f01602080910402602001604051908101604052809291908181526020018280546106ba906126bc565b80156107075780601f106106dc57610100808354040283529160200191610707565b820191906000526020600020905b8154815290600101906020018083116106ea57829003601f168201915b5050505050905090565b600061072561071e6111a3565b84846111ab565b6001905092915050565b6000600454905090565b61076a7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486107656111a3565b610cf1565b6107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a090612760565b60405180910390fd5b6107b38282611376565b5050565b60006107c484848461154f565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061080f6111a3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561088f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610886906127f2565b60405180910390fd5b6108a38561089b6111a3565b8584036111ab565b60019150509392505050565b6000806000838152602001908152602001600020600101549050919050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6108fb826108af565b61090c816109076111a3565b6117d3565b6109168383611870565b505050565b6000600760019054906101000a900460ff16905090565b61093a6111a3565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146109a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099e90612884565b60405180910390fd5b6109b182826118a4565b5050565b6000610a576109c26111a3565b8484600360006109d06111a3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a5291906128d3565b6111ab565b6001905092915050565b610a927f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a8d6111a3565b610cf1565b610ad1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac89061299b565b60405180910390fd5b610ad96118d8565b565b610b0c7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610b076111a3565b610cf1565b610b4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4290612a2d565b60405180910390fd5b610b55828261197a565b5050565b610b6a610b646111a3565b82611376565b50565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000610be083610bdb6111a3565b610f6e565b905081811015610c25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1c90612abf565b60405180910390fd5b610c3983610c316111a3565b8484036111ab565b610c438383611376565b505050565b610c797f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610c746111a3565b610cf1565b610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf90612b51565b60405180910390fd5b610cc0611adb565b565b6000610ce98260016000868152602001908152602001600020611b7e90919063ffffffff16565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b606060068054610d6a906126bc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d96906126bc565b8015610de35780601f10610db857610100808354040283529160200191610de3565b820191906000526020600020905b815481529060010190602001808311610dc657829003601f168201915b5050505050905090565b6000801b81565b60008060036000610e036111a3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610ec0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb790612be3565b60405180910390fd5b610ed4610ecb6111a3565b858584036111ab565b600191505092915050565b6000610ef3610eec6111a3565b848461154f565b6001905092915050565b6000610f1a60016000848152602001908152602001600020611b98565b9050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b610f4e826108af565b610f5f81610f5a6111a3565b6117d3565b610f6983836118a4565b505050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6110238282610cf1565b6110f557600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061109a6111a3565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000611121836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611bad565b905092915050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061119c575061119b82611c1d565b5b9050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561121b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121290612c75565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561128b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128290612d07565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113699190612417565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dd90612d99565b60405180910390fd5b6113f282600083611c87565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147090612e2b565b60405180910390fd5b818103600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600460008282546114d19190612e4b565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115369190612417565b60405180910390a361154a83600084611c97565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b690612ef1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561162f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162690612f83565b60405180910390fd5b61163a838383611c87565b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156116c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b890613015565b60405180910390fd5b818103600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461175691906128d3565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516117ba9190612417565b60405180910390a36117cd848484611c97565b50505050565b6117dd8282610cf1565b61186c576118028173ffffffffffffffffffffffffffffffffffffffff166014611c9c565b6118108360001c6020611c9c565b604051602001611821929190613109565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118639190612312565b60405180910390fd5b5050565b61187a8282611019565b61189f81600160008581526020019081526020016000206110f990919063ffffffff16565b505050565b6118ae8282611ed8565b6118d38160016000858152602001908152602001600020611fb990919063ffffffff16565b505050565b6118e0610b6d565b61191f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119169061318f565b60405180910390fd5b6000600760006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6119636111a3565b6040516119709190612632565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e1906131fb565b60405180910390fd5b6119f660008383611c87565b8060046000828254611a0891906128d3565b9250508190555080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a5e91906128d3565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611ac39190612417565b60405180910390a3611ad760008383611c97565b5050565b611ae3610b6d565b15611b23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1a90613267565b60405180910390fd5b6001600760006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b676111a3565b604051611b749190612632565b60405180910390a1565b6000611b8d8360000183611fe9565b60001c905092915050565b6000611ba682600001612014565b9050919050565b6000611bb98383612025565b611c12578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611c17565b600090505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611c92838383612048565b505050565b505050565b606060006002836002611caf9190613287565b611cb991906128d3565b67ffffffffffffffff811115611cd257611cd16132e1565b5b6040519080825280601f01601f191660200182016040528015611d045781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611d3c57611d3b613310565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611da057611d9f613310565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611de09190613287565b611dea91906128d3565b90505b6001811115611e8a577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611e2c57611e2b613310565b5b1a60f81b828281518110611e4357611e42613310565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611e839061333f565b9050611ded565b5060008414611ece576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ec5906133b5565b60405180910390fd5b8091505092915050565b611ee28282610cf1565b15611fb557600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f5a6111a3565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000611fe1836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6120a0565b905092915050565b600082600001828154811061200157612000613310565b5b9060005260206000200154905092915050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6120538383836121b4565b61205b610b6d565b1561209b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209290613447565b60405180910390fd5b505050565b600080836001016000848152602001908152602001600020549050600081146121a85760006001826120d29190612e4b565b90506000600186600001805490506120ea9190612e4b565b905081811461215957600086600001828154811061210b5761210a613310565b5b906000526020600020015490508087600001848154811061212f5761212e613310565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061216d5761216c613467565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506121ae565b60009150505b92915050565b505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6121f3816121be565b81146121fe57600080fd5b50565b600081359050612210816121ea565b92915050565b60006020828403121561222c5761222b6121b9565b5b600061223a84828501612201565b91505092915050565b60008115159050919050565b61225881612243565b82525050565b6000602082019050612273600083018461224f565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156122b3578082015181840152602081019050612298565b838111156122c2576000848401525b50505050565b6000601f19601f8301169050919050565b60006122e482612279565b6122ee8185612284565b93506122fe818560208601612295565b612307816122c8565b840191505092915050565b6000602082019050818103600083015261232c81846122d9565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061235f82612334565b9050919050565b61236f81612354565b811461237a57600080fd5b50565b60008135905061238c81612366565b92915050565b6000819050919050565b6123a581612392565b81146123b057600080fd5b50565b6000813590506123c28161239c565b92915050565b600080604083850312156123df576123de6121b9565b5b60006123ed8582860161237d565b92505060206123fe858286016123b3565b9150509250929050565b61241181612392565b82525050565b600060208201905061242c6000830184612408565b92915050565b60008060006060848603121561244b5761244a6121b9565b5b60006124598682870161237d565b935050602061246a8682870161237d565b925050604061247b868287016123b3565b9150509250925092565b6000819050919050565b61249881612485565b81146124a357600080fd5b50565b6000813590506124b58161248f565b92915050565b6000602082840312156124d1576124d06121b9565b5b60006124df848285016124a6565b91505092915050565b6124f181612485565b82525050565b600060208201905061250c60008301846124e8565b92915050565b60008060408385031215612529576125286121b9565b5b6000612537858286016124a6565b92505060206125488582860161237d565b9150509250929050565b600060ff82169050919050565b61256881612552565b82525050565b6000602082019050612583600083018461255f565b92915050565b60006020828403121561259f5761259e6121b9565b5b60006125ad848285016123b3565b91505092915050565b6000602082840312156125cc576125cb6121b9565b5b60006125da8482850161237d565b91505092915050565b600080604083850312156125fa576125f96121b9565b5b6000612608858286016124a6565b9250506020612619858286016123b3565b9150509250929050565b61262c81612354565b82525050565b60006020820190506126476000830184612623565b92915050565b60008060408385031215612664576126636121b9565b5b60006126728582860161237d565b92505060206126838582860161237d565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806126d457607f821691505b602082108114156126e8576126e761268d565b5b50919050565b7f45524332304d696e7465724275726e6572446563696d616c733a206d7573742060008201527f68617665206275726e657220726f6c6520746f206275726e0000000000000000602082015250565b600061274a603883612284565b9150612755826126ee565b604082019050919050565b600060208201905081810360008301526127798161273d565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b60006127dc602883612284565b91506127e782612780565b604082019050919050565b6000602082019050818103600083015261280b816127cf565b9050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b600061286e602f83612284565b915061287982612812565b604082019050919050565b6000602082019050818103600083015261289d81612861565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006128de82612392565b91506128e983612392565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561291e5761291d6128a4565b5b828201905092915050565b7f45524332304d696e7465724275726e6572446563696d616c733a206d7573742060008201527f686176652070617573657220726f6c6520746f20756e70617573650000000000602082015250565b6000612985603b83612284565b915061299082612929565b604082019050919050565b600060208201905081810360008301526129b481612978565b9050919050565b7f45524332304d696e7465724275726e6572446563696d616c733a206d7573742060008201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000602082015250565b6000612a17603883612284565b9150612a22826129bb565b604082019050919050565b60006020820190508181036000830152612a4681612a0a565b9050919050565b7f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000612aa9602483612284565b9150612ab482612a4d565b604082019050919050565b60006020820190508181036000830152612ad881612a9c565b9050919050565b7f45524332304d696e7465724275726e6572446563696d616c733a206d7573742060008201527f686176652070617573657220726f6c6520746f20706175736500000000000000602082015250565b6000612b3b603983612284565b9150612b4682612adf565b604082019050919050565b60006020820190508181036000830152612b6a81612b2e565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000612bcd602583612284565b9150612bd882612b71565b604082019050919050565b60006020820190508181036000830152612bfc81612bc0565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612c5f602483612284565b9150612c6a82612c03565b604082019050919050565b60006020820190508181036000830152612c8e81612c52565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612cf1602283612284565b9150612cfc82612c95565b604082019050919050565b60006020820190508181036000830152612d2081612ce4565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000612d83602183612284565b9150612d8e82612d27565b604082019050919050565b60006020820190508181036000830152612db281612d76565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000612e15602283612284565b9150612e2082612db9565b604082019050919050565b60006020820190508181036000830152612e4481612e08565b9050919050565b6000612e5682612392565b9150612e6183612392565b925082821015612e7457612e736128a4565b5b828203905092915050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612edb602583612284565b9150612ee682612e7f565b604082019050919050565b60006020820190508181036000830152612f0a81612ece565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000612f6d602383612284565b9150612f7882612f11565b604082019050919050565b60006020820190508181036000830152612f9c81612f60565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000612fff602683612284565b915061300a82612fa3565b604082019050919050565b6000602082019050818103600083015261302e81612ff2565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000613076601783613035565b915061308182613040565b601782019050919050565b600061309782612279565b6130a18185613035565b93506130b1818560208601612295565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006130f3601183613035565b91506130fe826130bd565b601182019050919050565b600061311482613069565b9150613120828561308c565b915061312b826130e6565b9150613137828461308c565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000613179601483612284565b915061318482613143565b602082019050919050565b600060208201905081810360008301526131a88161316c565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b60006131e5601f83612284565b91506131f0826131af565b602082019050919050565b60006020820190508181036000830152613214816131d8565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000613251601083612284565b915061325c8261321b565b602082019050919050565b6000602082019050818103600083015261328081613244565b9050919050565b600061329282612392565b915061329d83612392565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132d6576132d56128a4565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061334a82612392565b9150600082141561335e5761335d6128a4565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061339f602083612284565b91506133aa82613369565b602082019050919050565b600060208201905081810360008301526133ce81613392565b9050919050565b7f45524332305061757361626c653a20746f6b656e207472616e7366657220776860008201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b6000613431602a83612284565b915061343c826133d5565b604082019050919050565b6000602082019050818103600083015261346081613424565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220c3d4a4231a6c94cfb03623ea4b77df2c9ccfa487132bebf43620219e3dc2f4cf64736f6c63430008090033", - "storage": [] - } - ], - "params": { - "evm_denom": "token", - "extra_eips": [ - "ethereum_3855" - ], - "chain_config": { - "homestead_block": "0", - "dao_fork_block": "0", - "dao_fork_support": true, - "eip150_block": "0", - "eip150_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "eip155_block": "0", - "eip158_block": "0", - "byzantium_block": "0", - "constantinople_block": "0", - "petersburg_block": "0", - "istanbul_block": "0", - "muir_glacier_block": "0", - "berlin_block": "0", - "london_block": "0", - "arrow_glacier_block": "0", - "gray_glacier_block": "0", - "merge_netsplit_block": "0", - "shanghai_block": "0", - "cancun_block": "0" - }, - "allow_unprotected_txs": true, - "evm_channels": [ - "channel-10", - "channel-31", - "channel-83" - ], - "access_control": { - "create": { - "access_type": "ACCESS_TYPE_PERMISSIONLESS", - "access_control_list": [] - }, - "call": { - "access_type": "ACCESS_TYPE_PERMISSIONLESS", - "access_control_list": [] - } - }, - "active_static_precompiles": [ - "0x0000000000000000000000000000000000000100", - "0x0000000000000000000000000000000000000400", - "0x0000000000000000000000000000000000000800", - "0x0000000000000000000000000000000000000801", - "0x0000000000000000000000000000000000000802", - "0x0000000000000000000000000000000000000803", - "0x0000000000000000000000000000000000000804", - "0x0000000000000000000000000000000000000805" - ] - } - }, - "feegrant": { - "allowances": [] - }, - "feemarket": { - "params": { - "no_base_fee": false, - "base_fee_change_denominator": 8, - "elasticity_multiplier": 2, - "enable_height": "0", - "base_fee": "0", - "min_gas_price": "0.000000000000000000", - "min_gas_multiplier": "0.500000000000000000" - }, - "block_gas": "0" - }, - "genutil": { - "gen_txs": [] - }, - "gov": { - "starting_proposal_id": "1", - "deposits": [], - "votes": [], - "proposals": [], - "deposit_params": null, - "voting_params": null, - "tally_params": null, - "params": { - "min_deposit": [ - { - "denom": "token", - "amount": "1" - } - ], - "max_deposit_period": "172800s", - "voting_period": "10s", - "quorum": "0.334000000000000000", - "threshold": "0.500000000000000000", - "veto_threshold": "0.334000000000000000", - "min_initial_deposit_ratio": "0.000000000000000000", - "proposal_cancel_ratio": "0.500000000000000000", - "proposal_cancel_dest": "", - "expedited_voting_period": "5s", - "expedited_threshold": "0.667000000000000000", - "expedited_min_deposit": [ - { - "denom": "stake", - "amount": "50000000" - } - ], - "burn_vote_quorum": false, - "burn_proposal_deposit_prevote": false, - "burn_vote_veto": true, - "min_deposit_ratio": "0.010000000000000000" - }, - "constitution": "" - }, - "ibc": { - "client_genesis": { - "clients": [ - { - "client_id": "09-localhost", - "client_state": { - "@type": "/ibc.lightclients.localhost.v2.ClientState", - "latest_height": { - "revision_number": "1", - "revision_height": "7" - } - } - } - ], - "clients_consensus": [], - "clients_metadata": [], - "params": { - "allowed_clients": [ - "*" - ] - }, - "create_localhost": false, - "next_client_sequence": "0" - }, - "connection_genesis": { - "connections": [ - { - "id": "connection-localhost", - "client_id": "09-localhost", - "versions": [ - { - "identifier": "1", - "features": [ - "ORDER_ORDERED", - "ORDER_UNORDERED" - ] - } - ], - "state": "STATE_OPEN", - "counterparty": { - "client_id": "09-localhost", - "connection_id": "connection-localhost", - "prefix": { - "key_prefix": "aWJj" - } - }, - "delay_period": "0" - } - ], - "client_connection_paths": [], - "next_connection_sequence": "0", - "params": { - "max_expected_time_per_block": "30000000000" - } - }, - "channel_genesis": { - "channels": [], - "acknowledgements": [], - "commitments": [], - "receipts": [], - "send_sequences": [], - "recv_sequences": [], - "ack_sequences": [], - "next_channel_sequence": "0", - "params": { - "upgrade_timeout": { - "height": { - "revision_number": "0", - "revision_height": "0" - }, - "timestamp": "600000000000" - } - } - } - }, - "interchainaccounts": { - "controller_genesis_state": { - "active_channels": [], - "interchain_accounts": [], - "ports": [], - "params": { - "controller_enabled": true - } - }, - "host_genesis_state": { - "active_channels": [], - "interchain_accounts": [], - "port": "icahost", - "params": { - "host_enabled": true, - "allow_messages": [ - "*" - ] - } - } - }, - "poa": { - "params": {} - }, - "ratelimit": { - "params": {}, - "rate_limits": [], - "whitelisted_address_pairs": [], - "blacklisted_denoms": [], - "pending_send_packet_sequence_numbers": [], - "hour_epoch": { - "epoch_number": "17", - "duration": "3600s", - "epoch_start_time": "2024-11-27T17:00:00Z", - "epoch_start_height": "0" - } - }, - "slashing": { - "params": { - "signed_blocks_window": "100", - "min_signed_per_window": "0.500000000000000000", - "downtime_jail_duration": "600s", - "slash_fraction_double_sign": "0.000000000000000000", - "slash_fraction_downtime": "0.000000000000000000" - }, - "signing_infos": [ - { - "address": "ethmvalcons123s7tvluhrla7tpj5mwysxqlcgwwzwavxenru7", - "validator_signing_info": { - "address": "ethmvalcons123s7tvluhrla7tpj5mwysxqlcgwwzwavxenru7", - "start_height": "0", - "index_offset": "6", - "jailed_until": "1970-01-01T00:00:00Z", - "tombstoned": false, - "missed_blocks_counter": "0" - } - } - ], - "missed_blocks": [ - { - "address": "ethmvalcons123s7tvluhrla7tpj5mwysxqlcgwwzwavxenru7", - "missed_blocks": [] - } - ] - }, - "staking": { - "params": { - "unbonding_time": "60s", - "max_validators": 100, - "max_entries": 7, - "historical_entries": 10000, - "bond_denom": "apoa", - "min_commission_rate": "0.000000000000000000" - }, - "last_total_power": "1", - "last_validator_powers": [ - { - "address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "power": "1" - } - ], - "validators": [ - { - "operator_address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "consensus_pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "x39TSSHGypcFLoD91nkVBQTiRT/KcVnnvyJrnXn0Bps=" - }, - "jailed": false, - "status": "BOND_STATUS_BONDED", - "tokens": "1000000", - "delegator_shares": "1000000.000000000000000000", - "description": { - "moniker": "localnet", - "identity": "", - "website": "", - "security_contact": "", - "details": "" - }, - "unbonding_height": "0", - "unbonding_time": "1970-01-01T00:00:00Z", - "commission": { - "commission_rates": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "update_time": "2024-11-27T17:14:04.871328Z" - }, - "min_self_delegation": "1", - "unbonding_on_hold_ref_count": "0", - "unbonding_ids": [] - } - ], - "delegations": [ - { - "delegator_address": "ethm1dakgyqjulg29m5fmv992g2y66m9g2mjn6hahwg", - "validator_address": "ethmvaloper1dakgyqjulg29m5fmv992g2y66m9g2mjn48hmk4", - "shares": "1000000.000000000000000000" - } - ], - "unbonding_delegations": [], - "redelegations": [], - "exported": true - }, - "transfer": { - "port_id": "transfer", - "denom_traces": [], - "params": { - "send_enabled": true, - "receive_enabled": true - }, - "total_escrowed": [] - }, - "upgrade": {} - }, - "consensus": { - "validators": [ - { - "address": "5461E5B3FCB8FFDF2C32A6DC48181FC21CE13BAC", - "pub_key": { - "type": "tendermint/PubKeyEd25519", - "value": "x39TSSHGypcFLoD91nkVBQTiRT/KcVnnvyJrnXn0Bps=" - }, - "power": "1", - "name": "localnet" - } - ], - "params": { - "block": { - "max_bytes": 22020096, - "max_gas": 10500000 - }, - "evidence": { - "max_age_num_blocks": 100000, - "max_age_duration": 172800000000000, - "max_bytes": 1048576 - }, - "validator": { - "pub_key_types": [ - "ed25519" - ] - }, - "version": { - "app": 0 - }, - "abci": { - "vote_extensions_enable_height": 0 - } - } - } -} \ No newline at end of file diff --git a/testutil/integration/exrp/upgrade/abci.go b/testutil/integration/exrp/upgrade/abci.go deleted file mode 100644 index b3a82c9..0000000 --- a/testutil/integration/exrp/upgrade/abci.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package exrpupgrade - -import ( - "time" - - storetypes "cosmossdk.io/store/types" - abcitypes "github.com/cometbft/cometbft/abci/types" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - cmttypes "github.com/cometbft/cometbft/types" -) - -// NextBlock is a private helper function that runs the EndBlocker logic, commits the changes, -// updates the header and runs the BeginBlocker -func (n *UpgradeIntegrationNetwork) NextBlock() error { - return n.NextBlockAfter(time.Second) -} - -// NextBlockAfter is a private helper function that runs the FinalizeBlock logic, updates the context and -// commits the changes to have a block time after the given duration. -func (n *UpgradeIntegrationNetwork) NextBlockAfter(duration time.Duration) error { - _, err := n.finalizeBlockAndCommit(duration) - return err -} - -// NextBlockWithTxs is a helper function that runs the FinalizeBlock logic -// with the provided tx bytes, updates the context and -// commits the changes to have a block time after the given duration. -func (n *UpgradeIntegrationNetwork) NextBlockWithTxs(txBytes ...[]byte) (*abcitypes.ResponseFinalizeBlock, error) { - return n.finalizeBlockAndCommit(time.Second, txBytes...) -} - -// finalizeBlockAndCommit is a private helper function that runs the FinalizeBlock logic -// with the provided txBytes, updates the context and -// commits the changes to have a block time after the given duration. -func (n *UpgradeIntegrationNetwork) finalizeBlockAndCommit(duration time.Duration, txBytes ...[]byte) (*abcitypes.ResponseFinalizeBlock, error) { - header := n.ctx.BlockHeader() - // Update block header and BeginBlock - header.Height++ - header.AppHash = n.app.LastCommitID().Hash - // Calculate new block time after duration - newBlockTime := header.Time.Add(duration) - header.Time = newBlockTime - - // FinalizeBlock to run endBlock, deliverTx & beginBlock logic - req := BuildFinalizeBlockReq(header, n.valSet.Validators, txBytes...) - - res, err := n.app.FinalizeBlock(req) - if err != nil { - return nil, err - } - - newCtx := n.app.BaseApp.NewContextLegacy(false, header) - - // Update context header - newCtx = newCtx.WithMinGasPrices(n.ctx.MinGasPrices()) - newCtx = newCtx.WithKVGasConfig(n.ctx.KVGasConfig()) - newCtx = newCtx.WithTransientKVGasConfig(n.ctx.TransientKVGasConfig()) - newCtx = newCtx.WithConsensusParams(n.ctx.ConsensusParams()) - // This might have to be changed with time if we want to test gas limits - newCtx = newCtx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()) - newCtx = newCtx.WithVoteInfos(req.DecidedLastCommit.GetVotes()) - n.ctx = newCtx - - // commit changes - _, err = n.app.Commit() - - return res, err -} - -// buildFinalizeBlockReq is a helper function to build -// properly the FinalizeBlock request -func BuildFinalizeBlockReq(header cmtproto.Header, validators []*cmttypes.Validator, txs ...[]byte) *abcitypes.RequestFinalizeBlock { - // add validator's commit info to allocate corresponding tokens to validators - ci := GetCommitInfo(validators) - return &abcitypes.RequestFinalizeBlock{ - Misbehavior: nil, - Height: header.Height, - DecidedLastCommit: ci, - Hash: header.AppHash, - NextValidatorsHash: header.ValidatorsHash, - ProposerAddress: header.ProposerAddress, - Time: header.Time, - Txs: txs, - } -} - -func GetCommitInfo(validators []*cmttypes.Validator) abcitypes.CommitInfo { - voteInfos := make([]abcitypes.VoteInfo, len(validators)) - for i, val := range validators { - voteInfos[i] = abcitypes.VoteInfo{ - Validator: abcitypes.Validator{ - Address: val.Address, - Power: val.VotingPower, - }, - BlockIdFlag: cmtproto.BlockIDFlagCommit, - } - } - return abcitypes.CommitInfo{Votes: voteInfos} -} diff --git a/testutil/integration/exrp/upgrade/config.go b/testutil/integration/exrp/upgrade/config.go deleted file mode 100644 index c0d2705..0000000 --- a/testutil/integration/exrp/upgrade/config.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package exrpupgrade - -import ( - "os" - - exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" -) - -func DefaultUpgradeConfig() exrpcommon.Config { - return exrpcommon.DefaultConfig() -} - -// WithGenesisFile sets the genesis file for the network. -func WithGenesisFile(genesisFile string) exrpcommon.ConfigOption { - return func(cfg *exrpcommon.Config) { - genesisBytes, err := os.ReadFile(genesisFile) - if err != nil { - panic(err) - } - cfg.GenesisBytes = genesisBytes - } -} diff --git a/testutil/integration/exrp/upgrade/ibc.go b/testutil/integration/exrp/upgrade/ibc.go deleted file mode 100644 index 38b174c..0000000 --- a/testutil/integration/exrp/upgrade/ibc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package exrpupgrade - -import ( - "testing" - - ibctesting "github.com/cosmos/ibc-go/v10/testing" -) - -// GetIBCChain returns a TestChain instance for the given network. -// Note: the sender accounts are not populated. Do not use this accounts to send transactions during tests. -// The keyring should be used instead. -func (n *UpgradeIntegrationNetwork) GetIBCChain(t *testing.T, coord *ibctesting.Coordinator) *ibctesting.TestChain { - return &ibctesting.TestChain{ - TB: t, - Coordinator: coord, - ChainID: n.GetChainID(), - App: n.app, - TxConfig: n.app.GetTxConfig(), - Codec: n.app.AppCodec(), - Vals: n.valSet, - NextVals: n.valSet, - Signers: n.valSigners, - } -} diff --git a/testutil/integration/exrp/upgrade/keepers.go b/testutil/integration/exrp/upgrade/keepers.go deleted file mode 100644 index 13383f8..0000000 --- a/testutil/integration/exrp/upgrade/keepers.go +++ /dev/null @@ -1,60 +0,0 @@ -package exrpupgrade - -import ( - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - - erc20keeper "github.com/cosmos/evm/x/erc20/keeper" - feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" - evmkeeper "github.com/cosmos/evm/x/vm/keeper" - poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" -) - -func (n *UpgradeIntegrationNetwork) BankKeeper() bankkeeper.Keeper { - return n.app.BankKeeper -} - -func (n *UpgradeIntegrationNetwork) ERC20Keeper() erc20keeper.Keeper { - return n.app.Erc20Keeper -} - -func (n *UpgradeIntegrationNetwork) EvmKeeper() evmkeeper.Keeper { - return *n.app.EvmKeeper -} - -func (n *UpgradeIntegrationNetwork) GovKeeper() *govkeeper.Keeper { - return &n.app.GovKeeper -} - -func (n *UpgradeIntegrationNetwork) StakingKeeper() *stakingkeeper.Keeper { - return n.app.StakingKeeper -} - -func (n *UpgradeIntegrationNetwork) SlashingKeeper() slashingkeeper.Keeper { - return n.app.SlashingKeeper -} - -func (n *UpgradeIntegrationNetwork) DistrKeeper() distrkeeper.Keeper { - return n.app.DistrKeeper -} - -func (n *UpgradeIntegrationNetwork) AccountKeeper() authkeeper.AccountKeeper { - return n.app.AccountKeeper -} - -func (n *UpgradeIntegrationNetwork) AuthzKeeper() authzkeeper.Keeper { - return n.app.AuthzKeeper -} - -func (n *UpgradeIntegrationNetwork) FeeMarketKeeper() feemarketkeeper.Keeper { - return n.app.FeeMarketKeeper -} - -func (n *UpgradeIntegrationNetwork) PoaKeeper() poakeeper.Keeper { - return n.app.PoaKeeper -} diff --git a/testutil/integration/exrp/upgrade/network.go b/testutil/integration/exrp/upgrade/network.go deleted file mode 100644 index 91256bd..0000000 --- a/testutil/integration/exrp/upgrade/network.go +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package exrpupgrade - -import ( - "encoding/json" - "fmt" - "math" - "math/big" - "time" - - sdkmath "cosmossdk.io/math" - "github.com/xrplevm/node/v9/app" - exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" - - abcitypes "github.com/cometbft/cometbft/abci/types" - ed25519 "github.com/cometbft/cometbft/crypto/ed25519" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmversion "github.com/cometbft/cometbft/proto/tendermint/version" - cmttypes "github.com/cometbft/cometbft/types" - "github.com/cometbft/cometbft/version" - sdktypes "github.com/cosmos/cosmos-sdk/types" - sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - "github.com/cosmos/evm/types" -) - -// Network is the interface that wraps the methods to interact with integration test network. -// -// It was designed to avoid users to access module's keepers directly and force integration tests -// to be closer to the real user's behavior. -type Network interface { - exrpcommon.Network - - GetEIP155ChainID() *big.Int -} - -var _ Network = (*UpgradeIntegrationNetwork)(nil) - -// UpgradeIntegrationNetwork is the implementation of the Network interface for integration tests. -type UpgradeIntegrationNetwork struct { - cfg exrpcommon.Config - ctx sdktypes.Context - validators []stakingtypes.Validator - app *app.App - - // This is only needed for IBC chain testing setup - valSet *cmttypes.ValidatorSet - valSigners map[string]cmttypes.PrivValidator -} - -// New configures and initializes a new integration Network instance with -// the given configuration options. If no configuration options are provided -// it uses the default configuration. -// -// It panics if an error occurs. -func New(opts ...exrpcommon.ConfigOption) *UpgradeIntegrationNetwork { - cfg := DefaultUpgradeConfig() - // Modify the default config with the given options - for _, opt := range opts { - opt(&cfg) - } - - ctx := sdktypes.Context{} - network := &UpgradeIntegrationNetwork{ - cfg: cfg, - ctx: ctx, - validators: []stakingtypes.Validator{}, - } - - if cfg.GenesisBytes == nil { - panic("GenesisBytes is nil") - } - err := network.configureAndInitChain() - if err != nil { - panic(err) - } - return network -} - -func getValidatorsAndSignersFromCustomGenesisState( - stakingState stakingtypes.GenesisState, -) ( - *cmttypes.ValidatorSet, - map[string]cmttypes.PrivValidator, - []abcitypes.ValidatorUpdate, error, -) { - genesisValidators := stakingState.Validators - - tmValidators := make([]*cmttypes.Validator, 0, len(genesisValidators)) - validatorsUpdates := make([]abcitypes.ValidatorUpdate, 0, len(genesisValidators)) - valSigners := make(map[string]cmttypes.PrivValidator, len(genesisValidators)) - - // For each validator, we need to get the pubkey and create a new validator - for _, val := range genesisValidators { - pb, err := val.CmtConsPublicKey() - if err != nil { - return nil, nil, nil, err - } - pubKey := ed25519.PubKey(pb.GetEd25519()) - - validator := cmttypes.NewValidator(pubKey, 10000000) - tmValidators = append(tmValidators, validator) - validatorsUpdates = append(validatorsUpdates, abcitypes.ValidatorUpdate{ - PubKey: pb, - Power: val.GetConsensusPower(val.Tokens), - }) - } - - return cmttypes.NewValidatorSet(tmValidators), valSigners, validatorsUpdates, nil -} - -// configureAndInitChain initializes the network with the given configuration. -// It creates the genesis state and starts the network. -func (n *UpgradeIntegrationNetwork) configureAndInitChain() error { - // Create a new EvmosApp with the following params - exrpApp := exrpcommon.CreateExrpApp(n.cfg.ChainID, n.cfg.CustomBaseAppOpts...) - - var genesisState app.GenesisState - err := json.Unmarshal(n.cfg.GenesisBytes, &genesisState) - if err != nil { - return fmt.Errorf("error unmarshalling genesis state: %w", err) - } - - stateBytes, ok := genesisState["app_state"] - if !ok { - return fmt.Errorf("app_state not found in genesis state") - } - - var appState map[string]json.RawMessage - err = json.Unmarshal(genesisState["app_state"], &appState) - if err != nil { - return fmt.Errorf("error unmarshalling app state: %w", err) - } - - var stakingState stakingtypes.GenesisState - err = exrpApp.AppCodec().UnmarshalJSON(appState["staking"], &stakingState) - if err != nil { - return fmt.Errorf("error unmarshalling staking state: %w", err) - } - - valSet, valSigners, _, err := getValidatorsAndSignersFromCustomGenesisState(stakingState) - if err != nil { - return fmt.Errorf("error getting validators and signers from custom genesis state: %w", err) - } - - // Consensus module does not have a genesis state on the app, - // but can customize the consensus parameters of the chain on initialization - - var consensusState map[string]json.RawMessage - err = json.Unmarshal(genesisState["consensus"], &consensusState) - if err != nil { - return fmt.Errorf("error unmarshalling consensus state: %w", err) - } - - var consensusParams *cmtproto.ConsensusParams - err = json.Unmarshal(consensusState["params"], &consensusParams) - if err != nil { - return fmt.Errorf("error unmarshalling consensus params: %w", err) - } - - var initialHeight int64 - if err := json.Unmarshal(genesisState["initial_height"], &initialHeight); err != nil { - return fmt.Errorf("initial_height is not an int64") - } - - now := time.Now().UTC() - if _, err := exrpApp.InitChain( - &abcitypes.RequestInitChain{ - Time: now, - ChainId: n.cfg.ChainID, - Validators: []abcitypes.ValidatorUpdate{}, - ConsensusParams: consensusParams, - AppStateBytes: stateBytes, - InitialHeight: initialHeight, - }, - ); err != nil { - return err - } - - header := cmtproto.Header{ - ChainID: n.cfg.ChainID, - Height: initialHeight, - AppHash: exrpApp.LastCommitID().Hash, - Time: now, - ValidatorsHash: valSet.Hash(), - NextValidatorsHash: valSet.Hash(), - ProposerAddress: valSet.Proposer.Address, - Version: tmversion.Consensus{ - Block: version.BlockProtocol, - }, - } - - req := BuildFinalizeBlockReq(header, valSet.Validators, nil, nil) - if _, err := exrpApp.FinalizeBlock(req); err != nil { - return err - } - - // TODO - this might not be the best way to initilize the context - n.ctx = exrpApp.BaseApp.NewContextLegacy(false, header) - - // Commit genesis changes - if _, err := exrpApp.Commit(); err != nil { - return err - } - - // Set networks global parameters - var blockMaxGas uint64 = math.MaxUint64 - if consensusParams.Block != nil && consensusParams.Block.MaxGas > 0 { - blockMaxGas = uint64(consensusParams.Block.MaxGas) //nolint:gosec // G115 - } - - n.app = exrpApp - n.ctx = n.ctx.WithConsensusParams(*consensusParams) - n.ctx = n.ctx.WithBlockGasMeter(types.NewInfiniteGasMeterWithLimit(blockMaxGas)) - - n.validators = stakingState.Validators - n.valSet = valSet - n.valSigners = valSigners - - return nil -} - -// GetContext returns the network's context -func (n *UpgradeIntegrationNetwork) GetContext() sdktypes.Context { - return n.ctx -} - -// WithIsCheckTxCtx switches the network's checkTx property -func (n *UpgradeIntegrationNetwork) WithIsCheckTxCtx(isCheckTx bool) sdktypes.Context { - n.ctx = n.ctx.WithIsCheckTx(isCheckTx) - return n.ctx -} - -// GetChainID returns the network's chainID -func (n *UpgradeIntegrationNetwork) GetChainID() string { - return n.cfg.ChainID -} - -// GetEIP155ChainID returns the network EIp-155 chainID number -func (n *UpgradeIntegrationNetwork) GetEIP155ChainID() *big.Int { - return n.cfg.EIP155ChainID -} - -// GetDenom returns the network's denom -func (n *UpgradeIntegrationNetwork) GetDenom() string { - return n.cfg.Denom -} - -// GetBondDenom returns the network's bond denom -func (n *UpgradeIntegrationNetwork) GetBondDenom() string { - return n.cfg.BondDenom -} - -// GetOtherDenoms returns network's other supported denoms -func (n *UpgradeIntegrationNetwork) GetOtherDenoms() []string { - return n.cfg.OtherCoinDenom -} - -// GetValidators returns the network's validators -func (n *UpgradeIntegrationNetwork) GetValidators() []stakingtypes.Validator { - return n.validators -} - -// GetMinDepositAmt returns the network's min deposit amount -func (n *UpgradeIntegrationNetwork) GetMinDepositAmt() sdkmath.Int { - return n.cfg.MinDepositAmt -} - -// GetOtherDenoms returns network's other supported denoms -func (n *UpgradeIntegrationNetwork) GetEncodingConfig() sdktestutil.TestEncodingConfig { - return sdktestutil.TestEncodingConfig{ - InterfaceRegistry: n.app.InterfaceRegistry(), - Codec: n.app.AppCodec(), - TxConfig: n.app.GetTxConfig(), - Amino: n.app.LegacyAmino(), - } -} - -// BroadcastTxSync broadcasts the given txBytes to the network and returns the response. -// TODO - this should be change to gRPC -func (n *UpgradeIntegrationNetwork) BroadcastTxSync(txBytes []byte) (abcitypes.ExecTxResult, error) { - header := n.ctx.BlockHeader() - // Update block header and BeginBlock - header.Height++ - header.AppHash = n.app.LastCommitID().Hash - // Calculate new block time after duration - newBlockTime := header.Time.Add(time.Second) - header.Time = newBlockTime - - req := BuildFinalizeBlockReq(header, n.valSet.Validators, txBytes) - - // dont include the DecidedLastCommit because we're not committing the changes - // here, is just for broadcasting the tx. To persist the changes, use the - // NextBlock or NextBlockAfter functions - req.DecidedLastCommit = abcitypes.CommitInfo{} - - blockRes, err := n.app.BaseApp.FinalizeBlock(req) - if err != nil { - return abcitypes.ExecTxResult{}, err - } - if len(blockRes.TxResults) != 1 { - return abcitypes.ExecTxResult{}, fmt.Errorf("unexpected number of tx results. Expected 1, got: %d", len(blockRes.TxResults)) - } - return *blockRes.TxResults[0], nil -} - -// Simulate simulates the given txBytes to the network and returns the simulated response. -// TODO - this should be change to gRPC -func (n *UpgradeIntegrationNetwork) Simulate(txBytes []byte) (*txtypes.SimulateResponse, error) { - gas, result, err := n.app.BaseApp.Simulate(txBytes) - if err != nil { - return nil, err - } - return &txtypes.SimulateResponse{ - GasInfo: &gas, - Result: result, - }, nil -} - -// CheckTx calls the BaseApp's CheckTx method with the given txBytes to the network and returns the response. -func (n *UpgradeIntegrationNetwork) CheckTx(txBytes []byte) (*abcitypes.ResponseCheckTx, error) { - req := &abcitypes.RequestCheckTx{Tx: txBytes} - res, err := n.app.BaseApp.CheckTx(req) - if err != nil { - return nil, err - } - return res, nil -} diff --git a/testutil/integration/exrp/upgrade/unit_network.go b/testutil/integration/exrp/upgrade/unit_network.go deleted file mode 100644 index 2a5b6d0..0000000 --- a/testutil/integration/exrp/upgrade/unit_network.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package exrpupgrade - -import ( - sdktypes "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/evm/x/vm/statedb" - "github.com/ethereum/go-ethereum/common" - "github.com/xrplevm/node/v9/app" - exrpcommon "github.com/xrplevm/node/v9/testutil/integration/exrp/common" -) - -// UnitTestUpgradeNetwork is the implementation of the Network interface for unit tests. -// It embeds the IntegrationNetwork struct to reuse its methods and -// makes the App public for easier testing. -type UnitTestUpgradeNetwork struct { - UpgradeIntegrationNetwork - App *app.App -} - -var _ Network = (*UnitTestUpgradeNetwork)(nil) - -// NewUnitTestNetwork configures and initializes a new Evmos Network instance with -// the given configuration options. If no configuration options are provided -// it uses the default configuration. -// -// It panics if an error occurs. -// Note: Only uses for Unit Tests -func NewUnitTestUpgradeNetwork(opts ...exrpcommon.ConfigOption) *UnitTestUpgradeNetwork { - network := New(opts...) - return &UnitTestUpgradeNetwork{ - UpgradeIntegrationNetwork: *network, - App: network.app, - } -} - -// GetStateDB returns the state database for the current block. -func (n *UnitTestUpgradeNetwork) GetStateDB() *statedb.StateDB { - headerHash := n.GetContext().HeaderHash() - return statedb.New( - n.GetContext(), - n.App.EvmKeeper, - statedb.NewEmptyTxConfig(common.BytesToHash(headerHash)), - ) -} - -// FundAccount funds the given account with the given amount of coins. -func (n *UnitTestUpgradeNetwork) FundAccount(addr sdktypes.AccAddress, coins sdktypes.Coins) error { - ctx := n.GetContext() - - if err := n.app.BankKeeper.MintCoins(ctx, banktypes.ModuleName, coins); err != nil { - return err - } - - return n.app.BankKeeper.SendCoinsFromModuleToAccount(ctx, banktypes.ModuleName, addr, coins) -} From 8e1ebe0c5b1a58530a186041d0330f18192605cb Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 4 Sep 2025 13:38:01 +0200 Subject: [PATCH 47/66] fix: clean unused legacy types --- legacy/ethereum/eip712/eip712_legacy_test.go | 95 ------- legacy/ethereum/eip712/preprocess_test.go | 247 ------------------- legacy/types/account_test.go | 58 ----- legacy/types/benchmark_test.go | 17 -- legacy/types/chain_id_test.go | 87 ------- legacy/types/dynamic_fee.go | 13 - legacy/types/tests/test_utils.go | 40 --- legacy/types/validation_test.go | 144 ----------- 8 files changed, 701 deletions(-) delete mode 100644 legacy/ethereum/eip712/eip712_legacy_test.go delete mode 100644 legacy/ethereum/eip712/preprocess_test.go delete mode 100644 legacy/types/account_test.go delete mode 100644 legacy/types/benchmark_test.go delete mode 100644 legacy/types/chain_id_test.go delete mode 100644 legacy/types/dynamic_fee.go delete mode 100644 legacy/types/tests/test_utils.go delete mode 100644 legacy/types/validation_test.go diff --git a/legacy/ethereum/eip712/eip712_legacy_test.go b/legacy/ethereum/eip712/eip712_legacy_test.go deleted file mode 100644 index c280d00..0000000 --- a/legacy/ethereum/eip712/eip712_legacy_test.go +++ /dev/null @@ -1,95 +0,0 @@ -package eip712_test - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/evm/ethereum/eip712" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -func TestLegacyWrapTxToTypedData(t *testing.T) { - // Setup - cdc := codec.NewProtoCodec(types.NewInterfaceRegistry()) - - chainID := uint64(1) - msg := banktypes.NewMsgSend( - sdk.AccAddress([]byte("from_address")), - sdk.AccAddress([]byte("to_address")), - sdk.Coins{ - sdk.NewInt64Coin("stake", 1000), - }, - ) - - txData := map[string]interface{}{ - "account_number": "1", - "chain_id": "cosmoshub-4", - "fee": map[string]interface{}{ - "amount": []map[string]string{ - {"denom": "stake", "amount": "10"}, - }, - "gas": "200000", - }, - "memo": "Test Memo", - "msgs": []interface{}{ - map[string]interface{}{ - "type": "cosmos-sdk/MsgSend", - "value": map[string]string{ - "from_address": "from_address", - "to_address": "to_address", - "amount": "1000stake", - }, - }, - }, - "sequence": "1", - } - - data, err := json.Marshal(txData) - require.NoError(t, err) - - feeDelegation := &eip712.FeeDelegationOptions{ - FeePayer: sdk.AccAddress([]byte("fee_payer")), - } - - // Execute - typedData, err := eip712.LegacyWrapTxToTypedData(cdc, chainID, msg, data, feeDelegation) - - // Validate - require.NoError(t, err) - require.NotNil(t, typedData) - - // Check Domain - require.Equal(t, "Cosmos Web3", typedData.Domain.Name) - require.Equal(t, "1.0.0", typedData.Domain.Version) - require.Equal(t, "cosmos", typedData.Domain.VerifyingContract) - - // Check Message - message := typedData.Message - require.Equal(t, "1", message["account_number"]) - require.Equal(t, "cosmoshub-4", message["chain_id"]) - - fee := message["fee"].(map[string]interface{}) - require.Equal(t, sdk.AccAddress([]byte("fee_payer")).String(), fee["feePayer"]) - - require.Equal(t, "200000", fee["gas"]) - - msgs := message["msgs"].([]interface{}) - require.Len(t, msgs, 1) - - msgContent := msgs[0].(map[string]interface{}) - require.Equal(t, "cosmos-sdk/MsgSend", msgContent["type"]) - value := msgContent["value"].(map[string]interface{}) - require.Equal(t, "from_address", value["from_address"]) - require.Equal(t, "to_address", value["to_address"]) - require.Equal(t, "1000stake", value["amount"]) - - // Validate types structure - require.Contains(t, typedData.Types, "EIP712Domain") - require.Contains(t, typedData.Types, "Tx") -} diff --git a/legacy/ethereum/eip712/preprocess_test.go b/legacy/ethereum/eip712/preprocess_test.go deleted file mode 100644 index c0376fd..0000000 --- a/legacy/ethereum/eip712/preprocess_test.go +++ /dev/null @@ -1,247 +0,0 @@ -package eip712_test - -import ( - "encoding/hex" - "fmt" - "strings" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/evm/encoding" - "github.com/cosmos/evm/ethereum/eip712" - "github.com/cosmos/evm/testutil/constants" - utiltx "github.com/cosmos/evm/testutil/tx" - "github.com/cosmos/evm/types" - evmtypes "github.com/cosmos/evm/x/vm/types" - - "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec/address" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// Testing Constants -var ( - // chainID is used in EIP-712 tests. - chainID = uint64(constants.ExampleEIP155ChainID) - - ctx = client.Context{}.WithTxConfig( - encoding.MakeConfig(chainID).TxConfig, - ) - - // feePayerAddress is the address of the fee payer used in EIP-712 tests. - feePayerAddress = fmt.Sprintf( - "%s17xpfvakm2amg962yls6f84z3kell8c5lserqta", - constants.ExampleBech32Prefix, - ) -) - -type TestCaseStruct struct { - txBuilder client.TxBuilder - expectedFeePayer string - expectedGas uint64 - expectedFee math.Int - expectedMemo string - expectedMsg string - expectedSignatureBytes []byte -} - -func TestLedgerPreprocessing(t *testing.T) { - // Update bech32 prefix - sdk.GetConfig().SetBech32PrefixForAccount(constants.ExampleBech32Prefix, "") - evmConfigurator := evmtypes.NewEVMConfigurator(). - WithEVMCoinInfo(constants.ExampleChainCoinInfo[constants.ExampleChainID]) - err := evmConfigurator.Configure() - require.NoError(t, err) - - testCases := []TestCaseStruct{ - createBasicTestCase(t), - createPopulatedTestCase(t), - } - - for _, tc := range testCases { - // Run pre-processing - err := eip712.PreprocessLedgerTx( - chainID, - keyring.TypeLedger, - tc.txBuilder, - ) - - require.NoError(t, err) - - // Verify Web3 extension matches expected - hasExtOptsTx, ok := tc.txBuilder.(ante.HasExtensionOptionsTx) - require.True(t, ok) - require.True(t, len(hasExtOptsTx.GetExtensionOptions()) == 1) - - expectedExt := types.ExtensionOptionsWeb3Tx{ - TypedDataChainID: 9001, - FeePayer: feePayerAddress, - FeePayerSig: tc.expectedSignatureBytes, - } - - expectedExtAny, err := codectypes.NewAnyWithValue(&expectedExt) - require.NoError(t, err) - - actualExtAny := hasExtOptsTx.GetExtensionOptions()[0] - require.Equal(t, expectedExtAny, actualExtAny) - - // Verify signature type matches expected - signatures, err := tc.txBuilder.GetTx().GetSignaturesV2() - require.NoError(t, err) - require.Equal(t, len(signatures), 1) - - txSig := signatures[0].Data.(*signing.SingleSignatureData) - require.Equal(t, txSig.SignMode, signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) - - // Verify signature is blank - require.Equal(t, len(txSig.Signature), 0) - - // Verify tx fields are unchanged - tx := tc.txBuilder.GetTx() - - addrCodec := address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), - } - - txFeePayer, err := addrCodec.BytesToString(tx.FeePayer()) - require.NoError(t, err) - - require.Equal(t, txFeePayer, tc.expectedFeePayer) - require.Equal(t, tx.GetGas(), tc.expectedGas) - require.Equal(t, tx.GetFee().AmountOf(evmtypes.GetEVMCoinDenom()), tc.expectedFee) - require.Equal(t, tx.GetMemo(), tc.expectedMemo) - - // Verify message is unchanged - if tc.expectedMsg != "" { - require.Equal(t, len(tx.GetMsgs()), 1) - require.Equal(t, tx.GetMsgs()[0].String(), tc.expectedMsg) - } else { - require.Equal(t, len(tx.GetMsgs()), 0) - } - } -} - -func TestBlankTxBuilder(t *testing.T) { - txBuilder := ctx.TxConfig.NewTxBuilder() - - err := eip712.PreprocessLedgerTx( - chainID, - keyring.TypeLedger, - txBuilder, - ) - - require.Error(t, err) -} - -func TestNonLedgerTxBuilder(t *testing.T) { - txBuilder := ctx.TxConfig.NewTxBuilder() - - err := eip712.PreprocessLedgerTx( - chainID, - keyring.TypeLocal, - txBuilder, - ) - - require.NoError(t, err) -} - -func TestInvalidChainId(t *testing.T) { - txBuilder := ctx.TxConfig.NewTxBuilder() - - err := eip712.PreprocessLedgerTx( - 0, - keyring.TypeLedger, - txBuilder, - ) - - require.Error(t, err) -} - -func createBasicTestCase(t *testing.T) TestCaseStruct { - t.Helper() - txBuilder := ctx.TxConfig.NewTxBuilder() - - feePayer, err := sdk.AccAddressFromBech32(feePayerAddress) - require.NoError(t, err) - - txBuilder.SetFeePayer(feePayer) - - // Create signature unrelated to payload for testing - signatureHex := strings.Repeat("01", 65) - signatureBytes, err := hex.DecodeString(signatureHex) - require.NoError(t, err) - - _, privKey := utiltx.NewAddrKey() - sigsV2 := signing.SignatureV2{ - PubKey: privKey.PubKey(), // Use unrelated public key for testing - Data: &signing.SingleSignatureData{ - SignMode: signing.SignMode_SIGN_MODE_DIRECT, - Signature: signatureBytes, - }, - Sequence: 0, - } - - err = txBuilder.SetSignatures(sigsV2) - require.NoError(t, err) - - return TestCaseStruct{ - txBuilder: txBuilder, - expectedFeePayer: feePayer.String(), - expectedGas: 0, - expectedFee: math.NewInt(0), - expectedMemo: "", - expectedMsg: "", - expectedSignatureBytes: signatureBytes, - } -} - -func createPopulatedTestCase(t *testing.T) TestCaseStruct { - t.Helper() - basicTestCase := createBasicTestCase(t) - txBuilder := basicTestCase.txBuilder - - gasLimit := uint64(200000) - memo := "" - feeAmount := math.NewInt(2000) - - txBuilder.SetFeeAmount(sdk.NewCoins( - sdk.NewCoin( - evmtypes.GetEVMCoinDenom(), - feeAmount, - ))) - - txBuilder.SetGasLimit(gasLimit) - txBuilder.SetMemo(memo) - - msgSend := banktypes.MsgSend{ - FromAddress: feePayerAddress, - ToAddress: "cosmos12luku6uxehhak02py4rcz65zu0swh7wjun6msa", - Amount: sdk.NewCoins( - sdk.NewCoin( - evmtypes.GetEVMCoinDenom(), - math.NewInt(10000000), - ), - ), - } - - err := txBuilder.SetMsgs(&msgSend) - require.NoError(t, err) - - return TestCaseStruct{ - txBuilder: txBuilder, - expectedFeePayer: basicTestCase.expectedFeePayer, - expectedGas: gasLimit, - expectedFee: feeAmount, - expectedMemo: memo, - expectedMsg: msgSend.String(), - expectedSignatureBytes: basicTestCase.expectedSignatureBytes, - } -} diff --git a/legacy/types/account_test.go b/legacy/types/account_test.go deleted file mode 100644 index 8ee125a..0000000 --- a/legacy/types/account_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package types_test - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - cryptocodec "github.com/evmos/evmos/v20/crypto/codec" - "github.com/evmos/evmos/v20/crypto/ethsecp256k1" - encodingcodec "github.com/evmos/evmos/v20/encoding/codec" - "github.com/evmos/evmos/v20/types" -) - -func init() { - amino := codec.NewLegacyAmino() - cryptocodec.RegisterCrypto(amino) -} - -type AccountTestSuite struct { - suite.Suite - - account *types.EthAccount - cdc codec.JSONCodec -} - -func (suite *AccountTestSuite) SetupTest() { - privKey, err := ethsecp256k1.GenerateKey() - suite.Require().NoError(err) - pubKey := privKey.PubKey() - addr := sdk.AccAddress(pubKey.Address()) - baseAcc := authtypes.NewBaseAccount(addr, pubKey, 10, 50) - suite.account = &types.EthAccount{ - BaseAccount: baseAcc, - CodeHash: common.Hash{}.String(), - } - - interfaceRegistry := codectypes.NewInterfaceRegistry() - encodingcodec.RegisterInterfaces(interfaceRegistry) - suite.cdc = codec.NewProtoCodec(interfaceRegistry) -} - -func TestAccountTestSuite(t *testing.T) { - suite.Run(t, new(AccountTestSuite)) -} - -func (suite *AccountTestSuite) TestAccountType() { - suite.account.CodeHash = common.BytesToHash(crypto.Keccak256(nil)).Hex() - suite.Require().Equal(types.AccountTypeEOA, suite.account.Type()) - suite.account.CodeHash = common.BytesToHash(crypto.Keccak256([]byte{1, 2, 3})).Hex() - suite.Require().Equal(types.AccountTypeContract, suite.account.Type()) -} diff --git a/legacy/types/benchmark_test.go b/legacy/types/benchmark_test.go deleted file mode 100644 index 8636ec5..0000000 --- a/legacy/types/benchmark_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package types - -import ( - "fmt" - "testing" -) - -func BenchmarkParseChainID(b *testing.B) { - b.ReportAllocs() - // Start at 1, for valid EIP155, see regexEIP155 variable. - for i := 1; i < b.N; i++ { - chainID := fmt.Sprintf("evmos_1-%d", i) - if _, err := ParseChainID(chainID); err != nil { - b.Fatal(err) - } - } -} diff --git a/legacy/types/chain_id_test.go b/legacy/types/chain_id_test.go deleted file mode 100644 index f7c6cfa..0000000 --- a/legacy/types/chain_id_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package types - -import ( - "math/big" - "strings" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestParseChainID(t *testing.T) { - testCases := []struct { - name string - chainID string - expError bool - expInt *big.Int - }{ - { - "valid chain-id, single digit", "evmos_1-1", false, big.NewInt(1), - }, - { - "valid chain-id, multiple digits", "aragonchain_256-1", false, big.NewInt(256), - }, - { - "invalid chain-id, double dash", "aragonchain-1-1", true, nil, - }, - { - "invalid chain-id, double underscore", "aragonchain_1_1", true, nil, - }, - { - "invalid chain-id, dash only", "-", true, nil, - }, - { - "invalid chain-id, undefined identifier and EIP155", "-1", true, nil, - }, - { - "invalid chain-id, undefined identifier", "_1-1", true, nil, - }, - { - "invalid chain-id, uppercases", "EVMOS_1-1", true, nil, - }, - { - "invalid chain-id, mixed cases", "Evmos_1-1", true, nil, - }, - { - "invalid chain-id, special chars", "$&*#!_1-1", true, nil, - }, - { - "invalid eip155 chain-id, cannot start with 0", "evmos_001-1", true, nil, - }, - { - "invalid eip155 chain-id, cannot invalid base", "evmos_0x212-1", true, nil, - }, - { - "invalid eip155 chain-id, non-integer", "evmos_evmos_9000-1", true, nil, - }, - { - "invalid epoch, undefined", "evmos_-", true, nil, - }, - { - "blank chain ID", " ", true, nil, - }, - { - "empty chain ID", "", true, nil, - }, - { - "empty content for chain id, eip155 and epoch numbers", "_-", true, nil, - }, - { - "long chain-id", "evmos_" + strings.Repeat("1", 45) + "-1", true, nil, - }, - } - - for _, tc := range testCases { - chainIDEpoch, err := ParseChainID(tc.chainID) - if tc.expError { - require.Error(t, err, tc.name) - require.Nil(t, chainIDEpoch) - - require.False(t, IsValidChainID(tc.chainID), tc.name) - } else { - require.NoError(t, err, tc.name) - require.Equal(t, tc.expInt, chainIDEpoch, tc.name) - require.True(t, IsValidChainID(tc.chainID)) - } - } -} diff --git a/legacy/types/dynamic_fee.go b/legacy/types/dynamic_fee.go deleted file mode 100644 index 75f399d..0000000 --- a/legacy/types/dynamic_fee.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - codectypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -// HasDynamicFeeExtensionOption returns true if the tx implements the `ExtensionOptionDynamicFeeTx` extension option. -func HasDynamicFeeExtensionOption(any *codectypes.Any) bool { - _, ok := any.GetCachedValue().(*ExtensionOptionDynamicFeeTx) - return ok -} diff --git a/legacy/types/tests/test_utils.go b/legacy/types/tests/test_utils.go deleted file mode 100644 index 3a1ae94..0000000 --- a/legacy/types/tests/test_utils.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package tests - -import ( - transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" -) - -var ( - UosmoDenomtrace = transfertypes.DenomTrace{ - Path: "transfer/channel-0", - BaseDenom: "uosmo", - } - UosmoIbcdenom = UosmoDenomtrace.IBCDenom() - - UatomDenomtrace = transfertypes.DenomTrace{ - Path: "transfer/channel-1", - BaseDenom: "uatom", - } - UatomIbcdenom = UatomDenomtrace.IBCDenom() - - UevmosDenomtrace = transfertypes.DenomTrace{ - Path: "transfer/channel-0", - BaseDenom: "aevmos", - } - UevmosIbcdenom = UevmosDenomtrace.IBCDenom() - - UatomOsmoDenomtrace = transfertypes.DenomTrace{ - Path: "transfer/channel-0/transfer/channel-1", - BaseDenom: "uatom", - } - UatomOsmoIbcdenom = UatomOsmoDenomtrace.IBCDenom() - - AevmosDenomtrace = transfertypes.DenomTrace{ - Path: "transfer/channel-0", - BaseDenom: "aevmos", - } - AevmosIbcdenom = AevmosDenomtrace.IBCDenom() -) diff --git a/legacy/types/validation_test.go b/legacy/types/validation_test.go deleted file mode 100644 index b141a9f..0000000 --- a/legacy/types/validation_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package types_test - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - utiltx "github.com/evmos/evmos/v20/testutil/tx" - "github.com/evmos/evmos/v20/types" - "github.com/stretchr/testify/require" -) - -func TestIsEmptyHash(t *testing.T) { - testCases := []struct { - name string - hash string - expEmpty bool - }{ - { - "empty string", "", true, - }, - { - "zero hash", common.Hash{}.String(), true, - }, - - { - "non-empty hash", common.BytesToHash([]byte{1, 2, 3, 4}).String(), false, - }, - } - - for _, tc := range testCases { - require.Equal(t, tc.expEmpty, types.IsEmptyHash(tc.hash), tc.name) - } -} - -func TestIsZeroAddress(t *testing.T) { - testCases := []struct { - name string - address string - expEmpty bool - }{ - { - "empty string", "", true, - }, - { - "zero address", common.Address{}.String(), true, - }, - - { - "non-empty address", common.BytesToAddress([]byte{1, 2, 3, 4}).String(), false, - }, - } - - for _, tc := range testCases { - require.Equal(t, tc.expEmpty, types.IsZeroAddress(tc.address), tc.name) - } -} - -func TestValidateAddress(t *testing.T) { - testCases := []struct { - name string - address string - expError bool - }{ - { - "empty string", "", true, - }, - { - "invalid address", "0x", true, - }, - { - "zero address", common.Address{}.String(), false, - }, - { - "valid address", utiltx.GenerateAddress().Hex(), false, - }, - } - - for _, tc := range testCases { - err := types.ValidateAddress(tc.address) - - if tc.expError { - require.Error(t, err, tc.name) - } else { - require.NoError(t, err, tc.name) - } - } -} - -func TestValidateNonZeroAddress(t *testing.T) { - testCases := []struct { - name string - address string - expError bool - }{ - { - "empty string", "", true, - }, - { - "invalid address", "0x", true, - }, - { - "zero address", common.Address{}.String(), true, - }, - { - "valid address", utiltx.GenerateAddress().Hex(), false, - }, - } - - for _, tc := range testCases { - err := types.ValidateNonZeroAddress(tc.address) - - if tc.expError { - require.Error(t, err, tc.name) - } else { - require.NoError(t, err, tc.name) - } - } -} - -func TestSafeInt64(t *testing.T) { - testCases := []struct { - name string - value uint64 - expError bool - }{ - { - "no overflow", 10, false, - }, - { - "overflow", 18446744073709551615, true, - }, - } - - for _, tc := range testCases { - value, err := types.SafeInt64(tc.value) - if tc.expError { - require.Error(t, err, tc.name) - continue - } - - require.NoError(t, err, tc.name) - require.Equal(t, int64(tc.value), value, tc.name) //#nosec G115 - } -} From 04e6e73dece360ee16f3dabd801456ffefb90406 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 4 Sep 2025 13:42:42 +0200 Subject: [PATCH 48/66] fix(tests): remove deprecated upgrade testsuite and fix integration tests linting --- .golangci.yml | 4 ++ Dockerfile | 1 - Makefile | 6 +-- app/ante/ante_cosmos.go | 21 +++++----- app/ante/sigverify.go | 3 +- app/app.go | 3 +- app/simulation_test.go | 2 +- app/upgrades/v9/upgrades.go | 1 + cmd/exrpd/cmd/keyring.go | 1 - testutil/integration/exrp/common/setup.go | 41 ++++--------------- .../integration/exrp/integration/network.go | 7 ++-- 11 files changed, 32 insertions(+), 58 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index f83aaa0..8e63ebc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -46,6 +46,10 @@ linters-settings: allow-leading-space: true require-explanation: false require-specific: false + staticcheck: + checks: + - all + - '-SA1019' gofumpt: lang-version: "1.22" gomodguard: diff --git a/Dockerfile b/Dockerfile index b583ae7..efae1a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,6 @@ RUN make lint RUN make test-poa # Integration tests RUN make test-integration -RUN make test-upgrade # Simulation tests RUN make test-sim-benchmark-simulation RUN make test-sim-full-app-fast diff --git a/Makefile b/Makefile index c0d074c..8953692 100644 --- a/Makefile +++ b/Makefile @@ -140,11 +140,7 @@ mocks: @echo "--> Generating mocks" @./scripts/mockgen.sh -test: test-poa test-integration test-upgrade test-sim-benchmark-simulation test-sim-full-app-fast - -test-upgrade: - @echo "--> Running upgrade testsuite" - @go test -mod=readonly -tags=test -v ./tests/upgrade +test: test-poa test-integration test-sim-benchmark-simulation test-sim-full-app-fast test-integration: @echo "--> Running integration testsuite" diff --git a/app/ante/ante_cosmos.go b/app/ante/ante_cosmos.go index 9baf6fe..ce0f049 100644 --- a/app/ante/ante_cosmos.go +++ b/app/ante/ante_cosmos.go @@ -2,7 +2,6 @@ package ante import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/ante" ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante" cosmosante "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -12,23 +11,23 @@ import ( // newCosmosAnteHandler creates the default SDK ante handler for Cosmos transactions func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { return sdk.ChainAnteDecorators( - ante.NewSetUpContextDecorator(), - ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), + cosmosante.NewSetUpContextDecorator(), + cosmosante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), cosmosante.NewValidateBasicDecorator(), - ante.NewTxTimeoutHeightDecorator(), - ante.NewValidateMemoDecorator(options.AccountKeeper), - ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + cosmosante.NewTxTimeoutHeightDecorator(), + cosmosante.NewValidateMemoDecorator(options.AccountKeeper), + cosmosante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), cosmosante.NewDeductFeeDecorator( options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker, ), - ante.NewSetPubKeyDecorator(options.AccountKeeper), - ante.NewValidateSigCountDecorator(options.AccountKeeper), - ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), - ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), - ante.NewIncrementSequenceDecorator(options.AccountKeeper), + cosmosante.NewSetPubKeyDecorator(options.AccountKeeper), + cosmosante.NewValidateSigCountDecorator(options.AccountKeeper), + cosmosante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), + cosmosante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + cosmosante.NewIncrementSequenceDecorator(options.AccountKeeper), ibcante.NewRedundantRelayDecorator(options.IBCKeeper), evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), ) diff --git a/app/ante/sigverify.go b/app/ante/sigverify.go index 9230c47..cadc96d 100644 --- a/app/ante/sigverify.go +++ b/app/ante/sigverify.go @@ -23,7 +23,8 @@ const ( ) func SigVerificationGasConsumer( - meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error { + meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params, +) error { pubkey := sig.PubKey switch pubkey := pubkey.(type) { diff --git a/app/app.go b/app/app.go index 9379bdb..8c59455 100644 --- a/app/app.go +++ b/app/app.go @@ -1123,7 +1123,7 @@ func (app *App) GetStakingKeeperSDK() *stakingkeeper.Keeper { return app.StakingKeeper } -//func (app *App) GetMempool() sdkmempool.ExtMempool { +// func (app *App) GetMempool() sdkmempool.ExtMempool { // return app.EVMMempool //} @@ -1195,7 +1195,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(stakingtypes.ModuleName) paramsKeeper.Subspace(distrtypes.ModuleName) paramsKeeper.Subspace(slashingtypes.ModuleName) - //nolint:staticcheck paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) diff --git a/app/simulation_test.go b/app/simulation_test.go index 0da77ed..06acc23 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -44,7 +44,7 @@ const ( func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*app.App, error) { appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[flags.FlagHome] = app.DefaultNodeHome - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue //nolint:staticcheck + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue bApp := app.New( logger, diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index c69aefc..d1b3b32 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -74,6 +74,7 @@ func MigrateEvmModule(ctx sdk.Context, keys map[string]*storetypes.KVStoreKey, c eips := make([]int64, len(legacyEvmParams.ExtraEIPs)) for i, extraEIP := range legacyEvmParams.ExtraEIPs { + //nolint:staticcheck sanitized := strings.Trim(extraEIP, "ethereum_") intEIP, err := strconv.ParseInt(sanitized, 10, 64) if err != nil { diff --git a/cmd/exrpd/cmd/keyring.go b/cmd/exrpd/cmd/keyring.go index b38780c..d56e613 100644 --- a/cmd/exrpd/cmd/keyring.go +++ b/cmd/exrpd/cmd/keyring.go @@ -21,6 +21,5 @@ func CustomKeyringOption() keyring.Option { options.LedgerCreateKey = evmkeyring.CreatePubkey options.LedgerAppName = evmkeyring.AppName options.LedgerSigSkipDERConv = evmkeyring.SkipDERConversion - } } diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index 4342707..a259ea8 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -98,48 +98,23 @@ func MustGetIntegrationTestNodeHome() string { // createExrpApp creates an exrp app func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp)) *app.App { - testNodeHome := MustGetIntegrationTestNodeHome() // Create exrp app - db := dbm.NewMemDB() - logger := log.NewNopLogger() loadLatest := true - skipUpgradeHeights := map[int64]bool{} - homePath := testNodeHome + evmChainID := uint64(1440002) invCheckPeriod := uint(5) - appOptions := simutils.NewAppOptionsWithFlagHome(homePath) - baseAppOptions := append(customBaseAppOptions, baseapp.SetChainID(chainID)) //nolint:gocritic - exrpApp := app.New( - logger, - db, + return app.New( + log.NewNopLogger(), + dbm.NewMemDB(), nil, loadLatest, - skipUpgradeHeights, - homePath, + map[int64]bool{}, + MustGetIntegrationTestNodeHome(), evmChainID, invCheckPeriod, - appOptions, + simutils.NewAppOptionsWithFlagHome(MustGetIntegrationTestNodeHome()), app.EVMAppOptions, - baseAppOptions..., + append(customBaseAppOptions, baseapp.SetChainID(chainID))..., ) - - // Initialize EVM chain configuration for integration tests - evmConfigurator := evmtypes.NewEVMConfigurator() - // Reset configuration for test environments to allow multiple app instances - evmConfigurator.ResetTestConfig() - - // Configure EVM coin info with the proper denom - coinInfo := evmtypes.EvmCoinInfo{ - Denom: app.BaseDenom, - ExtendedDenom: app.BaseDenom, - DisplayDenom: app.DisplayDenom, - Decimals: evmtypes.EighteenDecimals, - } - err := evmConfigurator.WithEVMCoinInfo(coinInfo).Configure() - if err != nil { - panic(fmt.Sprintf("failed to configure EVM: %v", err)) - } - - return exrpApp } diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 4baa65c..6da068b 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -107,6 +107,7 @@ func (n *IntegrationNetwork) configureAndInitChain() error { // Create validator set with the amount of validators specified in the config // with the default power of 1. + //nolint:staticcheck valSet, valSigners := createValidatorSetAndSigners(n.cfg.AmountOfValidators) valFlags := make([]cmtproto.BlockIDFlag, len(valSet.Validators)) @@ -121,15 +122,15 @@ func (n *IntegrationNetwork) configureAndInitChain() error { } // Create genesis accounts and funded balances based on the config + //nolint:staticcheck genAccounts, fundedAccountBalances := getGenAccountsAndBalances(n.cfg, validators) + //nolint:staticcheck fundedAccountBalances = addBondedModuleAccountToFundedBalances( fundedAccountBalances, sdktypes.NewCoin(n.cfg.BondDenom, DefaultBondedAmount.Mul(sdkmath.NewInt(int64(n.cfg.AmountOfValidators)))), ) - delegations := createDelegations(validators) - // Create a new EvmosApp with the following params exrpApp := exrpcommon.CreateExrpApp(n.cfg.ChainID, n.cfg.CustomBaseAppOpts...) @@ -137,7 +138,7 @@ func (n *IntegrationNetwork) configureAndInitChain() error { denom: n.cfg.BondDenom, maxValidators: n.cfg.MaxValidators, validators: validators, - delegations: delegations, + delegations: createDelegations(validators), } govParams := GovCustomGenesisState{ denom: n.cfg.Denom, From 091bd2af536edd9748bec008c0ee95d1fc6951f8 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 11 Sep 2025 09:12:47 +0200 Subject: [PATCH 49/66] fix(app): app wiring --- app/app.go | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/app/app.go b/app/app.go index 8c59455..d42ce2c 100644 --- a/app/app.go +++ b/app/app.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/x/auth/posthandler" "github.com/ethereum/go-ethereum/common" @@ -50,7 +51,6 @@ import ( reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "github.com/cosmos/cosmos-sdk/runtime" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" - "github.com/cosmos/cosmos-sdk/x/auth/posthandler" "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" @@ -113,8 +113,6 @@ 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" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/keeper" ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts" icahost "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host" @@ -173,8 +171,8 @@ var ( erc20types.ModuleName: {authtypes.Minter, authtypes.Burner}, icatypes.ModuleName: nil, ratelimittypes.ModuleName: nil, - - poatypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + feemarkettypes.ModuleName: nil, + poatypes.ModuleName: {authtypes.Minter, authtypes.Burner}, } ) @@ -299,14 +297,13 @@ func New( authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, evidencetypes.StoreKey, - ibctransfertypes.StoreKey, capabilitytypes.StoreKey, crisistypes.StoreKey, consensusparamtypes.StoreKey, + ibctransfertypes.StoreKey, crisistypes.StoreKey, consensusparamtypes.StoreKey, icahosttypes.StoreKey, ratelimittypes.StoreKey, // Ethermint evmtypes.StoreKey, feemarkettypes.StoreKey, erc20types.StoreKey, ) tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey) - memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) app := &App{ BaseApp: bApp, @@ -316,7 +313,6 @@ func New( invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, - memKeys: memKeys, } authAddress := authtypes.NewModuleAddress(govtypes.ModuleName).String() @@ -500,7 +496,6 @@ func New( app.IBCKeeper.ChannelKeeper, // ICS4Wrapper ) // Create Transfer Keepers - // TODO: Update when migrating to v10 app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), @@ -694,7 +689,6 @@ func New( paramsclient.ProposalHandler, }, ), - // TODO: Update when migrating to v10 ibctransfertypes.ModuleName: transfer.AppModuleBasic{AppModuleBasic: &ibctransfer.AppModuleBasic{}}, }, ) @@ -713,7 +707,6 @@ func New( // NOTE: staking module is required if HistoricalEntries param > 0 app.mm.SetOrderBeginBlockers( // upgrades should be run first - capabilitytypes.ModuleName, erc20types.ModuleName, feemarkettypes.ModuleName, evmtypes.ModuleName, @@ -740,7 +733,6 @@ func New( ) genesisModuleOrder := []string{ - capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -809,7 +801,6 @@ func New( // initialize stores app.MountKVStores(keys) app.MountTransientStores(tkeys) - app.MountMemoryStores(memKeys) // initialize BaseApp app.SetInitChainer(app.InitChainer) @@ -923,9 +914,7 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { } func (app *App) setPostHandler() { - postHandler, err := posthandler.NewPostHandler( - posthandler.HandlerOptions{}, - ) + postHandler, err := posthandler.NewPostHandler(posthandler.HandlerOptions{}) if err != nil { panic(err) } From ed3117321a600ec8f3f91bd346063823f5e592f1 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 11 Sep 2025 09:15:47 +0200 Subject: [PATCH 50/66] fix(testutil): linting --- testutil/integration/exrp/integration/network.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/testutil/integration/exrp/integration/network.go b/testutil/integration/exrp/integration/network.go index 6da068b..0528eff 100644 --- a/testutil/integration/exrp/integration/network.go +++ b/testutil/integration/exrp/integration/network.go @@ -107,7 +107,6 @@ func (n *IntegrationNetwork) configureAndInitChain() error { // Create validator set with the amount of validators specified in the config // with the default power of 1. - //nolint:staticcheck valSet, valSigners := createValidatorSetAndSigners(n.cfg.AmountOfValidators) valFlags := make([]cmtproto.BlockIDFlag, len(valSet.Validators)) @@ -122,10 +121,8 @@ func (n *IntegrationNetwork) configureAndInitChain() error { } // Create genesis accounts and funded balances based on the config - //nolint:staticcheck genAccounts, fundedAccountBalances := getGenAccountsAndBalances(n.cfg, validators) - //nolint:staticcheck fundedAccountBalances = addBondedModuleAccountToFundedBalances( fundedAccountBalances, sdktypes.NewCoin(n.cfg.BondDenom, DefaultBondedAmount.Mul(sdkmath.NewInt(int64(n.cfg.AmountOfValidators)))), From 4ffc6f31a14ead0a2d556d22c4c44cce91b5016c Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 16 Sep 2025 15:19:04 +0200 Subject: [PATCH 51/66] fix(app): remove unused legacy types --- app/ante/ante.go | 51 -- app/ante/ante_cosmos.go | 34 -- app/ante/ante_evm.go | 18 - app/ante/handler_options.go | 67 --- app/ante/interfaces.go | 29 - app/ante/sigverify.go | 82 --- app/app.go | 20 +- app/encoding.go | 26 +- app/simulation_test.go | 28 +- .../v9/legacy}/evm/types/access_list.go | 0 .../v9/legacy}/evm/types/events.pb.go | 3 +- .../upgrades/v9/legacy}/evm/types/evm.pb.go | 9 +- .../v9/legacy}/evm/types/genesis.pb.go | 7 +- .../upgrades/v9/legacy}/evm/types/query.pb.go | 11 +- .../v9/legacy}/evm/types/query.pb.gw.go | 0 .../upgrades/v9/legacy}/evm/types/storage.go | 0 .../upgrades/v9/legacy}/evm/types/tx.pb.go | 9 +- .../upgrades/v9/legacy}/evm/types/tx.pb.gw.go | 0 .../upgrades/v9/legacy}/types/account.go | 0 .../upgrades/v9/legacy}/types/account.pb.go | 7 +- app/upgrades/v9/upgrades.go | 4 +- cmd/exrpd/cmd/keyring.go | 5 +- legacy/crypto/ethsecp256k1/ethsecp256k1.go | 249 --------- legacy/crypto/ethsecp256k1/keys.pb.go | 500 ------------------ legacy/crypto/hd/algorithm.go | 113 ---- legacy/ethereum/eip712/domain.go | 19 - legacy/ethereum/eip712/eip712.go | 34 -- legacy/ethereum/eip712/eip712_legacy.go | 438 --------------- legacy/ethereum/eip712/encoding.go | 229 -------- legacy/ethereum/eip712/encoding_legacy.go | 262 --------- legacy/ethereum/eip712/message.go | 152 ------ legacy/ethereum/eip712/preprocess.go | 87 --- legacy/ethereum/eip712/types.go | 389 -------------- legacy/types/block.go | 41 -- legacy/types/chain_id.go | 57 -- legacy/types/codec.go | 28 - legacy/types/coin.go | 50 -- legacy/types/dynamic_fee.pb.go | 323 ----------- legacy/types/errors.go | 14 - legacy/types/gasmeter.go | 108 ---- legacy/types/genesis.go | 14 - legacy/types/hdpath.go | 34 -- legacy/types/indexer.go | 21 - legacy/types/indexer.pb.go | 486 ----------------- legacy/types/int.go | 38 -- legacy/types/protocol.go | 11 - legacy/types/validation.go | 44 -- legacy/types/web3.pb.go | 399 -------------- 48 files changed, 56 insertions(+), 4494 deletions(-) delete mode 100644 app/ante/ante.go delete mode 100644 app/ante/ante_cosmos.go delete mode 100644 app/ante/ante_evm.go delete mode 100644 app/ante/handler_options.go delete mode 100644 app/ante/interfaces.go delete mode 100644 app/ante/sigverify.go rename {legacy => app/upgrades/v9/legacy}/evm/types/access_list.go (100%) rename {legacy => app/upgrades/v9/legacy}/evm/types/events.pb.go (99%) rename {legacy => app/upgrades/v9/legacy}/evm/types/evm.pb.go (99%) rename {legacy => app/upgrades/v9/legacy}/evm/types/genesis.pb.go (99%) rename {legacy => app/upgrades/v9/legacy}/evm/types/query.pb.go (99%) rename {legacy => app/upgrades/v9/legacy}/evm/types/query.pb.gw.go (100%) rename {legacy => app/upgrades/v9/legacy}/evm/types/storage.go (100%) rename {legacy => app/upgrades/v9/legacy}/evm/types/tx.pb.go (99%) rename {legacy => app/upgrades/v9/legacy}/evm/types/tx.pb.gw.go (100%) rename {legacy => app/upgrades/v9/legacy}/types/account.go (100%) rename {legacy => app/upgrades/v9/legacy}/types/account.pb.go (99%) delete mode 100644 legacy/crypto/ethsecp256k1/ethsecp256k1.go delete mode 100644 legacy/crypto/ethsecp256k1/keys.pb.go delete mode 100644 legacy/crypto/hd/algorithm.go delete mode 100644 legacy/ethereum/eip712/domain.go delete mode 100644 legacy/ethereum/eip712/eip712.go delete mode 100644 legacy/ethereum/eip712/eip712_legacy.go delete mode 100644 legacy/ethereum/eip712/encoding.go delete mode 100644 legacy/ethereum/eip712/encoding_legacy.go delete mode 100644 legacy/ethereum/eip712/message.go delete mode 100644 legacy/ethereum/eip712/preprocess.go delete mode 100644 legacy/ethereum/eip712/types.go delete mode 100644 legacy/types/block.go delete mode 100644 legacy/types/chain_id.go delete mode 100644 legacy/types/codec.go delete mode 100644 legacy/types/coin.go delete mode 100644 legacy/types/dynamic_fee.pb.go delete mode 100644 legacy/types/errors.go delete mode 100644 legacy/types/gasmeter.go delete mode 100644 legacy/types/genesis.go delete mode 100644 legacy/types/hdpath.go delete mode 100644 legacy/types/indexer.go delete mode 100644 legacy/types/indexer.pb.go delete mode 100644 legacy/types/int.go delete mode 100644 legacy/types/protocol.go delete mode 100644 legacy/types/validation.go delete mode 100644 legacy/types/web3.pb.go diff --git a/app/ante/ante.go b/app/ante/ante.go deleted file mode 100644 index a2c3916..0000000 --- a/app/ante/ante.go +++ /dev/null @@ -1,51 +0,0 @@ -package ante - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - authante "github.com/cosmos/cosmos-sdk/x/auth/ante" -) - -// NewAnteHandler routes Ethereum or SDK transactions to the appropriate handler -func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { - if err := options.Validate(); err != nil { - return nil, err - } - - return func(ctx sdk.Context, tx sdk.Tx, sim bool) (newCtx sdk.Context, err error) { - var anteHandler sdk.AnteHandler - - txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx) - if ok { - opts := txWithExtensions.GetExtensionOptions() - if len(opts) > 0 { - switch typeURL := opts[0].GetTypeUrl(); typeURL { - case "/cosmos.evm.vm.v1.ExtensionOptionsEthereumTx": - // handle as *evmtypes.MsgEthereumTx - anteHandler = newMonoEVMAnteHandler(options) - case "/cosmos.evm.types.v1.ExtensionOptionDynamicFeeTx": - // cosmos-sdk tx with dynamic fee extension - anteHandler = newCosmosAnteHandler(options) - default: - return ctx, errorsmod.Wrapf( - errortypes.ErrUnknownExtensionOptions, - "rejecting tx with unsupported extension option: %s", typeURL, - ) - } - - return anteHandler(ctx, tx, sim) - } - } - - // handle as totally normal Cosmos SDK tx - switch tx.(type) { - case sdk.Tx: - anteHandler = newCosmosAnteHandler(options) - default: - return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid transaction type: %T", tx) - } - - return anteHandler(ctx, tx, sim) - }, nil -} diff --git a/app/ante/ante_cosmos.go b/app/ante/ante_cosmos.go deleted file mode 100644 index ce0f049..0000000 --- a/app/ante/ante_cosmos.go +++ /dev/null @@ -1,34 +0,0 @@ -package ante - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante" - - cosmosante "github.com/cosmos/cosmos-sdk/x/auth/ante" - evmante "github.com/cosmos/evm/ante/evm" -) - -// newCosmosAnteHandler creates the default SDK ante handler for Cosmos transactions -func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { - return sdk.ChainAnteDecorators( - cosmosante.NewSetUpContextDecorator(), - cosmosante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), - cosmosante.NewValidateBasicDecorator(), - cosmosante.NewTxTimeoutHeightDecorator(), - cosmosante.NewValidateMemoDecorator(options.AccountKeeper), - cosmosante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - cosmosante.NewDeductFeeDecorator( - options.AccountKeeper, - options.BankKeeper, - options.FeegrantKeeper, - options.TxFeeChecker, - ), - cosmosante.NewSetPubKeyDecorator(options.AccountKeeper), - cosmosante.NewValidateSigCountDecorator(options.AccountKeeper), - cosmosante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), - cosmosante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), - cosmosante.NewIncrementSequenceDecorator(options.AccountKeeper), - ibcante.NewRedundantRelayDecorator(options.IBCKeeper), - evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), - ) -} diff --git a/app/ante/ante_evm.go b/app/ante/ante_evm.go deleted file mode 100644 index 9fd759a..0000000 --- a/app/ante/ante_evm.go +++ /dev/null @@ -1,18 +0,0 @@ -package ante - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - evmante "github.com/cosmos/evm/ante/evm" -) - -// newMonoEVMAnteHandler creates the sdk.AnteHandler for EVM transactions -func newMonoEVMAnteHandler(options HandlerOptions) sdk.AnteHandler { - return sdk.ChainAnteDecorators( - evmante.NewEVMMonoDecorator( - options.AccountKeeper, - options.FeeMarketKeeper, - options.EvmKeeper, - options.MaxTxGasWanted, - ), - ) -} diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go deleted file mode 100644 index 785af70..0000000 --- a/app/ante/handler_options.go +++ /dev/null @@ -1,67 +0,0 @@ -package ante - -import ( - errorsmod "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/ante" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - evmante "github.com/cosmos/evm/ante" - ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" - - txsigning "cosmossdk.io/x/tx/signing" - - anteinterfaces "github.com/cosmos/evm/ante/interfaces" -) - -type HandlerOptions struct { - Cdc codec.BinaryCodec - AccountKeeper anteinterfaces.AccountKeeper - BankKeeper anteinterfaces.BankKeeper - IBCKeeper *ibckeeper.Keeper - FeeMarketKeeper anteinterfaces.FeeMarketKeeper - EvmKeeper anteinterfaces.EVMKeeper - FeegrantKeeper ante.FeegrantKeeper - ExtensionOptionChecker ante.ExtensionOptionChecker - SignModeHandler *txsigning.HandlerMap - SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error - MaxTxGasWanted uint64 - TxFeeChecker ante.TxFeeChecker - StakingKeeper StakingKeeper - DistributionKeeper DistributionKeeper - ExtraDecorator sdk.AnteDecorator - AuthzDisabledMsgTypes []string - PendingTxListener evmante.PendingTxListener -} - -// Validate checks if the keepers are defined -func (options *HandlerOptions) Validate() error { - if options.Cdc == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "codec is required for ante builder") - } - if options.AccountKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "account keeper is required for ante builder") - } - if options.BankKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "bank keeper is required for ante builder") - } - if options.SignModeHandler == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "sign mode handler is required for ante builder") - } - if options.EvmKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "evm keeper is required for ante builder") - } - if options.FeeMarketKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "feemarket keeper is required for ante builder") - } - if options.StakingKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "staking keeper is required for AnteHandler") - } - if options.DistributionKeeper == nil { - return errorsmod.Wrap(errortypes.ErrLogic, "distribution keeper is required for AnteHandler") - } - return nil -} diff --git a/app/ante/interfaces.go b/app/ante/interfaces.go deleted file mode 100644 index 07aed38..0000000 --- a/app/ante/interfaces.go +++ /dev/null @@ -1,29 +0,0 @@ -package ante - -import ( - "context" - - addresscodec "cosmossdk.io/core/address" - sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -// BankKeeper defines the exposed interface for using functionality of the bank keeper -// in the context of the AnteHandler utils package. -type BankKeeper interface { - GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin -} - -// DistributionKeeper defines the exposed interface for using functionality of the distribution -// keeper in the context of the AnteHandler utils package. -type DistributionKeeper interface { - WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) -} - -// StakingKeeper defines the exposed interface for using functionality of the staking keeper -// in the context of the AnteHandler utils package. -type StakingKeeper interface { - BondDenom(ctx context.Context) (string, error) - ValidatorAddressCodec() addresscodec.Codec - IterateDelegations(ctx context.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) error -} diff --git a/app/ante/sigverify.go b/app/ante/sigverify.go deleted file mode 100644 index cadc96d..0000000 --- a/app/ante/sigverify.go +++ /dev/null @@ -1,82 +0,0 @@ -package ante - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/crypto/types/multisig" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - evmethsecp256k1 "github.com/cosmos/evm/crypto/ethsecp256k1" - "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" -) - -var _ authante.SignatureVerificationGasConsumer = SigVerificationGasConsumer - -const ( - Secp256k1VerifyCost uint64 = 21000 -) - -func SigVerificationGasConsumer( - meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params, -) error { - pubkey := sig.PubKey - switch pubkey := pubkey.(type) { - - case *evmethsecp256k1.PubKey, *ethsecp256k1.PubKey: - // Ethereum keys - meter.ConsumeGas(Secp256k1VerifyCost, "ante verify: eth_secp256k1") - return nil - case *secp256k1.PubKey: - // Cosmos keys - meter.ConsumeGas(params.SigVerifyCostSecp256k1, "ante verify: secp256k1") - return nil - case *ed25519.PubKey: - // Validator keys - meter.ConsumeGas(params.SigVerifyCostED25519, "ante verify: ed25519") - return errorsmod.Wrap(errortypes.ErrInvalidPubKey, "ED25519 public keys are unsupported") - - case multisig.PubKey: - // Multisig keys - multisignature, ok := sig.Data.(*signing.MultiSignatureData) - if !ok { - return fmt.Errorf("expected %T, got, %T", &signing.MultiSignatureData{}, sig.Data) - } - return ConsumeMultisignatureVerificationGas(meter, multisignature, pubkey, params, sig.Sequence) - - default: - return errorsmod.Wrapf(errortypes.ErrInvalidPubKey, "unrecognized/unsupported public key type: %T", pubkey) - } -} - -// ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature -func ConsumeMultisignatureVerificationGas( - meter storetypes.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, - params authtypes.Params, accSeq uint64, -) error { - size := sig.BitArray.Count() - sigIndex := 0 - - for i := 0; i < size; i++ { - if !sig.BitArray.GetIndex(i) { - continue - } - sigV2 := signing.SignatureV2{ - PubKey: pubkey.GetPubKeys()[i], - Data: sig.Signatures[sigIndex], - Sequence: accSeq, - } - err := SigVerificationGasConsumer(meter, sigV2, params) - if err != nil { - return err - } - sigIndex++ - } - - return nil -} diff --git a/app/app.go b/app/app.go index d42ce2c..b0d7bc0 100644 --- a/app/app.go +++ b/app/app.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/x/auth/posthandler" "github.com/ethereum/go-ethereum/common" @@ -25,8 +26,9 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + ethante "github.com/cosmos/evm/ante/evm" - "github.com/xrplevm/node/v9/app/ante" + ante "github.com/cosmos/evm/evmd/ante" evmante "github.com/cosmos/evm/ante" etherminttypes "github.com/cosmos/evm/types" @@ -876,7 +878,7 @@ func New( // use Ethermint's custom AnteHandler func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { - handlerOpts := &ante.HandlerOptions{ + handlerOpts := &evmante.HandlerOptions{ Cdc: app.appCodec, AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, @@ -886,11 +888,9 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { IBCKeeper: app.IBCKeeper, FeeMarketKeeper: app.FeeMarketKeeper, SignModeHandler: txConfig.SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, + SigGasConsumer: evmante.SigVerificationGasConsumer, MaxTxGasWanted: maxGasWanted, TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), - StakingKeeper: app.StakingKeeper, - DistributionKeeper: app.DistrKeeper, ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), @@ -898,17 +898,14 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), }, - PendingTxListener: app.onPendingTx, + PendingTxListener: app.OnPendingTx, } if err := handlerOpts.Validate(); err != nil { panic(err) } - handler, err := ante.NewAnteHandler(*handlerOpts) - if err != nil { - panic(err) - } + handler := ante.NewAnteHandler(*handlerOpts) app.SetAnteHandler(handler) } @@ -918,7 +915,6 @@ func (app *App) setPostHandler() { if err != nil { panic(err) } - app.SetPostHandler(postHandler) } @@ -1207,7 +1203,7 @@ func (app *App) SimulationManager() *module.SimulationManager { return app.sm } -func (app *App) onPendingTx(hash common.Hash) { +func (app *App) OnPendingTx(hash common.Hash) { for _, listener := range app.pendingTxListeners { listener(hash) } diff --git a/app/encoding.go b/app/encoding.go index a05bbba..f143028 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,32 +3,24 @@ package app import ( "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec/address" - types2 "github.com/cosmos/cosmos-sdk/crypto/types" + legacytypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/types" + + amino "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdktestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - evmethsecp256k1 "github.com/cosmos/evm/crypto/ethsecp256k1" - evmtypes "github.com/cosmos/evm/types" - "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" - legacytypes "github.com/xrplevm/node/v9/legacy/types" - - amino "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/types" enccodec "github.com/cosmos/evm/encoding/codec" "github.com/cosmos/evm/ethereum/eip712" + evmtypes "github.com/cosmos/evm/types" erc20types "github.com/cosmos/evm/x/erc20/types" vmtypes "github.com/cosmos/evm/x/vm/types" "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/reflect/protoreflect" ) -// MakeEncodingConfig creates an EncodingConfig for testing -// func MakeEncodingConfig() params.EncodingConfig { -// return evmenc.MakeConfig(ModuleBasics) -// } - func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { cdc := amino.NewLegacyAmino() signingOptions := signing.Options{ @@ -57,14 +49,6 @@ func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { &evmtypes.EthAccount{}, // cosmos-evm &legacytypes.EthAccount{}, // evmos (legacy) ) - interfaceRegistry.RegisterImplementations((*types2.PubKey)(nil), - &evmethsecp256k1.PubKey{}, // cosmos-evm - ðsecp256k1.PubKey{}, // evmos (legacy) - ) - interfaceRegistry.RegisterImplementations((*types2.PrivKey)(nil), - &evmethsecp256k1.PrivKey{}, // cosmos-evm - ðsecp256k1.PrivKey{}, // evmos (legacy) - ) codec := amino.NewProtoCodec(interfaceRegistry) enccodec.RegisterLegacyAminoCodec(cdc) diff --git a/app/simulation_test.go b/app/simulation_test.go index 06acc23..82c4c00 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -13,9 +13,10 @@ import ( "github.com/cosmos/evm/ante" ethante "github.com/cosmos/evm/ante/evm" "github.com/cosmos/evm/crypto/ethsecp256k1" + evmante "github.com/cosmos/evm/evmd/ante" etherminttypes "github.com/cosmos/evm/types" "github.com/xrplevm/node/v9/app" - xrplevmante "github.com/xrplevm/node/v9/app/ante" + poaante "github.com/xrplevm/node/v9/x/poa/ante" dbm "github.com/cosmos/cosmos-db" @@ -59,7 +60,7 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap app.EVMAppOptions, baseapp.SetChainID(config.ChainID), ) - handlerOpts := &xrplevmante.HandlerOptions{ + handlerOpts := &ante.HandlerOptions{ Cdc: bApp.AppCodec(), AccountKeeper: bApp.AccountKeeper, BankKeeper: bApp.BankKeeper, @@ -67,29 +68,26 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap EvmKeeper: bApp.EvmKeeper, FeegrantKeeper: bApp.FeeGrantKeeper, // TODO: Update when migrating to v10 - IBCKeeper: bApp.IBCKeeper, - FeeMarketKeeper: bApp.FeeMarketKeeper, - SignModeHandler: bApp.GetTxConfig().SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: 0, - TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), - StakingKeeper: bApp.StakingKeeper, - DistributionKeeper: bApp.DistrKeeper, - ExtraDecorator: poaante.NewPoaDecorator(), + IBCKeeper: bApp.IBCKeeper, + FeeMarketKeeper: bApp.FeeMarketKeeper, + SignModeHandler: bApp.GetTxConfig().SignModeHandler(), + SigGasConsumer: ante.SigVerificationGasConsumer, + MaxTxGasWanted: 0, + TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), + ExtraDecorator: poaante.NewPoaDecorator(), AuthzDisabledMsgTypes: []string{ sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), }, + PendingTxListener: bApp.OnPendingTx, } if err := handlerOpts.Validate(); err != nil { panic(err) } - handler, err := xrplevmante.NewAnteHandler(*handlerOpts) - if err != nil { - panic(err) - } + handler := evmante.NewAnteHandler(*handlerOpts) + bApp.SetAnteHandler(handler) if err := bApp.LoadLatestVersion(); err != nil { diff --git a/legacy/evm/types/access_list.go b/app/upgrades/v9/legacy/evm/types/access_list.go similarity index 100% rename from legacy/evm/types/access_list.go rename to app/upgrades/v9/legacy/evm/types/access_list.go diff --git a/legacy/evm/types/events.pb.go b/app/upgrades/v9/legacy/evm/types/events.pb.go similarity index 99% rename from legacy/evm/types/events.pb.go rename to app/upgrades/v9/legacy/evm/types/events.pb.go index 2a9b612..cace715 100644 --- a/legacy/evm/types/events.pb.go +++ b/app/upgrades/v9/legacy/evm/types/events.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/legacy/evm/types/evm.pb.go b/app/upgrades/v9/legacy/evm/types/evm.pb.go similarity index 99% rename from legacy/evm/types/evm.pb.go rename to app/upgrades/v9/legacy/evm/types/evm.pb.go index e6b6c37..7c3425d 100644 --- a/legacy/evm/types/evm.pb.go +++ b/app/upgrades/v9/legacy/evm/types/evm.pb.go @@ -4,14 +4,15 @@ package types import ( - cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + cosmossdk_io_math "cosmossdk.io/math" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/legacy/evm/types/genesis.pb.go b/app/upgrades/v9/legacy/evm/types/genesis.pb.go similarity index 99% rename from legacy/evm/types/genesis.pb.go rename to app/upgrades/v9/legacy/evm/types/genesis.pb.go index 64c04f2..8150b8c 100644 --- a/legacy/evm/types/genesis.pb.go +++ b/app/upgrades/v9/legacy/evm/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/legacy/evm/types/query.pb.go b/app/upgrades/v9/legacy/evm/types/query.pb.go similarity index 99% rename from legacy/evm/types/query.pb.go rename to app/upgrades/v9/legacy/evm/types/query.pb.go index 57f8e1d..d3eb16b 100644 --- a/legacy/evm/types/query.pb.go +++ b/app/upgrades/v9/legacy/evm/types/query.pb.go @@ -5,8 +5,13 @@ package types import ( context "context" - cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + + cosmossdk_io_math "cosmossdk.io/math" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -19,10 +24,6 @@ import ( codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/legacy/evm/types/query.pb.gw.go b/app/upgrades/v9/legacy/evm/types/query.pb.gw.go similarity index 100% rename from legacy/evm/types/query.pb.gw.go rename to app/upgrades/v9/legacy/evm/types/query.pb.gw.go diff --git a/legacy/evm/types/storage.go b/app/upgrades/v9/legacy/evm/types/storage.go similarity index 100% rename from legacy/evm/types/storage.go rename to app/upgrades/v9/legacy/evm/types/storage.go diff --git a/legacy/evm/types/tx.pb.go b/app/upgrades/v9/legacy/evm/types/tx.pb.go similarity index 99% rename from legacy/evm/types/tx.pb.go rename to app/upgrades/v9/legacy/evm/types/tx.pb.go index 57b26ba..5d9657d 100644 --- a/legacy/evm/types/tx.pb.go +++ b/app/upgrades/v9/legacy/evm/types/tx.pb.go @@ -5,9 +5,13 @@ package types import ( context "context" - cosmossdk_io_math "cosmossdk.io/math" encoding_binary "encoding/binary" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + cosmossdk_io_math "cosmossdk.io/math" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -19,9 +23,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/legacy/evm/types/tx.pb.gw.go b/app/upgrades/v9/legacy/evm/types/tx.pb.gw.go similarity index 100% rename from legacy/evm/types/tx.pb.gw.go rename to app/upgrades/v9/legacy/evm/types/tx.pb.gw.go diff --git a/legacy/types/account.go b/app/upgrades/v9/legacy/types/account.go similarity index 100% rename from legacy/types/account.go rename to app/upgrades/v9/legacy/types/account.go diff --git a/legacy/types/account.pb.go b/app/upgrades/v9/legacy/types/account.pb.go similarity index 99% rename from legacy/types/account.pb.go rename to app/upgrades/v9/legacy/types/account.pb.go index 5664327..a2614cb 100644 --- a/legacy/types/account.pb.go +++ b/app/upgrades/v9/legacy/types/account.pb.go @@ -5,13 +5,14 @@ package types 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/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index d1b3b32..151d024 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -15,8 +15,8 @@ import ( erc20types "github.com/cosmos/evm/x/erc20/types" evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/common" - legacyevmtypes "github.com/xrplevm/node/v9/legacy/evm/types" - legacytypes "github.com/xrplevm/node/v9/legacy/types" + legacyevmtypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/evm/types" + legacytypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/types" ) func CreateUpgradeHandler( diff --git a/cmd/exrpd/cmd/keyring.go b/cmd/exrpd/cmd/keyring.go index d56e613..b86ec26 100644 --- a/cmd/exrpd/cmd/keyring.go +++ b/cmd/exrpd/cmd/keyring.go @@ -5,12 +5,11 @@ import ( cosmosLedger "github.com/cosmos/cosmos-sdk/crypto/ledger" evmhd "github.com/cosmos/evm/crypto/hd" evmkeyring "github.com/cosmos/evm/crypto/keyring" - legacyhd "github.com/xrplevm/node/v9/legacy/crypto/hd" ) var ( - SupportedAlgorithms = keyring.SigningAlgoList{evmhd.EthSecp256k1, legacyhd.EthSecp256k1} - SupportedAlgorithmsLedger = keyring.SigningAlgoList{evmhd.EthSecp256k1, legacyhd.EthSecp256k1} + SupportedAlgorithms = keyring.SigningAlgoList{evmhd.EthSecp256k1} + SupportedAlgorithmsLedger = keyring.SigningAlgoList{evmhd.EthSecp256k1} ) func CustomKeyringOption() keyring.Option { diff --git a/legacy/crypto/ethsecp256k1/ethsecp256k1.go b/legacy/crypto/ethsecp256k1/ethsecp256k1.go deleted file mode 100644 index 84d577b..0000000 --- a/legacy/crypto/ethsecp256k1/ethsecp256k1.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package ethsecp256k1 - -import ( - "bytes" - "crypto/ecdsa" - "crypto/subtle" - "fmt" - - errorsmod "cosmossdk.io/errors" - tmcrypto "github.com/cometbft/cometbft/crypto" - "github.com/cosmos/cosmos-sdk/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/ethereum/go-ethereum/crypto" - "github.com/xrplevm/node/v9/legacy/ethereum/eip712" -) - -const ( - // PrivKeySize defines the size of the PrivKey bytes - PrivKeySize = 32 - // PubKeySize defines the size of the PubKey bytes - PubKeySize = 33 - // KeyType is the string constant for the Secp256k1 algorithm - KeyType = "eth_secp256k1" -) - -// Amino encoding names -const ( - // PrivKeyName defines the amino encoding name for the EthSecp256k1 private key - PrivKeyName = "ethermint/PrivKeyEthSecp256k1" - // PubKeyName defines the amino encoding name for the EthSecp256k1 public key - PubKeyName = "ethermint/PubKeyEthSecp256k1" -) - -// ---------------------------------------------------------------------------- -// secp256k1 Private Key - -var ( - _ cryptotypes.PrivKey = &PrivKey{} - _ codec.AminoMarshaler = &PrivKey{} -) - -// GenerateKey generates a new random private key. It returns an error upon -// failure. -func GenerateKey() (*PrivKey, error) { - priv, err := crypto.GenerateKey() - if err != nil { - return nil, err - } - - return &PrivKey{ - Key: crypto.FromECDSA(priv), - }, nil -} - -// Bytes returns the byte representation of the ECDSA Private Key. -func (privKey PrivKey) Bytes() []byte { - bz := make([]byte, len(privKey.Key)) - copy(bz, privKey.Key) - - return bz -} - -// PubKey returns the ECDSA private key's public key. If the privkey is not valid -// it returns a nil value. -func (privKey PrivKey) PubKey() cryptotypes.PubKey { - ecdsaPrivKey, err := privKey.ToECDSA() - if err != nil { - return nil - } - - return &PubKey{ - Key: crypto.CompressPubkey(&ecdsaPrivKey.PublicKey), - } -} - -// Equals returns true if two ECDSA private keys are equal and false otherwise. -func (privKey PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool { - return privKey.Type() == other.Type() && subtle.ConstantTimeCompare(privKey.Bytes(), other.Bytes()) == 1 -} - -// Type returns eth_secp256k1 -func (privKey PrivKey) Type() string { - return KeyType -} - -// MarshalAmino overrides Amino binary marshaling. -func (privKey PrivKey) MarshalAmino() ([]byte, error) { - return privKey.Key, nil -} - -// UnmarshalAmino overrides Amino binary marshaling. -func (privKey *PrivKey) UnmarshalAmino(bz []byte) error { - if len(bz) != PrivKeySize { - return fmt.Errorf("invalid privkey size, expected %d got %d", PrivKeySize, len(bz)) - } - privKey.Key = bz - - return nil -} - -// MarshalAminoJSON overrides Amino JSON marshaling. -func (privKey PrivKey) MarshalAminoJSON() ([]byte, error) { - // When we marshal to Amino JSON, we don't marshal the "key" field itself, - // just its contents (i.e. the key bytes). - return privKey.MarshalAmino() -} - -// UnmarshalAminoJSON overrides Amino JSON marshaling. -func (privKey *PrivKey) UnmarshalAminoJSON(bz []byte) error { - return privKey.UnmarshalAmino(bz) -} - -// Sign creates a recoverable ECDSA signature on the secp256k1 curve over the -// provided hash of the message. The produced signature is 65 bytes -// where the last byte contains the recovery ID. -func (privKey PrivKey) Sign(digestBz []byte) ([]byte, error) { - // TODO: remove - if len(digestBz) != crypto.DigestLength { - digestBz = crypto.Keccak256Hash(digestBz).Bytes() - } - - key, err := privKey.ToECDSA() - if err != nil { - return nil, err - } - - return crypto.Sign(digestBz, key) -} - -// ToECDSA returns the ECDSA private key as a reference to ecdsa.PrivateKey type. -func (privKey PrivKey) ToECDSA() (*ecdsa.PrivateKey, error) { - return crypto.ToECDSA(privKey.Bytes()) -} - -// ---------------------------------------------------------------------------- -// secp256k1 Public Key - -var ( - _ cryptotypes.PubKey = &PubKey{} - _ codec.AminoMarshaler = &PubKey{} -) - -// Address returns the address of the ECDSA public key. -// The function will return an empty address if the public key is invalid. -func (pubKey PubKey) Address() tmcrypto.Address { - pubk, err := crypto.DecompressPubkey(pubKey.Key) - if err != nil { - return nil - } - - return tmcrypto.Address(crypto.PubkeyToAddress(*pubk).Bytes()) -} - -// Bytes returns the raw bytes of the ECDSA public key. -func (pubKey PubKey) Bytes() []byte { - bz := make([]byte, len(pubKey.Key)) - copy(bz, pubKey.Key) - - return bz -} - -// String implements the fmt.Stringer interface. -func (pubKey PubKey) String() string { - return fmt.Sprintf("EthPubKeySecp256k1{%X}", pubKey.Key) -} - -// Type returns eth_secp256k1 -func (pubKey PubKey) Type() string { - return KeyType -} - -// Equals returns true if the pubkey type is the same and their bytes are deeply equal. -func (pubKey PubKey) Equals(other cryptotypes.PubKey) bool { - return pubKey.Type() == other.Type() && bytes.Equal(pubKey.Bytes(), other.Bytes()) -} - -// MarshalAmino overrides Amino binary marshaling. -func (pubKey PubKey) MarshalAmino() ([]byte, error) { - return pubKey.Key, nil -} - -// UnmarshalAmino overrides Amino binary marshaling. -func (pubKey *PubKey) UnmarshalAmino(bz []byte) error { - if len(bz) != PubKeySize { - return errorsmod.Wrapf(errortypes.ErrInvalidPubKey, "invalid pubkey size, expected %d, got %d", PubKeySize, len(bz)) - } - pubKey.Key = bz - - return nil -} - -// MarshalAminoJSON overrides Amino JSON marshaling. -func (pubKey PubKey) MarshalAminoJSON() ([]byte, error) { - // When we marshal to Amino JSON, we don't marshal the "key" field itself, - // just its contents (i.e. the key bytes). - return pubKey.MarshalAmino() -} - -// UnmarshalAminoJSON overrides Amino JSON marshaling. -func (pubKey *PubKey) UnmarshalAminoJSON(bz []byte) error { - return pubKey.UnmarshalAmino(bz) -} - -// VerifySignature verifies that the ECDSA public key created a given signature over -// the provided message. It will calculate the Keccak256 hash of the message -// prior to verification and approve verification if the signature can be verified -// from either the original message or its EIP-712 representation. -// -// CONTRACT: The signature should be in [R || S] format. -func (pubKey PubKey) VerifySignature(msg, sig []byte) bool { - return pubKey.verifySignatureECDSA(msg, sig) || pubKey.verifySignatureAsEIP712(msg, sig) -} - -// Verifies the signature as an EIP-712 signature by first converting the message payload -// to EIP-712 object bytes, then performing ECDSA verification on the hash. This is to support -// signing a Cosmos payload using EIP-712. -func (pubKey PubKey) verifySignatureAsEIP712(msg, sig []byte) bool { - eip712Bytes, err := eip712.GetEIP712BytesForMsg(msg) - if err != nil { - return false - } - - if pubKey.verifySignatureECDSA(eip712Bytes, sig) { - return true - } - - // Try verifying the signature using the legacy EIP-712 encoding - legacyEIP712Bytes, err := eip712.LegacyGetEIP712BytesForMsg(msg) - if err != nil { - return false - } - - return pubKey.verifySignatureECDSA(legacyEIP712Bytes, sig) -} - -// Perform standard ECDSA signature verification for the given raw bytes and signature. -func (pubKey PubKey) verifySignatureECDSA(msg, sig []byte) bool { - if len(sig) == crypto.SignatureLength { - // remove recovery ID (V) if contained in the signature - sig = sig[:len(sig)-1] - } - - // the signature needs to be in [R || S] format when provided to VerifySignature - return crypto.VerifySignature(pubKey.Key, crypto.Keccak256Hash(msg).Bytes(), sig) -} diff --git a/legacy/crypto/ethsecp256k1/keys.pb.go b/legacy/crypto/ethsecp256k1/keys.pb.go deleted file mode 100644 index de61f7e..0000000 --- a/legacy/crypto/ethsecp256k1/keys.pb.go +++ /dev/null @@ -1,500 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/crypto/v1/ethsecp256k1/keys.proto - -package ethsecp256k1 - -import ( - fmt "fmt" - _ "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. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// PubKey defines a type alias for an ecdsa.PublicKey that implements -// Tendermint's PubKey interface. It represents the 33-byte compressed public -// key format. -type PubKey struct { - // key is the public key in byte form - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (m *PubKey) Reset() { *m = PubKey{} } -func (*PubKey) ProtoMessage() {} -func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_0c10cadcf35beb64, []int{0} -} -func (m *PubKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PubKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PubKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PubKey.Merge(m, src) -} -func (m *PubKey) XXX_Size() int { - return m.Size() -} -func (m *PubKey) XXX_DiscardUnknown() { - xxx_messageInfo_PubKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PubKey proto.InternalMessageInfo - -func (m *PubKey) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -// PrivKey defines a type alias for an ecdsa.PrivateKey that implements -// Tendermint's PrivateKey interface. -type PrivKey struct { - // key is the private key in byte form - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (m *PrivKey) Reset() { *m = PrivKey{} } -func (m *PrivKey) String() string { return proto.CompactTextString(m) } -func (*PrivKey) ProtoMessage() {} -func (*PrivKey) Descriptor() ([]byte, []int) { - return fileDescriptor_0c10cadcf35beb64, []int{1} -} -func (m *PrivKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PrivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PrivKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PrivKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrivKey.Merge(m, src) -} -func (m *PrivKey) XXX_Size() int { - return m.Size() -} -func (m *PrivKey) XXX_DiscardUnknown() { - xxx_messageInfo_PrivKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PrivKey proto.InternalMessageInfo - -func (m *PrivKey) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func init() { - proto.RegisterType((*PubKey)(nil), "ethermint.crypto.v1.ethsecp256k1.PubKey") - proto.RegisterType((*PrivKey)(nil), "ethermint.crypto.v1.ethsecp256k1.PrivKey") -} - -func init() { - proto.RegisterFile("ethermint/crypto/v1/ethsecp256k1/keys.proto", fileDescriptor_0c10cadcf35beb64) -} - -var fileDescriptor_0c10cadcf35beb64 = []byte{ - // 197 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0x2d, 0xc9, 0x48, - 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x2f, 0x33, 0xd4, - 0x4f, 0x2d, 0xc9, 0x28, 0x4e, 0x4d, 0x2e, 0x30, 0x32, 0x35, 0xcb, 0x36, 0xd4, 0xcf, 0x4e, 0xad, - 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x80, 0x2b, 0xd6, 0x83, 0x28, 0xd6, 0x2b, - 0x33, 0xd4, 0x43, 0x56, 0x2c, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xac, 0x0f, 0x62, 0x41, - 0xf4, 0x29, 0x29, 0x70, 0xb1, 0x05, 0x94, 0x26, 0x79, 0xa7, 0x56, 0x0a, 0x09, 0x70, 0x31, 0x67, - 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x81, 0x98, 0x56, 0x2c, 0x33, 0x16, 0xc8, - 0x33, 0x28, 0x49, 0x73, 0xb1, 0x07, 0x14, 0x65, 0x96, 0x61, 0x55, 0xe2, 0xe4, 0x71, 0xe2, 0x91, - 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, - 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x7a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, - 0xc9, 0xf9, 0xb9, 0xfa, 0xa9, 0x65, 0xb9, 0xf9, 0xc5, 0x50, 0xb2, 0xcc, 0xc8, 0x00, 0xe6, 0x1d, - 0x64, 0xe7, 0x25, 0xb1, 0x81, 0xdd, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x82, 0x9c, 0x2b, - 0x6e, 0xf6, 0x00, 0x00, 0x00, -} - -func (m *PubKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PubKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PrivKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PrivKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { - offset -= sovKeys(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PubKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *PrivKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func sovKeys(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozKeys(x uint64) (n int) { - return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PubKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PrivKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PrivKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PrivKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipKeys(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthKeys - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupKeys - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthKeys - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") -) diff --git a/legacy/crypto/hd/algorithm.go b/legacy/crypto/hd/algorithm.go deleted file mode 100644 index 9625a6f..0000000 --- a/legacy/crypto/hd/algorithm.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package hd - -import ( - "github.com/btcsuite/btcd/btcutil/hdkeychain" - "github.com/btcsuite/btcd/chaincfg" - bip39 "github.com/tyler-smith/go-bip39" - - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/crypto" - - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - - "github.com/xrplevm/node/v9/legacy/crypto/ethsecp256k1" -) - -const ( - // EthSecp256k1Type defines the ECDSA secp256k1 used on Ethereum - EthSecp256k1Type = hd.PubKeyType(ethsecp256k1.KeyType) -) - -var ( - // SupportedAlgorithms defines the list of signing algorithms used on Evmos: - // - eth_secp256k1 (Ethereum) - // - secp256k1 (Tendermint) - SupportedAlgorithms = keyring.SigningAlgoList{EthSecp256k1, hd.Secp256k1} - // SupportedAlgorithmsLedger defines the list of signing algorithms used on Evmos for the Ledger device: - // - eth_secp256k1 (Ethereum) - // - secp256k1 (Tendermint) - SupportedAlgorithmsLedger = keyring.SigningAlgoList{EthSecp256k1, hd.Secp256k1} -) - -// EthSecp256k1Option defines a function keys options for the ethereum Secp256k1 curve. -// It supports eth_secp256k1 and secp256k1 keys for accounts. -func EthSecp256k1Option() keyring.Option { - return func(options *keyring.Options) { - options.SupportedAlgos = SupportedAlgorithms - options.SupportedAlgosLedger = SupportedAlgorithmsLedger - } -} - -var ( - _ keyring.SignatureAlgo = EthSecp256k1 - - // EthSecp256k1 uses the Bitcoin secp256k1 ECDSA parameters. - EthSecp256k1 = ethSecp256k1Algo{} -) - -type ethSecp256k1Algo struct{} - -// Name returns eth_secp256k1 -func (s ethSecp256k1Algo) Name() hd.PubKeyType { - return EthSecp256k1Type -} - -// Derive derives and returns the eth_secp256k1 private key for the given mnemonic and HD path. -func (s ethSecp256k1Algo) Derive() hd.DeriveFn { - return func(mnemonic, bip39Passphrase, path string) ([]byte, error) { - hdpath, err := accounts.ParseDerivationPath(path) - if err != nil { - return nil, err - } - - seed, err := bip39.NewSeedWithErrorChecking(mnemonic, bip39Passphrase) - if err != nil { - return nil, err - } - - // create a BTC-utils hd-derivation key chain - masterKey, err := hdkeychain.NewMaster(seed, &chaincfg.MainNetParams) - if err != nil { - return nil, err - } - - key := masterKey - for _, n := range hdpath { - key, err = key.Derive(n) - if err != nil { - return nil, err - } - } - - // btc-utils representation of a secp256k1 private key - privateKey, err := key.ECPrivKey() - if err != nil { - return nil, err - } - - // cast private key to a convertible form (single scalar field element of secp256k1) - // and then load into ethcrypto private key format. - // TODO: add links to godocs of the two methods or implementations of them, to compare equivalency - privateKeyECDSA := privateKey.ToECDSA() - derivedKey := crypto.FromECDSA(privateKeyECDSA) - - return derivedKey, nil - } -} - -// Generate generates a eth_secp256k1 private key from the given bytes. -func (s ethSecp256k1Algo) Generate() hd.GenerateFn { - return func(bz []byte) cryptotypes.PrivKey { - bzArr := make([]byte, ethsecp256k1.PrivKeySize) - copy(bzArr, bz) - - // TODO: modulo P - return ðsecp256k1.PrivKey{ - Key: bzArr, - } - } -} diff --git a/legacy/ethereum/eip712/domain.go b/legacy/ethereum/eip712/domain.go deleted file mode 100644 index 5b9552a..0000000 --- a/legacy/ethereum/eip712/domain.go +++ /dev/null @@ -1,19 +0,0 @@ -package eip712 - -import ( - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/signer/core/apitypes" -) - -// createEIP712Domain creates the typed data domain for the given chainID. -func createEIP712Domain(chainID uint64) apitypes.TypedDataDomain { - domain := apitypes.TypedDataDomain{ - Name: "Cosmos Web3", - Version: "1.0.0", - ChainId: math.NewHexOrDecimal256(int64(chainID)), // #nosec G115 - VerifyingContract: "cosmos", - Salt: "0", - } - - return domain -} diff --git a/legacy/ethereum/eip712/eip712.go b/legacy/ethereum/eip712/eip712.go deleted file mode 100644 index 0b3d998..0000000 --- a/legacy/ethereum/eip712/eip712.go +++ /dev/null @@ -1,34 +0,0 @@ -package eip712 - -import ( - "github.com/ethereum/go-ethereum/signer/core/apitypes" -) - -// WrapTxToTypedData wraps an Amino-encoded Cosmos Tx JSON SignDoc -// bytestream into an EIP712-compatible TypedData request. -func WrapTxToTypedData( - chainID uint64, - data []byte, -) (apitypes.TypedData, error) { - messagePayload, err := createEIP712MessagePayload(data) - message := messagePayload.message - if err != nil { - return apitypes.TypedData{}, err - } - - types, err := createEIP712Types(messagePayload) - if err != nil { - return apitypes.TypedData{}, err - } - - domain := createEIP712Domain(chainID) - - typedData := apitypes.TypedData{ - Types: types, - PrimaryType: txField, - Domain: domain, - Message: message, - } - - return typedData, nil -} diff --git a/legacy/ethereum/eip712/eip712_legacy.go b/legacy/ethereum/eip712/eip712_legacy.go deleted file mode 100644 index 9d8b6e8..0000000 --- a/legacy/ethereum/eip712/eip712_legacy.go +++ /dev/null @@ -1,438 +0,0 @@ -package eip712 - -import ( - "encoding/json" - "fmt" - "math/big" - "reflect" // #nosec G702 for sensitive import - "strings" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/signer/core/apitypes" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" -) - -type FeeDelegationOptions struct { - FeePayer sdk.AccAddress -} - -const ( - typeDefPrefix = "_" -) - -// LegacyWrapTxToTypedData is an ultimate method that wraps Amino-encoded Cosmos Tx JSON data -// into an EIP712-compatible TypedData request. -func LegacyWrapTxToTypedData( - cdc codectypes.AnyUnpacker, - chainID uint64, - msg sdk.Msg, - data []byte, - feeDelegation *FeeDelegationOptions, -) (apitypes.TypedData, error) { - txData := make(map[string]interface{}) - - if err := json.Unmarshal(data, &txData); err != nil { - return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to JSON unmarshal data") - } - - domain := apitypes.TypedDataDomain{ - Name: "Cosmos Web3", - Version: "1.0.0", - ChainId: math.NewHexOrDecimal256(int64(chainID)), //#nosec G115 -- int overflow is not a concern here - VerifyingContract: "cosmos", - Salt: "0", - } - - msgTypes, err := extractMsgTypes(cdc, "MsgValue", msg) - if err != nil { - return apitypes.TypedData{}, err - } - - if feeDelegation != nil { - feeInfo, ok := txData["fee"].(map[string]interface{}) - if !ok { - return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrInvalidType, "cannot parse fee from tx data") - } - - feeInfo["feePayer"] = feeDelegation.FeePayer.String() - - // also patching msgTypes to include feePayer - msgTypes["Fee"] = []apitypes.Type{ - {Name: "feePayer", Type: "string"}, - {Name: "amount", Type: "Coin[]"}, - {Name: "gas", Type: "string"}, - } - } - - typedData := apitypes.TypedData{ - Types: msgTypes, - PrimaryType: "Tx", - Domain: domain, - Message: txData, - } - - return typedData, nil -} - -func extractMsgTypes(cdc codectypes.AnyUnpacker, msgTypeName string, msg sdk.Msg) (apitypes.Types, error) { - rootTypes := apitypes.Types{ - "EIP712Domain": { - { - Name: "name", - Type: "string", - }, - { - Name: "version", - Type: "string", - }, - { - Name: "chainId", - Type: "uint256", - }, - { - Name: "verifyingContract", - Type: "string", - }, - { - Name: "salt", - Type: "string", - }, - }, - "Tx": { - {Name: "account_number", Type: "string"}, - {Name: "chain_id", Type: "string"}, - {Name: "fee", Type: "Fee"}, - {Name: "memo", Type: "string"}, - {Name: "msgs", Type: "Msg[]"}, - {Name: "sequence", Type: "string"}, - // Note timeout_height was removed because it was not getting filled with the legacyTx - // {Name: "timeout_height", Type: "string"}, - }, - "Fee": { - {Name: "amount", Type: "Coin[]"}, - {Name: "gas", Type: "string"}, - }, - "Coin": { - {Name: "denom", Type: "string"}, - {Name: "amount", Type: "string"}, - }, - "Msg": { - {Name: "type", Type: "string"}, - {Name: "value", Type: msgTypeName}, - }, - msgTypeName: {}, - } - - if err := walkFields(cdc, rootTypes, msgTypeName, msg); err != nil { - return nil, err - } - - return rootTypes, nil -} - -func walkFields(cdc codectypes.AnyUnpacker, typeMap apitypes.Types, rootType string, in interface{}) (err error) { - defer doRecover(&err) - - t := reflect.TypeOf(in) - v := reflect.ValueOf(in) - - for { - if t.Kind() == reflect.Ptr || - t.Kind() == reflect.Interface { - t = t.Elem() - v = v.Elem() - - continue - } - - break - } - - return legacyTraverseFields(cdc, typeMap, rootType, typeDefPrefix, t, v) -} - -type cosmosAnyWrapper struct { - Type string `json:"type"` - Value interface{} `json:"value"` -} - -func legacyTraverseFields( - cdc codectypes.AnyUnpacker, - typeMap apitypes.Types, - rootType string, - prefix string, - t reflect.Type, - v reflect.Value, -) error { - n := t.NumField() - - if prefix == typeDefPrefix { - if len(typeMap[rootType]) == n { - return nil - } - } else { - typeDef := sanitizeTypedef(prefix) - if len(typeMap[typeDef]) == n { - return nil - } - } - - for i := 0; i < n; i++ { - var ( - field reflect.Value - err error - ) - - if v.IsValid() { - field = v.Field(i) - } - - fieldType := t.Field(i).Type - fieldName := jsonNameFromTag(t.Field(i).Tag) - - if fieldType == cosmosAnyType { - // Unpack field, value as Any - if fieldType, field, err = unpackAny(cdc, field); err != nil { - return err - } - } - - // If field is an empty value, do not include in types, since it will not be present in the object - if field.IsZero() { - continue - } - - for { - if fieldType.Kind() == reflect.Ptr { - fieldType = fieldType.Elem() - - if field.IsValid() { - field = field.Elem() - } - - continue - } - - if fieldType.Kind() == reflect.Interface { - fieldType = reflect.TypeOf(field.Interface()) - continue - } - - if field.Kind() == reflect.Ptr { - field = field.Elem() - continue - } - - break - } - - var isCollection bool - if fieldType.Kind() == reflect.Array || fieldType.Kind() == reflect.Slice { - if field.Len() == 0 { - // skip empty collections from type mapping - continue - } - - fieldType = fieldType.Elem() - field = field.Index(0) - isCollection = true - - if fieldType == cosmosAnyType { - if fieldType, field, err = unpackAny(cdc, field); err != nil { - return err - } - } - } - - for { - if fieldType.Kind() == reflect.Ptr { - fieldType = fieldType.Elem() - - if field.IsValid() { - field = field.Elem() - } - - continue - } - - if fieldType.Kind() == reflect.Interface { - fieldType = reflect.TypeOf(field.Interface()) - continue - } - - if field.Kind() == reflect.Ptr { - field = field.Elem() - continue - } - - break - } - - fieldPrefix := fmt.Sprintf("%s.%s", prefix, fieldName) - - ethTyp := typToEth(fieldType) - - if len(ethTyp) > 0 { - // Support array of uint64 - if isCollection && fieldType.Kind() != reflect.Slice && fieldType.Kind() != reflect.Array { - ethTyp += "[]" - } - - if prefix == typeDefPrefix { - typeMap[rootType] = append(typeMap[rootType], apitypes.Type{ - Name: fieldName, - Type: ethTyp, - }) - } else { - typeDef := sanitizeTypedef(prefix) - typeMap[typeDef] = append(typeMap[typeDef], apitypes.Type{ - Name: fieldName, - Type: ethTyp, - }) - } - - continue - } - - if fieldType.Kind() == reflect.Struct { - var fieldTypedef string - - if isCollection { - fieldTypedef = sanitizeTypedef(fieldPrefix) + "[]" - } else { - fieldTypedef = sanitizeTypedef(fieldPrefix) - } - - if prefix == typeDefPrefix { - typeMap[rootType] = append(typeMap[rootType], apitypes.Type{ - Name: fieldName, - Type: fieldTypedef, - }) - } else { - typeDef := sanitizeTypedef(prefix) - typeMap[typeDef] = append(typeMap[typeDef], apitypes.Type{ - Name: fieldName, - Type: fieldTypedef, - }) - } - - if err := legacyTraverseFields(cdc, typeMap, rootType, fieldPrefix, fieldType, field); err != nil { - return err - } - - continue - } - } - - return nil -} - -func jsonNameFromTag(tag reflect.StructTag) string { - jsonTags := tag.Get("json") - parts := strings.Split(jsonTags, ",") - return parts[0] -} - -// Unpack the given Any value with Type/Value deconstruction -func unpackAny(cdc codectypes.AnyUnpacker, field reflect.Value) (reflect.Type, reflect.Value, error) { - anyData, ok := field.Interface().(*codectypes.Any) - if !ok { - return nil, reflect.Value{}, errorsmod.Wrapf(errortypes.ErrPackAny, "%T", field.Interface()) - } - - anyWrapper := &cosmosAnyWrapper{ - Type: anyData.TypeUrl, - } - - if err := cdc.UnpackAny(anyData, &anyWrapper.Value); err != nil { - return nil, reflect.Value{}, errorsmod.Wrap(err, "failed to unpack Any in msg struct") - } - - fieldType := reflect.TypeOf(anyWrapper) - field = reflect.ValueOf(anyWrapper) - - return fieldType, field, nil -} - -var ( - hashType = reflect.TypeOf(common.Hash{}) - addressType = reflect.TypeOf(common.Address{}) - bigIntType = reflect.TypeOf(big.Int{}) - cosmIntType = reflect.TypeOf(sdkmath.Int{}) - cosmDecType = reflect.TypeOf(sdkmath.LegacyDec{}) - timeType = reflect.TypeOf(time.Time{}) - cosmosAnyType = reflect.TypeOf(&codectypes.Any{}) - edType = reflect.TypeOf(ed25519.PubKey{}) -) - -// typToEth supports only basic types and arrays of basic types. -// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md -func typToEth(typ reflect.Type) string { - const str = "string" - - switch typ.Kind() { - case reflect.String: - return str - case reflect.Bool: - return "bool" - case reflect.Int: - return "int64" - case reflect.Int8: - return "int8" - case reflect.Int16: - return "int16" - case reflect.Int32: - return "int32" - case reflect.Int64: - return "int64" - case reflect.Uint: - return "uint64" - case reflect.Uint8: - return "uint8" - case reflect.Uint16: - return "uint16" - case reflect.Uint32: - return "uint32" - case reflect.Uint64: - return "uint64" - case reflect.Slice: - ethName := typToEth(typ.Elem()) - if len(ethName) > 0 { - return ethName + "[]" - } - case reflect.Array: - ethName := typToEth(typ.Elem()) - if len(ethName) > 0 { - return ethName + "[]" - } - case reflect.Ptr: - if typ.Elem().ConvertibleTo(bigIntType) || - typ.Elem().ConvertibleTo(timeType) || - typ.Elem().ConvertibleTo(edType) || - typ.Elem().ConvertibleTo(cosmDecType) || - typ.Elem().ConvertibleTo(cosmIntType) { - return str - } - case reflect.Struct: - if typ.ConvertibleTo(hashType) || - typ.ConvertibleTo(addressType) || - typ.ConvertibleTo(bigIntType) || - typ.ConvertibleTo(edType) || - typ.ConvertibleTo(timeType) || - typ.ConvertibleTo(cosmDecType) || - typ.ConvertibleTo(cosmIntType) { - return str - } - } - - return "" -} diff --git a/legacy/ethereum/eip712/encoding.go b/legacy/ethereum/eip712/encoding.go deleted file mode 100644 index 5292fa4..0000000 --- a/legacy/ethereum/eip712/encoding.go +++ /dev/null @@ -1,229 +0,0 @@ -package eip712 - -import ( - "errors" - "fmt" - - apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - txTypes "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" -) - -var ( - protoCodec codec.ProtoCodecMarshaler - aminoCodec *codec.LegacyAmino - eip155ChainID uint64 -) - -// SetEncodingConfig set the encoding config to the singleton codecs (Amino and Protobuf). -// The process of unmarshaling SignDoc bytes into a SignDoc object requires having a codec -// populated with all relevant message types. As a result, we must call this method on app -// initialization with the app's encoding config. -func SetEncodingConfig(cdc *codec.LegacyAmino, interfaceRegistry types.InterfaceRegistry, evmChainID uint64) { - aminoCodec = cdc - protoCodec = codec.NewProtoCodec(interfaceRegistry) - // Since these transactions require a Cosmos chain ID, we can instead derive the EIP155 chain ID from the config. Replays are of no worry here. - eip155ChainID = evmChainID -} - -// GetEIP712BytesForMsg returns the EIP-712 object bytes for the given SignDoc bytes by decoding the bytes into -// an EIP-712 object, then converting via WrapTxToTypedData. See https://eips.ethereum.org/EIPS/eip-712 for more. -func GetEIP712BytesForMsg(signDocBytes []byte) ([]byte, error) { - typedData, err := GetEIP712TypedDataForMsg(signDocBytes) - if err != nil { - return nil, err - } - - _, rawData, err := apitypes.TypedDataAndHash(typedData) - if err != nil { - return nil, fmt.Errorf("could not get EIP-712 object bytes: %w", err) - } - - return []byte(rawData), nil -} - -// GetEIP712TypedDataForMsg returns the EIP-712 TypedData representation for either -// Amino or Protobuf encoded signature doc bytes. -func GetEIP712TypedDataForMsg(signDocBytes []byte) (apitypes.TypedData, error) { - // Attempt to decode as both Amino and Protobuf since the message format is unknown. - // If either decode works, we can move forward with the corresponding typed data. - typedDataAmino, errAmino := decodeAminoSignDoc(signDocBytes) - if errAmino == nil && isValidEIP712Payload(typedDataAmino) { - return typedDataAmino, nil - } - typedDataProtobuf, errProtobuf := decodeProtobufSignDoc(signDocBytes) - if errProtobuf == nil && isValidEIP712Payload(typedDataProtobuf) { - return typedDataProtobuf, nil - } - - return apitypes.TypedData{}, fmt.Errorf("could not decode sign doc as either Amino or Protobuf.\n amino: %v\n protobuf: %v", errAmino, errProtobuf) -} - -// isValidEIP712Payload ensures that the given TypedData does not contain empty fields from -// an improper initialization. -func isValidEIP712Payload(typedData apitypes.TypedData) bool { - return len(typedData.Message) != 0 && len(typedData.Types) != 0 && typedData.PrimaryType != "" && typedData.Domain != apitypes.TypedDataDomain{} -} - -// decodeAminoSignDoc attempts to decode the provided sign doc (bytes) as an Amino payload -// and returns a signable EIP-712 TypedData object. -func decodeAminoSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { - // Ensure codecs have been initialized - if err := validateCodecInit(); err != nil { - return apitypes.TypedData{}, err - } - - var aminoDoc legacytx.StdSignDoc - if err := aminoCodec.UnmarshalJSON(signDocBytes, &aminoDoc); err != nil { - return apitypes.TypedData{}, err - } - - var fees legacytx.StdFee - if err := aminoCodec.UnmarshalJSON(aminoDoc.Fee, &fees); err != nil { - return apitypes.TypedData{}, err - } - - // Validate payload messages - msgs := make([]sdk.Msg, len(aminoDoc.Msgs)) - for i, jsonMsg := range aminoDoc.Msgs { - var m sdk.Msg - if err := aminoCodec.UnmarshalJSON(jsonMsg, &m); err != nil { - return apitypes.TypedData{}, fmt.Errorf("failed to unmarshal sign doc message: %w", err) - } - msgs[i] = m - } - - if err := validatePayloadMessages(msgs); err != nil { - return apitypes.TypedData{}, err - } - - typedData, err := WrapTxToTypedData( - eip155ChainID, - signDocBytes, - ) - if err != nil { - return apitypes.TypedData{}, fmt.Errorf("could not convert to EIP712 representation: %w", err) - } - - return typedData, nil -} - -// decodeProtobufSignDoc attempts to decode the provided sign doc (bytes) as a Protobuf payload -// and returns a signable EIP-712 TypedData object. -func decodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { - // Ensure codecs have been initialized - if err := validateCodecInit(); err != nil { - return apitypes.TypedData{}, err - } - - signDoc := &txTypes.SignDoc{} - if err := signDoc.Unmarshal(signDocBytes); err != nil { - return apitypes.TypedData{}, err - } - - authInfo := &txTypes.AuthInfo{} - if err := authInfo.Unmarshal(signDoc.AuthInfoBytes); err != nil { - return apitypes.TypedData{}, err - } - - body := &txTypes.TxBody{} - if err := body.Unmarshal(signDoc.BodyBytes); err != nil { - return apitypes.TypedData{}, err - } - - // Until support for these fields is added, throw an error at their presence - if body.TimeoutHeight != 0 || len(body.ExtensionOptions) != 0 || len(body.NonCriticalExtensionOptions) != 0 { - return apitypes.TypedData{}, errors.New("body contains unsupported fields: TimeoutHeight, ExtensionOptions, or NonCriticalExtensionOptions") - } - - if len(authInfo.SignerInfos) != 1 { - return apitypes.TypedData{}, fmt.Errorf("invalid number of signer infos provided, expected 1 got %v", len(authInfo.SignerInfos)) - } - - // Validate payload messages - msgs := make([]sdk.Msg, len(body.Messages)) - for i, protoMsg := range body.Messages { - var m sdk.Msg - if err := protoCodec.UnpackAny(protoMsg, &m); err != nil { - return apitypes.TypedData{}, fmt.Errorf("could not unpack message object with error %w", err) - } - msgs[i] = m - } - - if err := validatePayloadMessages(msgs); err != nil { - return apitypes.TypedData{}, err - } - - signerInfo := authInfo.SignerInfos[0] - - stdFee := &legacytx.StdFee{ - Amount: authInfo.Fee.Amount, - Gas: authInfo.Fee.GasLimit, - } - - // WrapTxToTypedData expects the payload as an Amino Sign Doc - signBytes := legacytx.StdSignBytes( - signDoc.ChainId, - signDoc.AccountNumber, - signerInfo.Sequence, - body.TimeoutHeight, - *stdFee, - msgs, - body.Memo, - ) - - typedData, err := WrapTxToTypedData( - eip155ChainID, - signBytes, - ) - if err != nil { - return apitypes.TypedData{}, err - } - - return typedData, nil -} - -// validateCodecInit ensures that both Amino and Protobuf encoding codecs have been set on app init, -// so the module does not panic if either codec is not found. -func validateCodecInit() error { - if aminoCodec == nil || protoCodec == nil { - return errors.New("missing codec: codecs have not been properly initialized using SetEncodingConfig") - } - - return nil -} - -// validatePayloadMessages ensures that the transaction messages can be represented in an EIP-712 -// encoding by checking that messages exist and share a single signer. -func validatePayloadMessages(msgs []sdk.Msg) error { - if len(msgs) == 0 { - return errors.New("unable to build EIP-712 payload: transaction does contain any messages") - } - - var msgSigner sdk.AccAddress - - for i, m := range msgs { - 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 = signers[0] - continue - } - - if !msgSigner.Equals(sdk.AccAddress(signers[0])) { - return errors.New("unable to build EIP-712 payload: multiple signers detected") - } - } - - return nil -} diff --git a/legacy/ethereum/eip712/encoding_legacy.go b/legacy/ethereum/eip712/encoding_legacy.go deleted file mode 100644 index d0efecf..0000000 --- a/legacy/ethereum/eip712/encoding_legacy.go +++ /dev/null @@ -1,262 +0,0 @@ -package eip712 - -import ( - "encoding/json" - "errors" - "fmt" - - apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" - - sdk "github.com/cosmos/cosmos-sdk/types" - txTypes "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" -) - -type aminoMessage struct { - Type string `json:"type"` - Value interface{} `json:"value"` -} - -// LegacyGetEIP712BytesForMsg returns the EIP-712 object bytes for the given SignDoc bytes by decoding the bytes into -// an EIP-712 object, then converting via LegacyWrapTxToTypedData. See https://eips.ethereum.org/EIPS/eip-712 for more. -func LegacyGetEIP712BytesForMsg(signDocBytes []byte) ([]byte, error) { - typedData, err := LegacyGetEIP712TypedDataForMsg(signDocBytes, eip155ChainID) - if err != nil { - return nil, err - } - - _, rawData, err := apitypes.TypedDataAndHash(typedData) - if err != nil { - return nil, fmt.Errorf("could not get EIP-712 object bytes: %w", err) - } - - return []byte(rawData), nil -} - -// LegacyGetEIP712TypedDataForMsg returns the EIP-712 TypedData representation for either -// Amino or Protobuf encoded signature doc bytes. -func LegacyGetEIP712TypedDataForMsg(signDocBytes []byte, eip155ChainID uint64) (apitypes.TypedData, error) { - // Attempt to decode as both Amino and Protobuf since the message format is unknown. - // If either decode works, we can move forward with the corresponding typed data. - typedDataAmino, errAmino := legacyDecodeAminoSignDoc(signDocBytes, eip155ChainID) - if errAmino == nil && isValidEIP712Payload(typedDataAmino) { - return typedDataAmino, nil - } - typedDataProtobuf, errProtobuf := legacyDecodeProtobufSignDoc(signDocBytes, eip155ChainID) - if errProtobuf == nil && isValidEIP712Payload(typedDataProtobuf) { - return typedDataProtobuf, nil - } - - return apitypes.TypedData{}, fmt.Errorf("could not decode sign doc as either Amino or Protobuf.\n amino: %v\n protobuf: %v", errAmino, errProtobuf) -} - -// legacyDecodeAminoSignDoc attempts to decode the provided sign doc (bytes) as an Amino payload -// and returns a signable EIP-712 TypedData object. -func legacyDecodeAminoSignDoc(signDocBytes []byte, eip155ChainID uint64) (apitypes.TypedData, error) { - // Ensure codecs have been initialized - if err := validateCodecInit(); err != nil { - return apitypes.TypedData{}, err - } - - var aminoDoc legacytx.StdSignDoc - if err := aminoCodec.UnmarshalJSON(signDocBytes, &aminoDoc); err != nil { - return apitypes.TypedData{}, err - } - - var fees legacytx.StdFee - if err := aminoCodec.UnmarshalJSON(aminoDoc.Fee, &fees); err != nil { - return apitypes.TypedData{}, err - } - - // Validate payload messages - msgs := make([]sdk.Msg, len(aminoDoc.Msgs)) - for i, jsonMsg := range aminoDoc.Msgs { - var m sdk.Msg - if err := aminoCodec.UnmarshalJSON(jsonMsg, &m); err != nil { - return apitypes.TypedData{}, fmt.Errorf("failed to unmarshal sign doc message: %w", err) - } - msgs[i] = m - } - - if err := legacyValidatePayloadMessages(msgs); err != nil { - return apitypes.TypedData{}, err - } - - // Use first message for fee payer and type inference - msg := msgs[0] - - // By convention, the fee payer is the first address in the list of signers. - signers, _, err := protoCodec.GetMsgV1Signers(msg) - if err != nil { - return apitypes.TypedData{}, err - } - feePayer := signers[0] - feeDelegation := &FeeDelegationOptions{ - FeePayer: feePayer, - } - - typedData, err := LegacyWrapTxToTypedData( - protoCodec, - eip155ChainID, - msg, - signDocBytes, - feeDelegation, - ) - if err != nil { - return apitypes.TypedData{}, fmt.Errorf("could not convert to EIP712 representation: %w", err) - } - - return typedData, nil -} - -// legacyDecodeProtobufSignDoc attempts to decode the provided sign doc (bytes) as a Protobuf payload -// and returns a signable EIP-712 TypedData object. -func legacyDecodeProtobufSignDoc(signDocBytes []byte, eip155ChainID uint64) (apitypes.TypedData, error) { - // Ensure codecs have been initialized - if err := validateCodecInit(); err != nil { - return apitypes.TypedData{}, err - } - - signDoc := &txTypes.SignDoc{} - if err := signDoc.Unmarshal(signDocBytes); err != nil { - return apitypes.TypedData{}, err - } - - authInfo := &txTypes.AuthInfo{} - if err := authInfo.Unmarshal(signDoc.AuthInfoBytes); err != nil { - return apitypes.TypedData{}, err - } - - body := &txTypes.TxBody{} - if err := body.Unmarshal(signDoc.BodyBytes); err != nil { - return apitypes.TypedData{}, err - } - - // Until support for these fields is added, throw an error at their presence - if body.TimeoutHeight != 0 || len(body.ExtensionOptions) != 0 || len(body.NonCriticalExtensionOptions) != 0 { - return apitypes.TypedData{}, errors.New("body contains unsupported fields: TimeoutHeight, ExtensionOptions, or NonCriticalExtensionOptions") - } - - if len(authInfo.SignerInfos) != 1 { - return apitypes.TypedData{}, fmt.Errorf("invalid number of signer infos provided, expected 1 got %v", len(authInfo.SignerInfos)) - } - - // Validate payload messages - msgs := make([]sdk.Msg, len(body.Messages)) - for i, protoMsg := range body.Messages { - var m sdk.Msg - if err := protoCodec.UnpackAny(protoMsg, &m); err != nil { - return apitypes.TypedData{}, fmt.Errorf("could not unpack message object with error %w", err) - } - msgs[i] = m - } - - if err := legacyValidatePayloadMessages(msgs); err != nil { - return apitypes.TypedData{}, err - } - - // Use first message for fee payer and type inference - msg := msgs[0] - - signerInfo := authInfo.SignerInfos[0] - - stdFee := &legacytx.StdFee{ - Amount: authInfo.Fee.Amount, - Gas: authInfo.Fee.GasLimit, - } - - signers, _, err := protoCodec.GetMsgV1Signers(msg) - if err != nil { - return apitypes.TypedData{}, err - } - feePayer := signers[0] - feeDelegation := &FeeDelegationOptions{ - FeePayer: feePayer, - } - - // WrapTxToTypedData expects the payload as an Amino Sign Doc - signBytes := legacytx.StdSignBytes( - signDoc.ChainId, - signDoc.AccountNumber, - signerInfo.Sequence, - body.TimeoutHeight, - *stdFee, - msgs, - body.Memo, - ) - - typedData, err := LegacyWrapTxToTypedData( - protoCodec, - eip155ChainID, - msg, - signBytes, - feeDelegation, - ) - if err != nil { - return apitypes.TypedData{}, err - } - - return typedData, nil -} - -// validatePayloadMessages ensures that the transaction messages can be represented in an EIP-712 -// encoding by checking that messages exist, are of the same type, and share a single signer. -func legacyValidatePayloadMessages(msgs []sdk.Msg) error { - if len(msgs) == 0 { - return errors.New("unable to build EIP-712 payload: transaction does contain any messages") - } - - var msgType string - var msgSigner sdk.AccAddress - - for i, m := range msgs { - t, err := getMsgType(m) - if err != nil { - return err - } - - 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 = signers[0] - continue - } - - if t != msgType { - return errors.New("unable to build EIP-712 payload: different types of messages detected") - } - - if !msgSigner.Equals(sdk.AccAddress(signers[0])) { - return errors.New("unable to build EIP-712 payload: multiple signers detected") - } - } - - return nil -} - -// getMsgType returns the message type prefix for the given Cosmos SDK Msg -func getMsgType(msg sdk.Msg) (string, error) { - jsonBytes, err := aminoCodec.MarshalJSON(msg) - if err != nil { - return "", err - } - - var jsonMsg aminoMessage - if err := json.Unmarshal(jsonBytes, &jsonMsg); err != nil { - return "", err - } - - // Verify Type was successfully filled in - if jsonMsg.Type == "" { - return "", errors.New("could not decode message: type is missing") - } - - return jsonMsg.Type, nil -} diff --git a/legacy/ethereum/eip712/message.go b/legacy/ethereum/eip712/message.go deleted file mode 100644 index 294489d..0000000 --- a/legacy/ethereum/eip712/message.go +++ /dev/null @@ -1,152 +0,0 @@ -package eip712 - -import ( - "fmt" - - "github.com/tidwall/gjson" - "github.com/tidwall/sjson" - - errorsmod "cosmossdk.io/errors" - - errortypes "github.com/cosmos/cosmos-sdk/types/errors" -) - -type eip712MessagePayload struct { - payload gjson.Result - numPayloadMsgs int - message map[string]interface{} -} - -const ( - payloadMsgsField = "msgs" -) - -// createEIP712MessagePayload generates the EIP-712 message payload -// corresponding to the input data. -func createEIP712MessagePayload(data []byte) (eip712MessagePayload, error) { - basicPayload, err := unmarshalBytesToJSONObject(data) - if err != nil { - return eip712MessagePayload{}, err - } - - payload, numPayloadMsgs, err := FlattenPayloadMessages(basicPayload) - if err != nil { - return eip712MessagePayload{}, errorsmod.Wrap(err, "failed to flatten payload JSON messages") - } - - message, ok := payload.Value().(map[string]interface{}) - if !ok { - return eip712MessagePayload{}, errorsmod.Wrap(errortypes.ErrInvalidType, "failed to parse JSON as map") - } - - messagePayload := eip712MessagePayload{ - payload: payload, - numPayloadMsgs: numPayloadMsgs, - message: message, - } - - return messagePayload, nil -} - -// unmarshalBytesToJSONObject converts a bytestream into -// a JSON object, then makes sure the JSON is an object. -func unmarshalBytesToJSONObject(data []byte) (gjson.Result, error) { - if !gjson.ValidBytes(data) { - return gjson.Result{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "invalid JSON received") - } - - payload := gjson.ParseBytes(data) - - if !payload.IsObject() { - return gjson.Result{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to JSON unmarshal data as object") - } - - return payload, nil -} - -// FlattenPayloadMessages flattens the input payload's messages, representing -// them as key-value pairs of "msg{i}": {Msg}, rather than as an array of Msgs. -// We do this to support messages with different schemas. -func FlattenPayloadMessages(payload gjson.Result) (gjson.Result, int, error) { - flattened := payload - var err error - - msgs, err := getPayloadMessages(payload) - if err != nil { - return gjson.Result{}, 0, err - } - - for i, msg := range msgs { - flattened, err = payloadWithNewMessage(flattened, msg, i) - if err != nil { - return gjson.Result{}, 0, err - } - } - - flattened, err = payloadWithoutMsgsField(flattened) - if err != nil { - return gjson.Result{}, 0, err - } - - return flattened, len(msgs), nil -} - -// getPayloadMessages processes and returns the payload messages as a JSON array. -func getPayloadMessages(payload gjson.Result) ([]gjson.Result, error) { - rawMsgs := payload.Get(payloadMsgsField) - - if !rawMsgs.Exists() { - return nil, errorsmod.Wrap(errortypes.ErrInvalidRequest, "no messages found in payload, unable to parse") - } - - if rawMsgs.Type == gjson.Null { - return []gjson.Result{}, nil - } - - if !rawMsgs.IsArray() { - return nil, errorsmod.Wrap(errortypes.ErrInvalidRequest, "expected type array of messages, cannot parse") - } - - return rawMsgs.Array(), nil -} - -// payloadWithNewMessage returns the updated payload object with the message -// set at the field corresponding to index. -func payloadWithNewMessage(payload gjson.Result, msg gjson.Result, index int) (gjson.Result, error) { - field := msgFieldForIndex(index) - - if payload.Get(field).Exists() { - return gjson.Result{}, errorsmod.Wrapf( - errortypes.ErrInvalidRequest, - "malformed payload received, did not expect to find key at field %v", field, - ) - } - - if !msg.IsObject() { - return gjson.Result{}, errorsmod.Wrapf(errortypes.ErrInvalidRequest, "msg at index %d is not valid JSON: %v", index, msg) - } - - newRaw, err := sjson.SetRaw(payload.Raw, field, msg.Raw) - if err != nil { - return gjson.Result{}, err - } - - return gjson.Parse(newRaw), nil -} - -// msgFieldForIndex returns the payload field for a given message post-flattening. -// e.g. msgs[2] becomes 'msg2' -func msgFieldForIndex(i int) string { - return fmt.Sprintf("msg%d", i) -} - -// payloadWithoutMsgsField returns the updated payload without the "msgs" array -// field, which flattening makes obsolete. -func payloadWithoutMsgsField(payload gjson.Result) (gjson.Result, error) { - newRaw, err := sjson.Delete(payload.Raw, payloadMsgsField) - if err != nil { - return gjson.Result{}, err - } - - return gjson.Parse(newRaw), nil -} diff --git a/legacy/ethereum/eip712/preprocess.go b/legacy/ethereum/eip712/preprocess.go deleted file mode 100644 index 3e18b7f..0000000 --- a/legacy/ethereum/eip712/preprocess.go +++ /dev/null @@ -1,87 +0,0 @@ -package eip712 - -import ( - "fmt" - - "github.com/cosmos/evm/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec/address" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cosmoskr "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" -) - -// PreprocessLedgerTx reformats Ledger-signed Cosmos transactions to match the fork expected by Cosmos EVM -// by including the signature in a Web3Tx extension and sending a blank signature in the body. -func PreprocessLedgerTx(evmChainID uint64, keyType cosmoskr.KeyType, txBuilder client.TxBuilder) error { - // Only process Ledger transactions - if keyType != cosmoskr.TypeLedger { - return nil - } - - // Init extension builder to set Web3 extension - extensionBuilder, ok := txBuilder.(authtx.ExtensionOptionsTxBuilder) - if !ok { - return fmt.Errorf("cannot cast TxBuilder to ExtensionOptionsTxBuilder") - } - - // Get signatures from TxBuilder - sigs, err := txBuilder.GetTx().GetSignaturesV2() - if err != nil { - return fmt.Errorf("could not get signatures: %w", err) - } - - // Verify single-signer - if len(sigs) != 1 { - return fmt.Errorf("invalid number of signatures, expected 1 and got %v", len(sigs)) - } - - signature := sigs[0] - sigData, ok := signature.Data.(*signing.SingleSignatureData) - if !ok { - return fmt.Errorf("unexpected signature type, expected SingleSignatureData") - } - sigBytes := sigData.Signature - - addrCodec := address.Bech32Codec{ - Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), - } - feePayerAddr, err := addrCodec.BytesToString(txBuilder.GetTx().FeePayer()) - if err != nil { - return fmt.Errorf("could not parse feePayer address: %w", err) - } - // Add ExtensionOptionsWeb3Tx extension with signature - var option *codectypes.Any - option, err = codectypes.NewAnyWithValue(&types.ExtensionOptionsWeb3Tx{ - FeePayer: feePayerAddr, - TypedDataChainID: evmChainID, - FeePayerSig: sigBytes, - }) - if err != nil { - return fmt.Errorf("could not set extension as any: %w", err) - } - - extensionBuilder.SetExtensionOptions(option) - - // Set blank signature with Amino Sign Type - // (Regardless of input signMode, Cosmos EVM requires Amino signature type for Ledger) - blankSig := signing.SingleSignatureData{ - SignMode: signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, - Signature: nil, - } - sig := signing.SignatureV2{ - PubKey: signature.PubKey, - Data: &blankSig, - Sequence: signature.Sequence, - } - - err = txBuilder.SetSignatures(sig) - if err != nil { - return fmt.Errorf("unable to set signatures on payload: %w", err) - } - - return nil -} diff --git a/legacy/ethereum/eip712/types.go b/legacy/ethereum/eip712/types.go deleted file mode 100644 index ad6db98..0000000 --- a/legacy/ethereum/eip712/types.go +++ /dev/null @@ -1,389 +0,0 @@ -package eip712 - -import ( - "bytes" - "fmt" - "sort" - "strings" - - "github.com/ethereum/go-ethereum/signer/core/apitypes" - "github.com/tidwall/gjson" - "golang.org/x/text/cases" - "golang.org/x/text/language" - - errorsmod "cosmossdk.io/errors" - - errortypes "github.com/cosmos/cosmos-sdk/types/errors" -) - -const ( - rootPrefix = "_" - typePrefix = "Type" - - txField = "Tx" - ethBool = "bool" - ethInt64 = "int64" - ethString = "string" - - msgTypeField = "type" - - maxDuplicateTypeDefs = 1000 -) - -// getEIP712Types creates and returns the EIP-712 types -// for the given message payload. -func createEIP712Types(messagePayload eip712MessagePayload) (apitypes.Types, error) { - eip712Types := apitypes.Types{ - "EIP712Domain": { - { - Name: "name", - Type: "string", - }, - { - Name: "version", - Type: "string", - }, - { - Name: "chainId", - Type: "uint256", - }, - { - Name: "verifyingContract", - Type: "string", - }, - { - Name: "salt", - Type: "string", - }, - }, - "Tx": { - {Name: "account_number", Type: "string"}, - {Name: "chain_id", Type: "string"}, - {Name: "fee", Type: "Fee"}, - {Name: "memo", Type: "string"}, - {Name: "sequence", Type: "string"}, - // Note timeout_height was removed because it was not getting filled with the legacyTx - }, - "Fee": { - {Name: "amount", Type: "Coin[]"}, - {Name: "gas", Type: "string"}, - }, - "Coin": { - {Name: "denom", Type: "string"}, - {Name: "amount", Type: "string"}, - }, - } - - for i := 0; i < messagePayload.numPayloadMsgs; i++ { - field := msgFieldForIndex(i) - msg := messagePayload.payload.Get(field) - - if err := addMsgTypesToRoot(eip712Types, field, msg); err != nil { - return nil, err - } - } - - return eip712Types, nil -} - -// addMsgTypesToRoot adds all types for the given message -// to eip712Types, recursively handling object sub-fields. -func addMsgTypesToRoot(eip712Types apitypes.Types, msgField string, msg gjson.Result) (err error) { - defer doRecover(&err) - - if !msg.IsObject() { - return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "message is not valid JSON, cannot parse types") - } - - msgRootType, err := msgRootType(msg) - if err != nil { - return err - } - - msgTypeDef, err := recursivelyAddTypesToRoot(eip712Types, msgRootType, rootPrefix, msg) - if err != nil { - return err - } - - addMsgTypeDefToTxSchema(eip712Types, msgField, msgTypeDef) - - return nil -} - -// msgRootType parses the message and returns the formatted -// type signature corresponding to the message type. -func msgRootType(msg gjson.Result) (string, error) { - msgType := msg.Get(msgTypeField).Str - if msgType == "" { - // .Str is empty for arrays and objects - return "", errorsmod.Wrap(errortypes.ErrInvalidType, "malformed message type value, expected type string") - } - - // Convert e.g. cosmos-sdk/MsgSend to TypeMsgSend - typeTokenized := strings.Split(msgType, "/") - msgSignature := typeTokenized[len(typeTokenized)-1] - rootType := fmt.Sprintf("%v%v", typePrefix, msgSignature) - - return rootType, nil -} - -// addMsgTypeDefToTxSchema adds the message's field-type pairing -// to the Tx schema. -func addMsgTypeDefToTxSchema(eip712Types apitypes.Types, msgField, msgTypeDef string) { - eip712Types[txField] = append(eip712Types[txField], apitypes.Type{ - Name: msgField, - Type: msgTypeDef, - }) -} - -// recursivelyAddTypesToRoot walks all types in the given map -// and recursively adds sub-maps as new types when necessary. -// It adds all type definitions to typeMap, then returns a key -// to the json object's type definition within the map. -func recursivelyAddTypesToRoot( - typeMap apitypes.Types, - rootType string, - prefix string, - payload gjson.Result, -) (string, error) { - typesToAdd := []apitypes.Type{} - - // Must sort the JSON keys for deterministic type generation. - sortedFieldNames, err := sortedJSONKeys(payload) - if err != nil { - return "", errorsmod.Wrap(err, "unable to sort object keys") - } - - typeDef := typeDefForPrefix(prefix, rootType) - - for _, fieldName := range sortedFieldNames { - field := payload.Get(fieldName) - if !field.Exists() { - continue - } - - // Handle array type by unwrapping the first element. - // Note that arrays with multiple types are not supported - // using EIP-712, so we can ignore that case. - isCollection := false - if field.IsArray() { - fieldAsArray := field.Array() - - if len(fieldAsArray) == 0 { - // Arbitrarily add string[] type to handle empty arrays, - // since we cannot access the underlying object. - emptyArrayType := "string[]" - typesToAdd = appendedTypesList(typesToAdd, fieldName, emptyArrayType) - - continue - } - - field = fieldAsArray[0] - isCollection = true - } - - ethType := getEthTypeForJSON(field) - - // Handle JSON primitive types by adding the corresponding - // EIP-712 type to the types schema. - if ethType != "" { - if isCollection { - ethType += "[]" - } - typesToAdd = appendedTypesList(typesToAdd, fieldName, ethType) - - continue - } - - // Handle object types recursively. Note that nested array types are not supported - // in EIP-712, so we can exclude that case. - if field.IsObject() { - fieldPrefix := prefixForSubField(prefix, fieldName) - - fieldTypeDef, err := recursivelyAddTypesToRoot(typeMap, rootType, fieldPrefix, field) - if err != nil { - return "", err - } - - fieldTypeDef = sanitizeTypedef(fieldTypeDef) - if isCollection { - fieldTypeDef += "[]" - } - - typesToAdd = appendedTypesList(typesToAdd, fieldName, fieldTypeDef) - - continue - } - } - - return addTypesToRoot(typeMap, typeDef, typesToAdd) -} - -// sortedJSONKeys returns the sorted JSON keys for the input object, -// to be used for deterministic iteration. -func sortedJSONKeys(json gjson.Result) ([]string, error) { - if !json.IsObject() { - return nil, errorsmod.Wrap(errortypes.ErrInvalidType, "expected JSON map to parse") - } - - jsonMap := json.Map() - - keys := make([]string, len(jsonMap)) - i := 0 - // #nosec G705 for map iteration - for k := range jsonMap { - keys[i] = k - i++ - } - - sort.Slice(keys, func(i, j int) bool { - return strings.Compare(keys[i], keys[j]) > 0 - }) - - return keys, nil -} - -// typeDefForPrefix computes the type definition for the given -// prefix. This value will represent the types key within -// the EIP-712 types map. -func typeDefForPrefix(prefix, rootType string) string { - if prefix == rootPrefix { - return rootType - } - return sanitizeTypedef(prefix) -} - -// appendedTypesList returns an array of Types with a new element -// consisting of name and typeDef. -func appendedTypesList(types []apitypes.Type, name, typeDef string) []apitypes.Type { - return append(types, apitypes.Type{ - Name: name, - Type: typeDef, - }) -} - -// prefixForSubField computes the prefix for a subfield by -// indicating that it's derived from the object associated with prefix. -func prefixForSubField(prefix, fieldName string) string { - return fmt.Sprintf("%s.%s", prefix, fieldName) -} - -// addTypesToRoot attempts to add the types to the root at key -// typeDef and returns the key at which the types are present, -// or an error if they cannot be added. If the typeDef key is a -// duplicate, we return the key corresponding to an identical copy -// if present, without modifying the structure. Otherwise, we insert -// the types at the next available typeDef-{n} field. We do this to -// support identically named payloads with different schemas. -func addTypesToRoot(typeMap apitypes.Types, typeDef string, types []apitypes.Type) (string, error) { - var indexedTypeDef string - - indexAsDuplicate := 0 - - for { - indexedTypeDef = typeDefWithIndex(typeDef, indexAsDuplicate) - existingTypes, foundElement := typeMap[indexedTypeDef] - - // Found identical duplicate, so we can simply return - // the existing type definition. - if foundElement && typesAreEqual(types, existingTypes) { - return indexedTypeDef, nil - } - - // Found no element, so we can create a new one at this index. - if !foundElement { - break - } - - indexAsDuplicate++ - - if indexAsDuplicate == maxDuplicateTypeDefs { - return "", errorsmod.Wrap(errortypes.ErrInvalidRequest, "exceeded maximum number of duplicates for a single type definition") - } - } - - typeMap[indexedTypeDef] = types - - return indexedTypeDef, nil -} - -// typeDefWithIndex creates a duplicate-indexed type definition -// to differentiate between different schemas with the same name. -func typeDefWithIndex(typeDef string, index int) string { - return fmt.Sprintf("%v%d", typeDef, index) -} - -// typesAreEqual compares two apitypes.Type arrays -// and returns a boolean indicating whether they have -// the same values. -// It assumes both arrays are in the same sorted order. -func typesAreEqual(types1 []apitypes.Type, types2 []apitypes.Type) bool { - if len(types1) != len(types2) { - return false - } - - for i := 0; i < len(types1); i++ { - if types1[i].Name != types2[i].Name || types1[i].Type != types2[i].Type { - return false - } - } - - return true -} - -// _.foo_bar.baz -> TypeFooBarBaz -// -// Since Geth does not tolerate complex EIP-712 type names, we need to sanitize -// the inputs. -func sanitizeTypedef(str string) string { - buf := new(bytes.Buffer) - caser := cases.Title(language.English, cases.NoLower) - parts := strings.Split(str, ".") - - for _, part := range parts { - if part == rootPrefix { - buf.WriteString(typePrefix) - continue - } - - subparts := strings.Split(part, "_") - for _, subpart := range subparts { - buf.WriteString(caser.String(subpart)) - } - } - - return buf.String() -} - -// getEthTypeForJSON converts a JSON type to an Ethereum type. -// It returns an empty string for Objects, Arrays, or Null. -// See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md for more. -func getEthTypeForJSON(json gjson.Result) string { - switch json.Type { - case gjson.True, gjson.False: - return ethBool - case gjson.Number: - return ethInt64 - case gjson.String: - return ethString - case gjson.JSON: - // Array or Object type - return "" - default: - return "" - } -} - -// doRecover attempts to recover in the event of a panic to -// prevent DOS and gracefully handle an error instead. -func doRecover(err *error) { - if r := recover(); r != nil { - if e, ok := r.(error); ok { - e = errorsmod.Wrap(e, "panicked with error") - *err = e - return - } - - *err = fmt.Errorf("%v", r) - } -} diff --git a/legacy/types/block.go b/legacy/types/block.go deleted file mode 100644 index 36c1f18..0000000 --- a/legacy/types/block.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - math "math" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// BlockGasLimit returns the max gas (limit) defined in the block gas meter. If the meter is not -// set, it returns the max gas from the application consensus params. -// NOTE: see https://github.com/cosmos/cosmos-sdk/issues/9514 for full reference -func BlockGasLimit(ctx sdk.Context) uint64 { - blockGasMeter := ctx.BlockGasMeter() - - // Get the limit from the gas meter only if its not null and not an InfiniteGasMeter - if blockGasMeter != nil && blockGasMeter.Limit() != 0 { - return blockGasMeter.Limit() - } - - // Otherwise get from the consensus parameters - cp := ctx.ConsensusParams() - if cp.Block == nil { - return 0 - } - - maxGas := cp.Block.MaxGas - - // Setting max_gas to -1 in Tendermint means there is no limit on the maximum gas consumption for transactions - // https://github.com/cometbft/cometbft/blob/v0.37.2/proto/tendermint/types/params.proto#L25-L27 - if maxGas == -1 { - return math.MaxUint64 - } - - if maxGas > 0 { - return uint64(maxGas) // #nosec G701 -- maxGas is int64 type. It can never be greater than math.MaxUint64 - } - - return 0 -} diff --git a/legacy/types/chain_id.go b/legacy/types/chain_id.go deleted file mode 100644 index b895d42..0000000 --- a/legacy/types/chain_id.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "fmt" - "math/big" - "regexp" - "strings" - - errorsmod "cosmossdk.io/errors" -) - -var ( - regexChainID = `[a-z]{1,}` - regexEIP155Separator = `_{1}` - regexEIP155 = `[1-9][0-9]*` - regexEpochSeparator = `-{1}` - regexEpoch = `[1-9][0-9]*` - evmosChainID = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)%s(%s)$`, - regexChainID, - regexEIP155Separator, - regexEIP155, - regexEpochSeparator, - regexEpoch)) -) - -// IsValidChainID returns false if the given chain identifier is incorrectly formatted. -func IsValidChainID(chainID string) bool { - if len(chainID) > 48 { - return false - } - - return evmosChainID.MatchString(chainID) -} - -// ParseChainID parses a string chain identifier's epoch to an Ethereum-compatible -// chain-id in *big.Int format. The function returns an error if the chain-id has an invalid format -func ParseChainID(chainID string) (*big.Int, error) { - chainID = strings.TrimSpace(chainID) - if len(chainID) > 48 { - return nil, errorsmod.Wrapf(ErrInvalidChainID, "chain-id '%s' cannot exceed 48 chars", chainID) - } - - matches := evmosChainID.FindStringSubmatch(chainID) - if matches == nil || len(matches) != 4 || matches[1] == "" { - return nil, errorsmod.Wrapf(ErrInvalidChainID, "%s: %v", chainID, matches) - } - - // verify that the chain-id entered is a base 10 integer - chainIDInt, ok := new(big.Int).SetString(matches[2], 10) - if !ok { - return nil, errorsmod.Wrapf(ErrInvalidChainID, "epoch %s must be base-10 integer format", matches[2]) - } - - return chainIDInt, nil -} diff --git a/legacy/types/codec.go b/legacy/types/codec.go deleted file mode 100644 index 2fe1de6..0000000 --- a/legacy/types/codec.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// RegisterInterfaces registers the tendermint concrete client-related -// implementations and interfaces. -func RegisterInterfaces(registry codectypes.InterfaceRegistry) { - registry.RegisterImplementations( - (*sdk.AccountI)(nil), - &EthAccount{}, - ) - registry.RegisterImplementations( - (*authtypes.GenesisAccount)(nil), - &EthAccount{}, - ) - registry.RegisterImplementations( - (*tx.TxExtensionOptionI)(nil), - &ExtensionOptionsWeb3Tx{}, - &ExtensionOptionDynamicFeeTx{}, - ) -} diff --git a/legacy/types/coin.go b/legacy/types/coin.go deleted file mode 100644 index 597253b..0000000 --- a/legacy/types/coin.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "math/big" - - sdkmath "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - // AttoEvmos defines the default coin denomination used in Evmos in: - // - // - Staking parameters: denomination used as stake in the dPoS chain - // - Mint parameters: denomination minted due to fee distribution rewards - // - Governance parameters: denomination used for spam prevention in proposal deposits - // - Crisis parameters: constant fee denomination used for spam prevention to check broken invariant - // - EVM parameters: denomination used for running EVM state transitions in Evmos. - AttoEvmos string = "aevmos" - - // BaseDenomUnit defines the base denomination unit for Evmos. - // 1 evmos = 1x10^{BaseDenomUnit} aevmos - BaseDenomUnit = 18 - - // DefaultGasPrice is default gas price for evm transactions - DefaultGasPrice = 20 -) - -// PowerReduction defines the default power reduction value for staking -var PowerReduction = sdkmath.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(BaseDenomUnit), nil)) - -// NewEvmosCoin is a utility function that returns an "aevmos" coin with the given sdkmath.Int amount. -// The function will panic if the provided amount is negative. -func NewEvmosCoin(amount sdkmath.Int) sdk.Coin { - return sdk.NewCoin(AttoEvmos, amount) -} - -// NewEvmosDecCoin is a utility function that returns an "aevmos" decimal coin with the given sdkmath.Int amount. -// The function will panic if the provided amount is negative. -func NewEvmosDecCoin(amount sdkmath.Int) sdk.DecCoin { - return sdk.NewDecCoin(AttoEvmos, amount) -} - -// NewEvmosCoinInt64 is a utility function that returns an "aevmos" coin with the given int64 amount. -// The function will panic if the provided amount is negative. -func NewEvmosCoinInt64(amount int64) sdk.Coin { - return sdk.NewInt64Coin(AttoEvmos, amount) -} diff --git a/legacy/types/dynamic_fee.pb.go b/legacy/types/dynamic_fee.pb.go deleted file mode 100644 index 154e3c8..0000000 --- a/legacy/types/dynamic_fee.pb.go +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/types/v1/dynamic_fee.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "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. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ExtensionOptionDynamicFeeTx is an extension option that specifies the maxPrioPrice for cosmos tx -type ExtensionOptionDynamicFeeTx struct { - // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec - MaxPriorityPrice cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=max_priority_price,json=maxPriorityPrice,proto3,customtype=cosmossdk.io/math.Int" json:"max_priority_price"` -} - -func (m *ExtensionOptionDynamicFeeTx) Reset() { *m = ExtensionOptionDynamicFeeTx{} } -func (m *ExtensionOptionDynamicFeeTx) String() string { return proto.CompactTextString(m) } -func (*ExtensionOptionDynamicFeeTx) ProtoMessage() {} -func (*ExtensionOptionDynamicFeeTx) Descriptor() ([]byte, []int) { - return fileDescriptor_9d7cf05c9992c480, []int{0} -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtensionOptionDynamicFeeTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionOptionDynamicFeeTx.Merge(m, src) -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Size() int { - return m.Size() -} -func (m *ExtensionOptionDynamicFeeTx) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionOptionDynamicFeeTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtensionOptionDynamicFeeTx proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExtensionOptionDynamicFeeTx)(nil), "ethermint.types.v1.ExtensionOptionDynamicFeeTx") -} - -func init() { - proto.RegisterFile("ethermint/types/v1/dynamic_fee.proto", fileDescriptor_9d7cf05c9992c480) -} - -var fileDescriptor_9d7cf05c9992c480 = []byte{ - // 254 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2d, 0xc9, 0x48, - 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, - 0xa9, 0xcc, 0x4b, 0xcc, 0xcd, 0x4c, 0x8e, 0x4f, 0x4b, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x12, 0x82, 0xab, 0xd2, 0x03, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, - 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x65, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, - 0x05, 0x11, 0x55, 0xca, 0xe7, 0x92, 0x76, 0xad, 0x28, 0x49, 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0xf3, - 0x2f, 0x28, 0xc9, 0xcc, 0xcf, 0x73, 0x81, 0x58, 0xe0, 0x96, 0x9a, 0x1a, 0x52, 0x21, 0x14, 0xc0, - 0x25, 0x94, 0x9b, 0x58, 0x11, 0x5f, 0x50, 0x94, 0x99, 0x5f, 0x94, 0x59, 0x52, 0x09, 0x62, 0x24, - 0xa7, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x3a, 0x29, 0x9d, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, - 0xbc, 0x68, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x71, 0x4a, 0xb6, 0x5e, 0x66, 0xbe, 0x7e, 0x6e, - 0x62, 0x49, 0x86, 0x9e, 0x67, 0x5e, 0xc9, 0x8a, 0xe7, 0x1b, 0xb4, 0x18, 0x83, 0x04, 0x72, 0x13, - 0x2b, 0x02, 0xa0, 0x9a, 0x03, 0x40, 0x7a, 0x9d, 0xac, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, - 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, - 0x58, 0x8e, 0x21, 0x4a, 0x21, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, - 0xb5, 0x2c, 0x37, 0xbf, 0x18, 0x4a, 0x96, 0x19, 0x19, 0x40, 0xbc, 0x9f, 0xc4, 0x06, 0x76, 0xb3, - 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x2f, 0x5c, 0xa5, 0x18, 0x01, 0x00, 0x00, -} - -func (m *ExtensionOptionDynamicFeeTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExtensionOptionDynamicFeeTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExtensionOptionDynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxPriorityPrice.Size() - i -= size - if _, err := m.MaxPriorityPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDynamicFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintDynamicFee(dAtA []byte, offset int, v uint64) int { - offset -= sovDynamicFee(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExtensionOptionDynamicFeeTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.MaxPriorityPrice.Size() - n += 1 + l + sovDynamicFee(uint64(l)) - return n -} - -func sovDynamicFee(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDynamicFee(x uint64) (n int) { - return sovDynamicFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExtensionOptionDynamicFeeTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxPriorityPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDynamicFee - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDynamicFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxPriorityPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDynamicFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDynamicFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDynamicFee(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDynamicFee - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDynamicFee - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDynamicFee - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDynamicFee = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDynamicFee = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDynamicFee = fmt.Errorf("proto: unexpected end of group") -) diff --git a/legacy/types/errors.go b/legacy/types/errors.go deleted file mode 100644 index 70af5a6..0000000 --- a/legacy/types/errors.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - -package types - -import ( - errorsmod "cosmossdk.io/errors" -) - -// RootCodespace is the codespace for all errors defined in this package -const RootCodespace = "evmos" - -// ErrInvalidChainID returns an error resulting from an invalid chain ID. -var ErrInvalidChainID = errorsmod.Register(RootCodespace, 3, "invalid chain ID") diff --git a/legacy/types/gasmeter.go b/legacy/types/gasmeter.go deleted file mode 100644 index bdd25bc..0000000 --- a/legacy/types/gasmeter.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - fmt "fmt" - math "math" - - storetypes "cosmossdk.io/store/types" -) - -// ErrorNegativeGasConsumed defines an error thrown when the amount of gas refunded results in a -// negative gas consumed amount. -// Copied from cosmos-sdk -type ErrorNegativeGasConsumed struct { - Descriptor string -} - -// ErrorGasOverflow defines an error thrown when an action results gas consumption -// unsigned integer overflow. -type ErrorGasOverflow struct { - Descriptor string -} - -type infiniteGasMeterWithLimit struct { - consumed storetypes.Gas - limit storetypes.Gas -} - -// NewInfiniteGasMeterWithLimit returns a reference to a new infiniteGasMeter. -func NewInfiniteGasMeterWithLimit(limit storetypes.Gas) storetypes.GasMeter { - return &infiniteGasMeterWithLimit{ - consumed: 0, - limit: limit, - } -} - -// GasConsumed returns the gas consumed from the GasMeter. -func (g *infiniteGasMeterWithLimit) GasConsumed() storetypes.Gas { - return g.consumed -} - -// GasConsumedToLimit returns the gas limit if gas consumed is past the limit, -// otherwise it returns the consumed gas. -// NOTE: This behavior is only called when recovering from panic when -// BlockGasMeter consumes gas past the limit. -func (g *infiniteGasMeterWithLimit) GasConsumedToLimit() storetypes.Gas { - return g.consumed -} - -// Limit returns the gas limit of the GasMeter. -func (g *infiniteGasMeterWithLimit) Limit() storetypes.Gas { - return g.limit -} - -// addUint64Overflow performs the addition operation on two uint64 integers and -// returns a boolean on whether or not the result overflows. -func addUint64Overflow(a, b uint64) (uint64, bool) { - if math.MaxUint64-a < b { - return 0, true - } - - return a + b, false -} - -// ConsumeGas adds the given amount of gas to the gas consumed and panics if it overflows the limit or out of gas. -func (g *infiniteGasMeterWithLimit) 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) - if overflow { - panic(ErrorGasOverflow{descriptor}) - } -} - -// RefundGas will deduct the given amount from the gas consumed. If the amount is greater than the -// gas consumed, the function will panic. -// -// Use case: This functionality enables refunding gas to the transaction 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 *infiniteGasMeterWithLimit) RefundGas(amount storetypes.Gas, descriptor string) { - if g.consumed < amount { - panic(ErrorNegativeGasConsumed{Descriptor: descriptor}) - } - - g.consumed -= amount -} - -// IsPastLimit returns true if gas consumed is past limit, otherwise it returns false. -func (g *infiniteGasMeterWithLimit) IsPastLimit() bool { - return false -} - -// IsOutOfGas returns true if gas consumed is greater than or equal to gas limit, otherwise it returns false. -func (g *infiniteGasMeterWithLimit) IsOutOfGas() bool { - return false -} - -// String returns the BasicGasMeter's gas limit and gas consumed. -func (g *infiniteGasMeterWithLimit) String() string { - return fmt.Sprintf("InfiniteGasMeter:\n consumed: %d", g.consumed) -} - -// GasRemaining returns MaxUint64 since limit is not confined in infiniteGasMeter. -func (g *infiniteGasMeterWithLimit) GasRemaining() storetypes.Gas { - return math.MaxUint64 -} diff --git a/legacy/types/genesis.go b/legacy/types/genesis.go deleted file mode 100644 index fae4de8..0000000 --- a/legacy/types/genesis.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import "encoding/json" - -// GenesisState of the blockchain is represented here as a map of raw json -// messages key'd by a identifier string. -// The identifier is used to determine which module genesis information belongs -// to so it may be appropriately routed during init chain. -// Within this application default genesis information is retrieved from -// the ModuleBasicManager which populates json from each BasicModule -// object provided to it during init. -type GenesisState map[string]json.RawMessage diff --git a/legacy/types/hdpath.go b/legacy/types/hdpath.go deleted file mode 100644 index 9600f27..0000000 --- a/legacy/types/hdpath.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - ethaccounts "github.com/ethereum/go-ethereum/accounts" -) - -var ( - // Bip44CoinType satisfies EIP84. See https://github.com/ethereum/EIPs/issues/84 for more info. - Bip44CoinType uint32 = 60 - - // BIP44HDPath is the default BIP44 HD path used on Ethereum. - BIP44HDPath = ethaccounts.DefaultBaseDerivationPath.String() -) - -type ( - HDPathIterator func() ethaccounts.DerivationPath -) - -// HDPathIterator receives a base path as a string and a boolean for the desired iterator type and -// returns a function that iterates over the base HD path, returning the string. -func NewHDPathIterator(basePath string, ledgerIter bool) (HDPathIterator, error) { - hdPath, err := ethaccounts.ParseDerivationPath(basePath) - if err != nil { - return nil, err - } - - if ledgerIter { - return ethaccounts.LedgerLiveIterator(hdPath), nil - } - - return ethaccounts.DefaultIterator(hdPath), nil -} diff --git a/legacy/types/indexer.go b/legacy/types/indexer.go deleted file mode 100644 index 0247a13..0000000 --- a/legacy/types/indexer.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - abci "github.com/cometbft/cometbft/abci/types" - cmttypes "github.com/cometbft/cometbft/types" - "github.com/ethereum/go-ethereum/common" -) - -// EVMTxIndexer defines the interface of custom eth tx indexer. -type EVMTxIndexer interface { - // LastIndexedBlock returns -1 if indexer db is empty - LastIndexedBlock() (int64, error) - IndexBlock(*cmttypes.Block, []*abci.ExecTxResult) error - - // GetByTxHash returns nil if tx not found. - GetByTxHash(common.Hash) (*TxResult, error) - // GetByBlockAndIndex returns nil if tx not found. - GetByBlockAndIndex(int64, int32) (*TxResult, error) -} diff --git a/legacy/types/indexer.pb.go b/legacy/types/indexer.pb.go deleted file mode 100644 index b4d1c76..0000000 --- a/legacy/types/indexer.pb.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/types/v1/indexer.proto - -package types - -import ( - fmt "fmt" - _ "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. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// TxResult is the value stored in eth tx indexer -type TxResult struct { - // height of the blockchain - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // tx_index of the cosmos transaction - TxIndex uint32 `protobuf:"varint,2,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` - // msg_index in a batch transaction - MsgIndex uint32 `protobuf:"varint,3,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"` - // eth_tx_index is the index in the list of valid eth tx in the block, - // aka. the transaction list returned by eth_getBlock api. - EthTxIndex int32 `protobuf:"varint,4,opt,name=eth_tx_index,json=ethTxIndex,proto3" json:"eth_tx_index,omitempty"` - // failed is true if the eth transaction did not go succeed - Failed bool `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"` - // gas_used by the transaction. If it exceeds the block gas limit, - // it's set to gas limit, which is what's actually deducted by ante handler. - GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - // cumulative_gas_used specifies the cumulated amount of gas used for all - // processed messages within the current batch transaction. - CumulativeGasUsed uint64 `protobuf:"varint,7,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"` -} - -func (m *TxResult) Reset() { *m = TxResult{} } -func (m *TxResult) String() string { return proto.CompactTextString(m) } -func (*TxResult) ProtoMessage() {} -func (*TxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_1197e10a8be8ed28, []int{0} -} -func (m *TxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxResult.Merge(m, src) -} -func (m *TxResult) XXX_Size() int { - return m.Size() -} -func (m *TxResult) XXX_DiscardUnknown() { - xxx_messageInfo_TxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_TxResult proto.InternalMessageInfo - -func init() { - proto.RegisterType((*TxResult)(nil), "ethermint.types.v1.TxResult") -} - -func init() { proto.RegisterFile("ethermint/types/v1/indexer.proto", fileDescriptor_1197e10a8be8ed28) } - -var fileDescriptor_1197e10a8be8ed28 = []byte{ - // 299 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xb1, 0x4e, 0xf3, 0x30, - 0x14, 0x85, 0xe3, 0xbf, 0x6d, 0x9a, 0xdf, 0x82, 0x81, 0x80, 0xaa, 0x00, 0x52, 0xb0, 0x98, 0x32, - 0x25, 0x14, 0xb6, 0x8e, 0x2c, 0x88, 0xd5, 0x2a, 0x0b, 0x4b, 0x94, 0x36, 0x17, 0xdb, 0x52, 0x5d, - 0x57, 0xf5, 0x4d, 0x14, 0xde, 0x80, 0x91, 0x47, 0xe0, 0x71, 0x18, 0x3b, 0x32, 0xa2, 0x56, 0xbc, - 0x07, 0xaa, 0x13, 0x95, 0xc5, 0xf2, 0xd1, 0xf7, 0x5d, 0x1d, 0xe9, 0x50, 0x06, 0x28, 0x61, 0xad, - 0xd5, 0x12, 0x33, 0x7c, 0x5d, 0x81, 0xcd, 0xea, 0x71, 0xa6, 0x96, 0x25, 0x34, 0xb0, 0x4e, 0x57, - 0x6b, 0x83, 0x26, 0x0c, 0x0f, 0x46, 0xea, 0x8c, 0xb4, 0x1e, 0x5f, 0x9c, 0x09, 0x23, 0x8c, 0xc3, - 0xd9, 0xfe, 0xd7, 0x9a, 0xd7, 0x3f, 0x84, 0x06, 0xd3, 0x86, 0x83, 0xad, 0x16, 0x18, 0x8e, 0xa8, - 0x2f, 0x41, 0x09, 0x89, 0x11, 0x61, 0x24, 0xe9, 0xf1, 0x2e, 0x85, 0xe7, 0x34, 0xc0, 0x26, 0x77, - 0x15, 0xd1, 0x3f, 0x46, 0x92, 0x63, 0x3e, 0xc4, 0xe6, 0x71, 0x1f, 0xc3, 0x4b, 0xfa, 0x5f, 0x5b, - 0xd1, 0xb1, 0x9e, 0x63, 0x81, 0xb6, 0xa2, 0x85, 0x8c, 0x1e, 0x01, 0xca, 0xfc, 0x70, 0xdb, 0x67, - 0x24, 0x19, 0x70, 0x0a, 0x28, 0xa7, 0xdd, 0xf9, 0x88, 0xfa, 0x2f, 0x85, 0x5a, 0x40, 0x19, 0x0d, - 0x18, 0x49, 0x02, 0xde, 0xa5, 0x7d, 0xa3, 0x28, 0x6c, 0x5e, 0x59, 0x28, 0x23, 0x9f, 0x91, 0xa4, - 0xcf, 0x87, 0xa2, 0xb0, 0x4f, 0x16, 0xca, 0x30, 0xa5, 0xa7, 0xf3, 0x4a, 0x57, 0x8b, 0x02, 0x55, - 0x0d, 0xf9, 0xc1, 0x1a, 0x3a, 0xeb, 0xe4, 0x0f, 0x3d, 0xb4, 0xfe, 0xa4, 0xff, 0xf6, 0x71, 0xe5, - 0xdd, 0x4f, 0x3e, 0xb7, 0x31, 0xd9, 0x6c, 0x63, 0xf2, 0xbd, 0x8d, 0xc9, 0xfb, 0x2e, 0xf6, 0x36, - 0xbb, 0xd8, 0xfb, 0xda, 0xc5, 0xde, 0x33, 0x13, 0x0a, 0x65, 0x35, 0x4b, 0xe7, 0x46, 0x67, 0x50, - 0x6b, 0x63, 0xbb, 0xb7, 0xbe, 0xbd, 0x69, 0xe7, 0x9d, 0xf9, 0x6e, 0xaa, 0xbb, 0xdf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xfb, 0xee, 0x5a, 0x69, 0x78, 0x01, 0x00, 0x00, -} - -func (m *TxResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CumulativeGasUsed != 0 { - i = encodeVarintIndexer(dAtA, i, uint64(m.CumulativeGasUsed)) - i-- - dAtA[i] = 0x38 - } - if m.GasUsed != 0 { - i = encodeVarintIndexer(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.Failed { - i-- - if m.Failed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.EthTxIndex != 0 { - i = encodeVarintIndexer(dAtA, i, uint64(m.EthTxIndex)) - i-- - dAtA[i] = 0x20 - } - if m.MsgIndex != 0 { - i = encodeVarintIndexer(dAtA, i, uint64(m.MsgIndex)) - i-- - dAtA[i] = 0x18 - } - if m.TxIndex != 0 { - i = encodeVarintIndexer(dAtA, i, uint64(m.TxIndex)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintIndexer(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintIndexer(dAtA []byte, offset int, v uint64) int { - offset -= sovIndexer(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovIndexer(uint64(m.Height)) - } - if m.TxIndex != 0 { - n += 1 + sovIndexer(uint64(m.TxIndex)) - } - if m.MsgIndex != 0 { - n += 1 + sovIndexer(uint64(m.MsgIndex)) - } - if m.EthTxIndex != 0 { - n += 1 + sovIndexer(uint64(m.EthTxIndex)) - } - if m.Failed { - n += 2 - } - if m.GasUsed != 0 { - n += 1 + sovIndexer(uint64(m.GasUsed)) - } - if m.CumulativeGasUsed != 0 { - n += 1 + sovIndexer(uint64(m.CumulativeGasUsed)) - } - return n -} - -func sovIndexer(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozIndexer(x uint64) (n int) { - return sovIndexer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TxResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) - } - m.TxIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TxIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgIndex", wireType) - } - m.MsgIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MsgIndex |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthTxIndex", wireType) - } - m.EthTxIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthTxIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Failed = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CumulativeGasUsed", wireType) - } - m.CumulativeGasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIndexer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CumulativeGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIndexer(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIndexer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIndexer(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndexer - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndexer - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndexer - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthIndexer - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupIndexer - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthIndexer - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthIndexer = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIndexer = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupIndexer = fmt.Errorf("proto: unexpected end of group") -) diff --git a/legacy/types/int.go b/legacy/types/int.go deleted file mode 100644 index a6a47d3..0000000 --- a/legacy/types/int.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - fmt "fmt" - math "math" - "math/big" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" -) - -const maxBitLen = 256 - -// SafeInt64 checks for overflows while casting a uint64 to int64 value. -func SafeInt64(value uint64) (int64, error) { - if value > uint64(math.MaxInt64) { - return 0, errorsmod.Wrapf(errortypes.ErrInvalidHeight, "uint64 value %v cannot exceed %v", value, int64(math.MaxInt64)) - } - - // #nosec G701 G115 -- checked for int overflow already - return int64(value), nil -} - -// SafeNewIntFromBigInt constructs Int from big.Int, return error if more than 256bits -func SafeNewIntFromBigInt(i *big.Int) (sdkmath.Int, error) { - if !IsValidInt256(i) { - return sdkmath.NewInt(0), fmt.Errorf("big int out of bound: %s", i) - } - return sdkmath.NewIntFromBigInt(i), nil -} - -// IsValidInt256 check the bound of 256 bit number -func IsValidInt256(i *big.Int) bool { - return i == nil || i.BitLen() <= maxBitLen -} diff --git a/legacy/types/protocol.go b/legacy/types/protocol.go deleted file mode 100644 index a0d8828..0000000 --- a/legacy/types/protocol.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -// Constants to match up protocol versions and messages -const ( - eth65 = 65 - - // ProtocolVersion is the latest supported version of the eth protocol. - ProtocolVersion = eth65 -) diff --git a/legacy/types/validation.go b/legacy/types/validation.go deleted file mode 100644 index 80d0d6a..0000000 --- a/legacy/types/validation.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "bytes" - - errorsmod "cosmossdk.io/errors" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/ethereum/go-ethereum/common" -) - -// IsEmptyHash returns true if the hash corresponds to an empty ethereum hex hash. -func IsEmptyHash(hash string) bool { - return bytes.Equal(common.HexToHash(hash).Bytes(), common.Hash{}.Bytes()) -} - -// IsZeroAddress returns true if the address corresponds to an empty ethereum hex address. -func IsZeroAddress(address string) bool { - return bytes.Equal(common.HexToAddress(address).Bytes(), common.Address{}.Bytes()) -} - -// ValidateAddress returns an error if the provided string is either not a hex formatted string address -func ValidateAddress(address string) error { - if !common.IsHexAddress(address) { - return errorsmod.Wrapf( - errortypes.ErrInvalidAddress, "address '%s' is not a valid ethereum hex address", - address, - ) - } - return nil -} - -// ValidateNonZeroAddress returns an error if the provided string is not a hex -// formatted string address or is equal to zero -func ValidateNonZeroAddress(address string) error { - if IsZeroAddress(address) { - return errorsmod.Wrapf( - errortypes.ErrInvalidAddress, "address '%s' must not be zero", - address, - ) - } - return ValidateAddress(address) -} diff --git a/legacy/types/web3.pb.go b/legacy/types/web3.pb.go deleted file mode 100644 index 0e2369a..0000000 --- a/legacy/types/web3.pb.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/types/v1/web3.proto - -package types - -import ( - fmt "fmt" - _ "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. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ExtensionOptionsWeb3Tx is an extension option that specifies the typed chain id, -// the fee payer as well as its signature data. -type ExtensionOptionsWeb3Tx struct { - // typed_data_chain_id is used only in EIP712 Domain and should match - // Ethereum network ID in a Web3 provider (e.g. Metamask). - TypedDataChainID uint64 `protobuf:"varint,1,opt,name=typed_data_chain_id,json=typedDataChainId,proto3" json:"typedDataChainID,omitempty"` - // fee_payer is an account address for the fee payer. It will be validated - // during EIP712 signature checking. - FeePayer string `protobuf:"bytes,2,opt,name=fee_payer,json=feePayer,proto3" json:"feePayer,omitempty"` - // fee_payer_sig is a signature data from the fee paying account, - // allows to perform fee delegation when using EIP712 Domain. - FeePayerSig []byte `protobuf:"bytes,3,opt,name=fee_payer_sig,json=feePayerSig,proto3" json:"feePayerSig,omitempty"` -} - -func (m *ExtensionOptionsWeb3Tx) Reset() { *m = ExtensionOptionsWeb3Tx{} } -func (m *ExtensionOptionsWeb3Tx) String() string { return proto.CompactTextString(m) } -func (*ExtensionOptionsWeb3Tx) ProtoMessage() {} -func (*ExtensionOptionsWeb3Tx) Descriptor() ([]byte, []int) { - return fileDescriptor_9eb7cd56e3c92bc3, []int{0} -} -func (m *ExtensionOptionsWeb3Tx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtensionOptionsWeb3Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtensionOptionsWeb3Tx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExtensionOptionsWeb3Tx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionOptionsWeb3Tx.Merge(m, src) -} -func (m *ExtensionOptionsWeb3Tx) XXX_Size() int { - return m.Size() -} -func (m *ExtensionOptionsWeb3Tx) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionOptionsWeb3Tx.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtensionOptionsWeb3Tx proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExtensionOptionsWeb3Tx)(nil), "ethermint.types.v1.ExtensionOptionsWeb3Tx") -} - -func init() { proto.RegisterFile("ethermint/types/v1/web3.proto", fileDescriptor_9eb7cd56e3c92bc3) } - -var fileDescriptor_9eb7cd56e3c92bc3 = []byte{ - // 304 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x2d, 0xc9, 0x48, - 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, - 0x4f, 0x4d, 0x32, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x4b, 0xeb, 0x81, 0xa5, - 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xd2, 0xfa, 0x20, 0x16, 0x44, 0xa5, - 0xd2, 0x57, 0x46, 0x2e, 0x31, 0xd7, 0x8a, 0x92, 0xd4, 0xbc, 0xe2, 0xcc, 0xfc, 0x3c, 0xff, 0x82, - 0x92, 0xcc, 0xfc, 0xbc, 0xe2, 0xf0, 0xd4, 0x24, 0xe3, 0x90, 0x0a, 0xa1, 0x44, 0x2e, 0x61, 0x90, - 0xe6, 0x94, 0xf8, 0x94, 0xc4, 0x92, 0xc4, 0xf8, 0xe4, 0x8c, 0xc4, 0xcc, 0xbc, 0xf8, 0xcc, 0x14, - 0x09, 0x46, 0x05, 0x46, 0x0d, 0x16, 0x27, 0xa3, 0x47, 0xf7, 0xe4, 0x05, 0x42, 0x40, 0xd2, 0x2e, - 0x89, 0x25, 0x89, 0xce, 0x20, 0x49, 0x4f, 0x97, 0x57, 0xf7, 0xe4, 0xa5, 0x4a, 0xd0, 0xc4, 0x74, - 0xf2, 0x73, 0x33, 0x4b, 0x52, 0x73, 0x0b, 0x4a, 0x2a, 0x83, 0x04, 0xd0, 0xe4, 0x52, 0x84, 0x8c, - 0xb9, 0x38, 0xd3, 0x52, 0x53, 0xe3, 0x0b, 0x12, 0x2b, 0x53, 0x8b, 0x24, 0x98, 0x14, 0x18, 0x35, - 0x38, 0x9d, 0xc4, 0x5e, 0xdd, 0x93, 0x17, 0x4a, 0x4b, 0x4d, 0x0d, 0x00, 0x89, 0x21, 0x69, 0xe6, - 0x80, 0x89, 0x09, 0xd9, 0x72, 0xf1, 0xc2, 0x35, 0xc5, 0x17, 0x67, 0xa6, 0x4b, 0x30, 0x2b, 0x30, - 0x6a, 0xf0, 0x38, 0x49, 0xbe, 0xba, 0x27, 0x2f, 0x0a, 0x53, 0x14, 0x9c, 0x99, 0x8e, 0xa4, 0x97, - 0x1b, 0x49, 0xd8, 0x8a, 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x93, 0xd5, 0x89, 0x47, 0x72, 0x8c, 0x17, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, - 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x29, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, - 0xea, 0xa7, 0x96, 0xe5, 0xe6, 0x17, 0x43, 0xc9, 0x32, 0x23, 0x03, 0x48, 0x58, 0x27, 0xb1, 0x81, - 0x83, 0xce, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x68, 0xc3, 0xd2, 0x11, 0x85, 0x01, 0x00, 0x00, -} - -func (m *ExtensionOptionsWeb3Tx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExtensionOptionsWeb3Tx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExtensionOptionsWeb3Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FeePayerSig) > 0 { - i -= len(m.FeePayerSig) - copy(dAtA[i:], m.FeePayerSig) - i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayerSig))) - i-- - dAtA[i] = 0x1a - } - if len(m.FeePayer) > 0 { - i -= len(m.FeePayer) - copy(dAtA[i:], m.FeePayer) - i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayer))) - i-- - dAtA[i] = 0x12 - } - if m.TypedDataChainID != 0 { - i = encodeVarintWeb3(dAtA, i, uint64(m.TypedDataChainID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintWeb3(dAtA []byte, offset int, v uint64) int { - offset -= sovWeb3(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExtensionOptionsWeb3Tx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedDataChainID != 0 { - n += 1 + sovWeb3(uint64(m.TypedDataChainID)) - } - l = len(m.FeePayer) - if l > 0 { - n += 1 + l + sovWeb3(uint64(l)) - } - l = len(m.FeePayerSig) - if l > 0 { - n += 1 + l + sovWeb3(uint64(l)) - } - return n -} - -func sovWeb3(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozWeb3(x uint64) (n int) { - return sovWeb3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExtensionOptionsWeb3Tx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedDataChainID", wireType) - } - m.TypedDataChainID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TypedDataChainID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthWeb3 - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthWeb3 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeePayer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayerSig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWeb3 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWeb3 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeePayerSig = append(m.FeePayerSig[:0], dAtA[iNdEx:postIndex]...) - if m.FeePayerSig == nil { - m.FeePayerSig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWeb3(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWeb3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipWeb3(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthWeb3 - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupWeb3 - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthWeb3 - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthWeb3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowWeb3 = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupWeb3 = fmt.Errorf("proto: unexpected end of group") -) From 2f2ef6ab5cd1a08de62581093870f74af4f43738 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 16 Sep 2025 16:16:05 +0200 Subject: [PATCH 52/66] fix(app): remove unused active precompiles options --- app/precompiles.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/app/precompiles.go b/app/precompiles.go index 219cc46..cdf3191 100644 --- a/app/precompiles.go +++ b/app/precompiles.go @@ -44,24 +44,6 @@ func defaultOptionals() Optionals { type Option func(opts *Optionals) -func WithAddressCodec(codec address.Codec) Option { - return func(opts *Optionals) { - opts.AddressCodec = codec - } -} - -func WithValidatorAddrCodec(codec address.Codec) Option { - return func(opts *Optionals) { - opts.ValidatorAddrCodec = codec - } -} - -func WithConsensusAddrCodec(codec address.Codec) Option { - return func(opts *Optionals) { - opts.ConsensusAddrCodec = codec - } -} - const bech32PrecompileBaseGas = 6_000 // AvailableStaticPrecompiles returns the list of all available static precompiled contracts. From 963b6faa9f17270939927e120212134c6a8fba79 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Tue, 16 Sep 2025 16:54:56 +0200 Subject: [PATCH 53/66] feat(app): custom `ante` module --- app/ante/ante.go | 54 ++++++++++++++++++++++++++++++++++++++ app/ante/cosmos_handler.go | 47 +++++++++++++++++++++++++++++++++ app/ante/evm_handler.go | 23 ++++++++++++++++ app/app.go | 12 ++------- 4 files changed, 126 insertions(+), 10 deletions(-) create mode 100644 app/ante/ante.go create mode 100644 app/ante/cosmos_handler.go create mode 100644 app/ante/evm_handler.go diff --git a/app/ante/ante.go b/app/ante/ante.go new file mode 100644 index 0000000..4f78145 --- /dev/null +++ b/app/ante/ante.go @@ -0,0 +1,54 @@ +package ante + +import ( + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/evm/ante" + + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" +) + +// NewAnteHandler returns an ante handler responsible for attempting to route an +// Ethereum or SDK transaction to an internal ante handler for performing +// transaction-level processing (e.g. fee payment, signature verification) before +// being passed onto it's respective handler. +func NewAnteHandler(options ante.HandlerOptions) sdk.AnteHandler { + return func( + ctx sdk.Context, tx sdk.Tx, sim bool, + ) (newCtx sdk.Context, err error) { + var anteHandler sdk.AnteHandler + + txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx) + if ok { + opts := txWithExtensions.GetExtensionOptions() + if len(opts) > 0 { + switch typeURL := opts[0].GetTypeUrl(); typeURL { + case "/cosmos.evm.vm.v1.ExtensionOptionsEthereumTx": + // handle as *evmtypes.MsgEthereumTx + anteHandler = newMonoEVMAnteHandler(options) + case "/cosmos.evm.types.v1.ExtensionOptionDynamicFeeTx": + // cosmos-sdk tx with dynamic fee extension + anteHandler = newCosmosAnteHandler(options) + default: + return ctx, errorsmod.Wrapf( + errortypes.ErrUnknownExtensionOptions, + "rejecting tx with unsupported extension option: %s", typeURL, + ) + } + + return anteHandler(ctx, tx, sim) + } + } + + // handle as totally normal Cosmos SDK tx + switch tx.(type) { + case sdk.Tx: + anteHandler = newCosmosAnteHandler(options) + default: + return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid transaction type: %T", tx) + } + + return anteHandler(ctx, tx, sim) + } +} diff --git a/app/ante/cosmos_handler.go b/app/ante/cosmos_handler.go new file mode 100644 index 0000000..7889702 --- /dev/null +++ b/app/ante/cosmos_handler.go @@ -0,0 +1,47 @@ +package ante + +import ( + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + baseevmante "github.com/cosmos/evm/ante" + cosmosante "github.com/cosmos/evm/ante/cosmos" + evmante "github.com/cosmos/evm/ante/evm" + evmtypes "github.com/cosmos/evm/x/vm/types" + ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante" + poaante "github.com/xrplevm/node/v9/x/poa/ante" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + sdkvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" +) + +// newCosmosAnteHandler creates the default ante handler for Cosmos transactions +func newCosmosAnteHandler(options baseevmante.HandlerOptions) sdk.AnteHandler { + return sdk.ChainAnteDecorators( + cosmosante.NewRejectMessagesDecorator(), // reject MsgEthereumTxs + cosmosante.NewAuthzLimiterDecorator( // disable the Msg types that cannot be included on an authz.MsgExec msgs field + sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), + sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), + sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), + sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), + sdk.MsgTypeURL(&sdkvesting.MsgCreateVestingAccount{}), + sdk.MsgTypeURL(&evmtypes.MsgEthereumTx{}), + ), + ante.NewSetUpContextDecorator(), + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), + ante.NewValidateBasicDecorator(), + ante.NewTxTimeoutHeightDecorator(), + ante.NewValidateMemoDecorator(options.AccountKeeper), + cosmosante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), + ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), + // SetPubKeyDecorator must be called before all signature verification decorators + ante.NewSetPubKeyDecorator(options.AccountKeeper), + ante.NewValidateSigCountDecorator(options.AccountKeeper), + ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), + ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + ante.NewIncrementSequenceDecorator(options.AccountKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), + evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), + poaante.NewPoaDecorator(), + ) +} diff --git a/app/ante/evm_handler.go b/app/ante/evm_handler.go new file mode 100644 index 0000000..bd87f9f --- /dev/null +++ b/app/ante/evm_handler.go @@ -0,0 +1,23 @@ +package ante + +import ( + "github.com/cosmos/evm/ante" + evmante "github.com/cosmos/evm/ante/evm" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// newMonoEVMAnteHandler creates the sdk.AnteHandler implementation for the EVM transactions. +func newMonoEVMAnteHandler(options ante.HandlerOptions) sdk.AnteHandler { + decorators := []sdk.AnteDecorator{ + evmante.NewEVMMonoDecorator( + options.AccountKeeper, + options.FeeMarketKeeper, + options.EvmKeeper, + options.MaxTxGasWanted, + ), + ante.NewTxListenerDecorator(options.PendingTxListener), + } + + return sdk.ChainAnteDecorators(decorators...) +} diff --git a/app/app.go b/app/app.go index b0d7bc0..977ff0a 100644 --- a/app/app.go +++ b/app/app.go @@ -28,7 +28,7 @@ import ( paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" ethante "github.com/cosmos/evm/ante/evm" - ante "github.com/cosmos/evm/evmd/ante" + "github.com/xrplevm/node/v9/app/ante" evmante "github.com/cosmos/evm/ante" etherminttypes "github.com/cosmos/evm/types" @@ -129,7 +129,6 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper" "github.com/xrplevm/node/v9/docs" - poaante "github.com/xrplevm/node/v9/x/poa/ante" poakeeper "github.com/xrplevm/node/v9/x/poa/keeper" poatypes "github.com/xrplevm/node/v9/x/poa/types" @@ -891,14 +890,7 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, maxGasWanted uint64) { SigGasConsumer: evmante.SigVerificationGasConsumer, MaxTxGasWanted: maxGasWanted, TxFeeChecker: ethante.NewDynamicFeeChecker(app.FeeMarketKeeper), - ExtraDecorator: poaante.NewPoaDecorator(), - AuthzDisabledMsgTypes: []string{ - sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), - sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), - }, - PendingTxListener: app.OnPendingTx, + PendingTxListener: app.OnPendingTx, } if err := handlerOpts.Validate(); err != nil { From 3ccc5894a321788177524393d22e93319a70e129 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 17 Sep 2025 10:31:16 +0200 Subject: [PATCH 54/66] fix(app): remove non-existing cosmos/evm `EthAccount` type from sdk.AccountI registered implementations --- app/encoding.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/encoding.go b/app/encoding.go index f143028..8c33a6a 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -14,7 +14,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" enccodec "github.com/cosmos/evm/encoding/codec" "github.com/cosmos/evm/ethereum/eip712" - evmtypes "github.com/cosmos/evm/types" erc20types "github.com/cosmos/evm/x/erc20/types" vmtypes "github.com/cosmos/evm/x/vm/types" "github.com/cosmos/gogoproto/proto" @@ -42,11 +41,9 @@ func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { }) interfaceRegistry.RegisterImplementations((*sdk.AccountI)(nil), - &evmtypes.EthAccount{}, // cosmos-evm &legacytypes.EthAccount{}, // evmos (legacy) ) interfaceRegistry.RegisterImplementations((*authtypes.AccountI)(nil), - &evmtypes.EthAccount{}, // cosmos-evm &legacytypes.EthAccount{}, // evmos (legacy) ) From f88f968523a555c610b7732fb3d9d0016944e745 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 17 Sep 2025 11:05:57 +0200 Subject: [PATCH 55/66] chore: replace cosmos/evm and cosmos-sdk versions --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index b7718b4..ad4d15d 100644 --- a/go.mod +++ b/go.mod @@ -280,12 +280,12 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // use Cosmos-SDK fork to enable Ledger functionality - github.com/cosmos/cosmos-sdk => ../cosmos-sdk + github.com/cosmos/cosmos-sdk => github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.2 // map cosmos/evm to evmos // fix cosmos-sdk store path mismatch github.com/cosmos/cosmos-sdk/store => cosmossdk.io/store v1.1.2 // TODO: remove this once we have a proper fork of cosmos/evm - github.com/cosmos/evm => ../evm + github.com/cosmos/evm => github.com/xrplevm/evm v0.4.1-xrplevm.1 // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 // use exrp Evmos fork diff --git a/go.sum b/go.sum index 3974c17..f1c7534 100644 --- a/go.sum +++ b/go.sum @@ -1733,6 +1733,10 @@ github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= +github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.2 h1:6wrgalo5fN/iBbDSfBYZ1RldNFHZIxE7ARV1JbrrBtM= +github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.2/go.mod h1:7U3+WHZtI44dEOnU46+lDzBb2tFh1QlMvi8Z5JugopI= +github.com/xrplevm/evm v0.4.1-xrplevm.1 h1:ZLkJrj9Gv3yQfYd67IuK/URhSz3BLovKZUWn6iKWTNc= +github.com/xrplevm/evm v0.4.1-xrplevm.1/go.mod h1:cNTIB4xuCht7Y6EnGdkwR2c2nCmhILZ8WHSdQ5m+g/E= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 092bd21ca51fa8a25c437620361e80b94a43770f Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 17 Sep 2025 11:10:42 +0200 Subject: [PATCH 56/66] fix(testutil): update testutil with changes --- app/simulation_test.go | 31 ++++++------------- .../integration/exrp/integration/setup.go | 3 +- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/app/simulation_test.go b/app/simulation_test.go index 82c4c00..5f7055c 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -10,14 +10,12 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/evm/ante" + evmante "github.com/cosmos/evm/ante" ethante "github.com/cosmos/evm/ante/evm" "github.com/cosmos/evm/crypto/ethsecp256k1" - evmante "github.com/cosmos/evm/evmd/ante" etherminttypes "github.com/cosmos/evm/types" "github.com/xrplevm/node/v9/app" - - poaante "github.com/xrplevm/node/v9/x/poa/ante" + "github.com/xrplevm/node/v9/app/ante" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" @@ -27,8 +25,6 @@ import ( simulationtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/require" ) @@ -60,7 +56,7 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap app.EVMAppOptions, baseapp.SetChainID(config.ChainID), ) - handlerOpts := &ante.HandlerOptions{ + handlerOpts := &evmante.HandlerOptions{ Cdc: bApp.AppCodec(), AccountKeeper: bApp.AccountKeeper, BankKeeper: bApp.BankKeeper, @@ -68,25 +64,18 @@ func NewSimApp(logger log.Logger, db dbm.DB, config simulationtypes.Config) (*ap EvmKeeper: bApp.EvmKeeper, FeegrantKeeper: bApp.FeeGrantKeeper, // TODO: Update when migrating to v10 - IBCKeeper: bApp.IBCKeeper, - FeeMarketKeeper: bApp.FeeMarketKeeper, - SignModeHandler: bApp.GetTxConfig().SignModeHandler(), - SigGasConsumer: ante.SigVerificationGasConsumer, - MaxTxGasWanted: 0, - TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), - ExtraDecorator: poaante.NewPoaDecorator(), - AuthzDisabledMsgTypes: []string{ - sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgCancelUnbondingDelegation{}), - sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), - }, + IBCKeeper: bApp.IBCKeeper, + FeeMarketKeeper: bApp.FeeMarketKeeper, + SignModeHandler: bApp.GetTxConfig().SignModeHandler(), + SigGasConsumer: evmante.SigVerificationGasConsumer, + MaxTxGasWanted: 0, + TxFeeChecker: ethante.NewDynamicFeeChecker(bApp.FeeMarketKeeper), PendingTxListener: bApp.OnPendingTx, } if err := handlerOpts.Validate(); err != nil { panic(err) } - handler := evmante.NewAnteHandler(*handlerOpts) + handler := ante.NewAnteHandler(*handlerOpts) bApp.SetAnteHandler(handler) diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index 93c9a2b..9fc82d9 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -9,6 +9,7 @@ import ( "time" "github.com/cosmos/gogoproto/proto" + legacytypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" @@ -111,7 +112,7 @@ func createGenesisAccounts(accounts []sdktypes.AccAddress) []authtypes.GenesisAc for _, acc := range accounts { baseAcc := authtypes.NewBaseAccount(acc, nil, 0, 0) // TODO: Update when replacing with forked cosmos/evm version is installed - ethAcc := &evmostypes.EthAccount{ + ethAcc := &legacytypes.EthAccount{ BaseAccount: baseAcc, CodeHash: emptyCodeHash, } From ab834285179923156820dee1b32c3089e54e2014 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 17 Sep 2025 12:34:50 +0200 Subject: [PATCH 57/66] fix(cmd): evm chain id parsing --- cmd/exrpd/cmd/chain.go | 19 +++++++++++++++++++ cmd/exrpd/cmd/root.go | 14 ++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 cmd/exrpd/cmd/chain.go diff --git a/cmd/exrpd/cmd/chain.go b/cmd/exrpd/cmd/chain.go new file mode 100644 index 0000000..8cdf8ca --- /dev/null +++ b/cmd/exrpd/cmd/chain.go @@ -0,0 +1,19 @@ +package cmd + +const ( + DevnetChainID string = "exrp_1440002-1" + TestnetChainID string = "xrplevm_1449000-1" + MainnetChainID string = "xrplevm_1440000-1" +) + +const ( + MainnetEVMChainID uint64 = 1440000 + TestnetEVMChainID uint64 = 1449000 + DevnetEVMChainID uint64 = 1440002 +) + +var CosmosToEVMChainID = map[string]uint64{ + DevnetChainID: DevnetEVMChainID, + TestnetChainID: TestnetEVMChainID, + MainnetChainID: MainnetEVMChainID, +} diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index d380a61..e283576 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -66,7 +66,7 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { dbm.NewMemDB(), nil, true, nil, tempDir(app.DefaultNodeHome), - 1440002, + 0, 0, emptyAppOptions{}, app.NoOpEVMOptions, @@ -84,7 +84,7 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.FlagBroadcastMode). + WithBroadcastMode(flags.BroadcastSync). WithHomeDir(app.DefaultNodeHome). WithKeyringOptions(evmkeyring.Option()). WithLedgerHasProtobuf(true). @@ -130,7 +130,6 @@ func NewRootCmd() (*cobra.Command, sdktestutil.TestEncodingConfig) { return err } - // TODO: retrieve evmChainID from genesis file customAppTemplate, customAppConfig := InitAppConfig(app.BaseDenom, 1440002) customTMConfig := initTendermintConfig() return sdkserver.InterceptConfigsPreRunHandler( @@ -373,8 +372,6 @@ func (a appCreator) newApp( baseapp.SetChainID(chainID), } - _ = cast.ToUint64(appOpts.Get(flags.FlagChainID)) - return app.New( logger, db, @@ -382,8 +379,7 @@ func (a appCreator) newApp( true, skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), - // TODO: Review this - 1440002, + CosmosToEVMChainID[chainID], cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)), appOpts, app.EVMAppOptions, @@ -407,6 +403,8 @@ func (a appCreator) appExport( return servertypes.ExportedApp{}, errors.New("application home not set") } + chainID := cast.ToString(appOpts.Get(flags.FlagChainID)) + app := app.New( logger, db, @@ -414,7 +412,7 @@ func (a appCreator) appExport( height == -1, // -1: no height provided map[int64]bool{}, homePath, - 1440002, + CosmosToEVMChainID[chainID], uint(1), appOpts, app.EVMAppOptions, From 0871d0b2d78a0eb10544a88582c5e296af32b713 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 17 Sep 2025 12:55:37 +0200 Subject: [PATCH 58/66] fix(testutil): integration testsuite genesis account types fix --- testutil/integration/exrp/integration/setup.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/testutil/integration/exrp/integration/setup.go b/testutil/integration/exrp/integration/setup.go index 9fc82d9..e0f50f3 100644 --- a/testutil/integration/exrp/integration/setup.go +++ b/testutil/integration/exrp/integration/setup.go @@ -9,8 +9,6 @@ import ( "time" "github.com/cosmos/gogoproto/proto" - legacytypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" sdkmath "cosmossdk.io/math" @@ -27,8 +25,6 @@ import ( govtypesv1 "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" - "github.com/ethereum/go-ethereum/crypto" - evmostypes "github.com/cosmos/evm/types" erc20types "github.com/cosmos/evm/x/erc20/types" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" @@ -108,15 +104,10 @@ func createValidatorSetAndSigners(numberOfValidators int) (*cmttypes.ValidatorSe func createGenesisAccounts(accounts []sdktypes.AccAddress) []authtypes.GenesisAccount { numberOfAccounts := len(accounts) genAccounts := make([]authtypes.GenesisAccount, 0, numberOfAccounts) - emptyCodeHash := crypto.Keccak256Hash(nil).String() + for _, acc := range accounts { baseAcc := authtypes.NewBaseAccount(acc, nil, 0, 0) - // TODO: Update when replacing with forked cosmos/evm version is installed - ethAcc := &legacytypes.EthAccount{ - BaseAccount: baseAcc, - CodeHash: emptyCodeHash, - } - genAccounts = append(genAccounts, ethAcc) + genAccounts = append(genAccounts, baseAcc) } return genAccounts } From 4268b43c74a072cab29a9d465db275b41a2c5d8f Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Wed, 17 Sep 2025 13:16:45 +0200 Subject: [PATCH 59/66] chore: bump Dockerfile go version to 1.23.8 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index efae1a7..2e28e3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.11 AS base +FROM golang:1.23.8 AS base USER root RUN apt update && \ apt-get install -y \ @@ -26,7 +26,7 @@ RUN make test-sim-full-app-fast RUN touch /test.lock -FROM golang:1.22.11 AS release +FROM golang:1.23.8 AS release WORKDIR / COPY --from=integration /test.lock /test.lock COPY --from=build /app/bin/exrpd /usr/bin/exrpd From b5cdb1c04c4a207df5bd638a9887e28f8503c056 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 18 Sep 2025 12:40:08 +0200 Subject: [PATCH 60/66] refactor: replace localnet chain-id with `exrp_1449999-1` --- app/config.go | 2 +- local-node.sh | 2 +- testutil/constants/constants.go | 4 ++-- testutil/integration/exrp/common/config.go | 4 ++-- testutil/integration/exrp/common/setup.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/config.go b/app/config.go index d9af93b..513959e 100644 --- a/app/config.go +++ b/app/config.go @@ -45,7 +45,7 @@ var ( Decimals: evmtypes.EighteenDecimals, } - LocalnetEVMChainID uint64 = 1440002 + LocalnetEVMChainID uint64 = 1449999 MainnetEVMChainID uint64 = 1440000 TestnetEVMChainID uint64 = 1449000 DevnetEVMChainID uint64 = 1440002 diff --git a/local-node.sh b/local-node.sh index 8af8208..ef5dcba 100755 --- a/local-node.sh +++ b/local-node.sh @@ -1,4 +1,4 @@ -CHAINID="exrp_1440002-1" +CHAINID="exrp_1449999-1" MONIKER="localnet" # Remember to change to other types of keyring like 'file' in-case exposing to outside world, # otherwise your balance will be wiped quickly diff --git a/testutil/constants/constants.go b/testutil/constants/constants.go index a53b7de..4e0fc19 100644 --- a/testutil/constants/constants.go +++ b/testutil/constants/constants.go @@ -15,8 +15,8 @@ const ( var ( LocalnetChainID = testconstants.ChainID{ - ChainID: "exrp_1440002-1", - EVMChainID: 1440002, + ChainID: "exrp_1449999-1", + EVMChainID: 1449999, } ExampleChainCoinInfo = map[testconstants.ChainID]evmtypes.EvmCoinInfo{ diff --git a/testutil/integration/exrp/common/config.go b/testutil/integration/exrp/common/config.go index 17e1c68..c8d3c1a 100644 --- a/testutil/integration/exrp/common/config.go +++ b/testutil/integration/exrp/common/config.go @@ -12,7 +12,7 @@ import ( const ( bip44CoinType = 60 - ChainID = "exrp_1440002-1" + ChainID = "exrp_1449999-1" ) // Config defines the configuration for a chain. @@ -43,7 +43,7 @@ type CustomGenesisState map[string]interface{} func DefaultConfig() Config { return Config{ ChainID: ChainID, - EIP155ChainID: big.NewInt(1440002), + EIP155ChainID: big.NewInt(1449999), Balances: nil, Denom: app.BaseDenom, ChainCoins: DefaultChainCoins(), diff --git a/testutil/integration/exrp/common/setup.go b/testutil/integration/exrp/common/setup.go index a259ea8..12f9a60 100644 --- a/testutil/integration/exrp/common/setup.go +++ b/testutil/integration/exrp/common/setup.go @@ -101,7 +101,7 @@ func CreateExrpApp(chainID string, customBaseAppOptions ...func(*baseapp.BaseApp // Create exrp app loadLatest := true - evmChainID := uint64(1440002) + evmChainID := uint64(1449999) invCheckPeriod := uint(5) return app.New( From 3e7bbf3587e72d5207479fda65761df8f807e54b Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Thu, 18 Sep 2025 17:54:36 +0200 Subject: [PATCH 61/66] fix(app): drop ibc transfer v2 support --- app/app.go | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/app/app.go b/app/app.go index 977ff0a..c16f7e3 100644 --- a/app/app.go +++ b/app/app.go @@ -16,8 +16,6 @@ import ( "github.com/ethereum/go-ethereum/common" - ratelimitv2 "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/v2" - "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -33,22 +31,16 @@ import ( evmante "github.com/cosmos/evm/ante" etherminttypes "github.com/cosmos/evm/types" cosmosevmutils "github.com/cosmos/evm/utils" - erc20v2 "github.com/cosmos/evm/x/erc20/v2" "github.com/cosmos/gogoproto/proto" ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v10" ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/types" ibctransfer "github.com/cosmos/ibc-go/v10/modules/apps/transfer" ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types" - ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v10/testing" "github.com/ethereum/go-ethereum/core/vm" "github.com/spf13/cast" - transferv2 "github.com/cosmos/evm/x/ibc/transfer/v2" - vmmod "github.com/cosmos/evm/x/vm" - ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api" - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "github.com/cosmos/cosmos-sdk/runtime" @@ -57,6 +49,7 @@ import ( consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" evmmempool "github.com/cosmos/evm/mempool" + vmmod "github.com/cosmos/evm/x/vm" "github.com/xrplevm/node/v9/x/poa" "cosmossdk.io/log" @@ -611,22 +604,6 @@ func New( AddRoute(ibctransfertypes.ModuleName, transferStack) app.IBCKeeper.SetRouter(ibcRouter) - /**** IBC V2 ****/ - - var transferStackV2 ibcapi.IBCModule - transferStackV2 = transferv2.NewIBCModule(app.TransferKeeper) - transferStackV2 = ratelimitv2.NewIBCMiddleware(app.RateLimitKeeper, transferStackV2) - transferStackV2 = erc20v2.NewIBCMiddleware(transferStackV2, app.Erc20Keeper) - - ibcRouterV2 := ibcapi.NewRouter() - ibcRouterV2.AddRoute(ibctransfertypes.ModuleName, transferStackV2) - - clientKeeper := app.IBCKeeper.ClientKeeper - storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() - - tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) - clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) - /**** Module Hooks ****/ // register hooks after all modules have been initialized @@ -664,7 +641,6 @@ func New( ibc.NewAppModule(app.IBCKeeper), ica.NewAppModule(nil, &app.ICAHostKeeper), transferModule, - ibctm.NewAppModule(tmLightClientModule), ratelimit.NewAppModule(appCodec, app.RateLimitKeeper), // Ethermint app modules From 132aeb34baf8b2f2b0593660511aac9bc724596f Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 19 Sep 2025 11:17:40 +0200 Subject: [PATCH 62/66] refactor: register legacy implementations --- app/app.go | 8 + app/encoding.go | 39 +- .../v9/legacy/evm/types/access_list.go | 57 - app/upgrades/v9/legacy/evm/types/events.pb.go | 1266 ---- app/upgrades/v9/legacy/evm/types/evm.pb.go | 4586 ------------- .../v9/legacy/evm/types/genesis.pb.go | 684 -- app/upgrades/v9/legacy/evm/types/query.pb.go | 6103 ----------------- .../v9/legacy/evm/types/query.pb.gw.go | 1178 ---- app/upgrades/v9/legacy/evm/types/storage.go | 62 - app/upgrades/v9/legacy/evm/types/tx.pb.go | 3270 --------- app/upgrades/v9/legacy/evm/types/tx.pb.gw.go | 171 - app/upgrades/v9/legacy/types/account.pb.go | 377 - app/upgrades/v9/upgrades.go | 4 +- cmd/exrpd/cmd/chain.go | 21 +- go.mod | 3 - proto/ethermint/evm/v1/events.proto | 46 + proto/ethermint/evm/v1/evm.proto | 262 + proto/ethermint/evm/v1/genesis.proto | 31 + proto/ethermint/evm/v1/query.proto | 312 + proto/ethermint/evm/v1/tx.proto | 198 + proto/ethermint/feemarket/v1/events.proto | 20 + proto/ethermint/feemarket/v1/feemarket.proto | 44 + proto/ethermint/feemarket/v1/genesis.proto | 23 + proto/ethermint/feemarket/v1/query.proto | 58 + proto/ethermint/feemarket/v1/tx.proto | 36 + proto/ethermint/types/v1/account.proto | 27 + proto/ethermint/types/v1/dynamic_fee.proto | 16 + proto/ethermint/types/v1/indexer.proto | 32 + proto/ethermint/types/v1/web3.proto | 27 + proto/evmos/erc20/v1/erc20.proto | 87 + proto/evmos/erc20/v1/events.proto | 50 + proto/evmos/erc20/v1/genesis.proto | 32 + proto/evmos/erc20/v1/query.proto | 84 + proto/evmos/erc20/v1/tx.proto | 176 + proto/packages/blockchain/poa/genesis.proto | 10 + proto/packages/blockchain/poa/params.proto | 7 + proto/packages/blockchain/poa/query.proto | 25 + proto/packages/blockchain/poa/tx.proto | 48 + state_sync.sh | 12 + types/legacy/ethermint/evm/storage.go | 5 + .../legacy/ethermint}/types/account.go | 1 - x/poa/types/genesis.pb.go | 4 +- x/poa/types/params.pb.go | 4 +- x/poa/types/query.pb.go | 4 +- x/poa/types/tx.pb.go | 58 +- 45 files changed, 1763 insertions(+), 17805 deletions(-) delete mode 100644 app/upgrades/v9/legacy/evm/types/access_list.go delete mode 100644 app/upgrades/v9/legacy/evm/types/events.pb.go delete mode 100644 app/upgrades/v9/legacy/evm/types/evm.pb.go delete mode 100644 app/upgrades/v9/legacy/evm/types/genesis.pb.go delete mode 100644 app/upgrades/v9/legacy/evm/types/query.pb.go delete mode 100644 app/upgrades/v9/legacy/evm/types/query.pb.gw.go delete mode 100644 app/upgrades/v9/legacy/evm/types/storage.go delete mode 100644 app/upgrades/v9/legacy/evm/types/tx.pb.go delete mode 100644 app/upgrades/v9/legacy/evm/types/tx.pb.gw.go delete mode 100644 app/upgrades/v9/legacy/types/account.pb.go create mode 100644 proto/ethermint/evm/v1/events.proto create mode 100644 proto/ethermint/evm/v1/evm.proto create mode 100644 proto/ethermint/evm/v1/genesis.proto create mode 100644 proto/ethermint/evm/v1/query.proto create mode 100644 proto/ethermint/evm/v1/tx.proto create mode 100644 proto/ethermint/feemarket/v1/events.proto create mode 100644 proto/ethermint/feemarket/v1/feemarket.proto create mode 100644 proto/ethermint/feemarket/v1/genesis.proto create mode 100644 proto/ethermint/feemarket/v1/query.proto create mode 100644 proto/ethermint/feemarket/v1/tx.proto create mode 100644 proto/ethermint/types/v1/account.proto create mode 100644 proto/ethermint/types/v1/dynamic_fee.proto create mode 100644 proto/ethermint/types/v1/indexer.proto create mode 100644 proto/ethermint/types/v1/web3.proto create mode 100644 proto/evmos/erc20/v1/erc20.proto create mode 100644 proto/evmos/erc20/v1/events.proto create mode 100644 proto/evmos/erc20/v1/genesis.proto create mode 100644 proto/evmos/erc20/v1/query.proto create mode 100644 proto/evmos/erc20/v1/tx.proto create mode 100644 proto/packages/blockchain/poa/genesis.proto create mode 100644 proto/packages/blockchain/poa/params.proto create mode 100644 proto/packages/blockchain/poa/query.proto create mode 100644 proto/packages/blockchain/poa/tx.proto create mode 100755 state_sync.sh create mode 100644 types/legacy/ethermint/evm/storage.go rename {app/upgrades/v9/legacy => types/legacy/ethermint}/types/account.go (98%) diff --git a/app/app.go b/app/app.go index c16f7e3..4b03b31 100644 --- a/app/app.go +++ b/app/app.go @@ -114,6 +114,7 @@ import ( icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper" icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types" + ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" ibc "github.com/cosmos/ibc-go/v10/modules/core" @@ -604,6 +605,12 @@ func New( AddRoute(ibctransfertypes.ModuleName, transferStack) app.IBCKeeper.SetRouter(ibcRouter) + clientKeeper := app.IBCKeeper.ClientKeeper + storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() + + tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) + clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) + /**** Module Hooks ****/ // register hooks after all modules have been initialized @@ -641,6 +648,7 @@ func New( ibc.NewAppModule(app.IBCKeeper), ica.NewAppModule(nil, &app.ICAHostKeeper), transferModule, + ibctm.NewAppModule(tmLightClientModule), ratelimit.NewAppModule(appCodec, app.RateLimitKeeper), // Ethermint app modules diff --git a/app/encoding.go b/app/encoding.go index 8c33a6a..1e4b52f 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,7 +3,11 @@ package app import ( "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec/address" - legacytypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/types" + v7 "github.com/cosmos/ibc-go/v10/modules/core/02-client/migrations/v7" + "github.com/cosmos/ibc-go/v10/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v10/modules/light-clients/06-solomachine" + tendermint "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" + legacytypes "github.com/xrplevm/node/v9/types/legacy/ethermint/types" amino "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" @@ -18,6 +22,11 @@ import ( vmtypes "github.com/cosmos/evm/x/vm/types" "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/reflect/protoreflect" + + evmlegacytypes "github.com/xrplevm/node/v9/types/legacy/ethermint/evm" + feemarketlegacytypes "github.com/xrplevm/node/v9/types/legacy/ethermint/feemarket" + erc20legacytypes "github.com/xrplevm/node/v9/types/legacy/evmos/erc20" + poalegacytypes "github.com/xrplevm/node/v9/x/poa/types/legacy" ) func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { @@ -40,6 +49,34 @@ func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { SigningOptions: signingOptions, }) + interfaceRegistry.RegisterImplementations((*exported.ClientState)(nil), + &solomachine.ClientState{}, + &tendermint.ClientState{}, + &v7.ClientState{}, + ) + + interfaceRegistry.RegisterImplementations((*exported.ConsensusState)(nil), + &solomachine.ConsensusState{}, + &tendermint.ConsensusState{}, + &v7.ConsensusState{}, + ) + + interfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), + &poalegacytypes.MsgAddValidator{}, + &poalegacytypes.MsgRemoveValidator{}, + &evmlegacytypes.MsgEthereumTx{}, + &evmlegacytypes.MsgUpdateParams{}, + &feemarketlegacytypes.MsgUpdateParams{}, + &erc20legacytypes.MsgConvertERC20{}, + &erc20legacytypes.MsgConvertCoin{}, + &erc20legacytypes.MsgUpdateParams{}, + &erc20legacytypes.MsgTransferOwnership{}, + &erc20legacytypes.MsgMint{}, + &erc20legacytypes.MsgBurn{}, + &erc20legacytypes.MsgRegisterERC20{}, + &erc20legacytypes.MsgToggleConversion{}, + ) + interfaceRegistry.RegisterImplementations((*sdk.AccountI)(nil), &legacytypes.EthAccount{}, // evmos (legacy) ) diff --git a/app/upgrades/v9/legacy/evm/types/access_list.go b/app/upgrades/v9/legacy/evm/types/access_list.go deleted file mode 100644 index 50de8b2..0000000 --- a/app/upgrades/v9/legacy/evm/types/access_list.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" -) - -// AccessList is an EIP-2930 access list that represents the slice of -// the protobuf AccessTuples. -type AccessList []AccessTuple - -// NewAccessList creates a new protobuf-compatible AccessList from an ethereum -// core AccessList type -func NewAccessList(ethAccessList *ethtypes.AccessList) AccessList { - if ethAccessList == nil { - return nil - } - - al := AccessList{} - for _, tuple := range *ethAccessList { - storageKeys := make([]string, len(tuple.StorageKeys)) - - for i := range tuple.StorageKeys { - storageKeys[i] = tuple.StorageKeys[i].String() - } - - al = append(al, AccessTuple{ - Address: tuple.Address.String(), - StorageKeys: storageKeys, - }) - } - - return al -} - -// ToEthAccessList is an utility function to convert the protobuf compatible -// AccessList to eth core AccessList from go-ethereum -func (al AccessList) ToEthAccessList() *ethtypes.AccessList { - var ethAccessList ethtypes.AccessList - - for _, tuple := range al { - storageKeys := make([]common.Hash, len(tuple.StorageKeys)) - - for i := range tuple.StorageKeys { - storageKeys[i] = common.HexToHash(tuple.StorageKeys[i]) - } - - ethAccessList = append(ethAccessList, ethtypes.AccessTuple{ - Address: common.HexToAddress(tuple.Address), - StorageKeys: storageKeys, - }) - } - - return ðAccessList -} diff --git a/app/upgrades/v9/legacy/evm/types/events.pb.go b/app/upgrades/v9/legacy/evm/types/events.pb.go deleted file mode 100644 index cace715..0000000 --- a/app/upgrades/v9/legacy/evm/types/events.pb.go +++ /dev/null @@ -1,1266 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/evm/v1/events.proto - -package types - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// EventEthereumTx defines the event for an Ethereum transaction -type EventEthereumTx struct { - // amount - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - // eth_hash is the Ethereum hash of the transaction - EthHash string `protobuf:"bytes,2,opt,name=eth_hash,json=ethHash,proto3" json:"eth_hash,omitempty"` - // index of the transaction in the block - Index string `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"` - // gas_used is the amount of gas used by the transaction - GasUsed string `protobuf:"bytes,4,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - // hash is the Tendermint hash of the transaction - Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` - // recipient of the transaction - Recipient string `protobuf:"bytes,6,opt,name=recipient,proto3" json:"recipient,omitempty"` - // eth_tx_failed contains a VM error should it occur - EthTxFailed string `protobuf:"bytes,7,opt,name=eth_tx_failed,json=ethTxFailed,proto3" json:"eth_tx_failed,omitempty"` -} - -func (m *EventEthereumTx) Reset() { *m = EventEthereumTx{} } -func (m *EventEthereumTx) String() string { return proto.CompactTextString(m) } -func (*EventEthereumTx) ProtoMessage() {} -func (*EventEthereumTx) Descriptor() ([]byte, []int) { - return fileDescriptor_432e0d592184bde3, []int{0} -} -func (m *EventEthereumTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventEthereumTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventEthereumTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventEthereumTx.Merge(m, src) -} -func (m *EventEthereumTx) XXX_Size() int { - return m.Size() -} -func (m *EventEthereumTx) XXX_DiscardUnknown() { - xxx_messageInfo_EventEthereumTx.DiscardUnknown(m) -} - -var xxx_messageInfo_EventEthereumTx proto.InternalMessageInfo - -func (m *EventEthereumTx) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func (m *EventEthereumTx) GetEthHash() string { - if m != nil { - return m.EthHash - } - return "" -} - -func (m *EventEthereumTx) GetIndex() string { - if m != nil { - return m.Index - } - return "" -} - -func (m *EventEthereumTx) GetGasUsed() string { - if m != nil { - return m.GasUsed - } - return "" -} - -func (m *EventEthereumTx) GetHash() string { - if m != nil { - return m.Hash - } - return "" -} - -func (m *EventEthereumTx) GetRecipient() string { - if m != nil { - return m.Recipient - } - return "" -} - -func (m *EventEthereumTx) GetEthTxFailed() string { - if m != nil { - return m.EthTxFailed - } - return "" -} - -// EventTxLog defines the event for an Ethereum transaction log -type EventTxLog struct { - // tx_logs is an array of transaction logs - TxLogs []string `protobuf:"bytes,1,rep,name=tx_logs,json=txLogs,proto3" json:"tx_logs,omitempty"` -} - -func (m *EventTxLog) Reset() { *m = EventTxLog{} } -func (m *EventTxLog) String() string { return proto.CompactTextString(m) } -func (*EventTxLog) ProtoMessage() {} -func (*EventTxLog) Descriptor() ([]byte, []int) { - return fileDescriptor_432e0d592184bde3, []int{1} -} -func (m *EventTxLog) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventTxLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventTxLog.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventTxLog) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventTxLog.Merge(m, src) -} -func (m *EventTxLog) XXX_Size() int { - return m.Size() -} -func (m *EventTxLog) XXX_DiscardUnknown() { - xxx_messageInfo_EventTxLog.DiscardUnknown(m) -} - -var xxx_messageInfo_EventTxLog proto.InternalMessageInfo - -func (m *EventTxLog) GetTxLogs() []string { - if m != nil { - return m.TxLogs - } - return nil -} - -// EventMessage -type EventMessage struct { - // module which emits the event - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - // sender of the message - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // tx_type is the type of the message - TxType string `protobuf:"bytes,3,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty"` -} - -func (m *EventMessage) Reset() { *m = EventMessage{} } -func (m *EventMessage) String() string { return proto.CompactTextString(m) } -func (*EventMessage) ProtoMessage() {} -func (*EventMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_432e0d592184bde3, []int{2} -} -func (m *EventMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventMessage.Merge(m, src) -} -func (m *EventMessage) XXX_Size() int { - return m.Size() -} -func (m *EventMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EventMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_EventMessage proto.InternalMessageInfo - -func (m *EventMessage) GetModule() string { - if m != nil { - return m.Module - } - return "" -} - -func (m *EventMessage) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *EventMessage) GetTxType() string { - if m != nil { - return m.TxType - } - return "" -} - -// EventBlockBloom defines an Ethereum block bloom filter event -type EventBlockBloom struct { - // bloom is the bloom filter of the block - Bloom string `protobuf:"bytes,1,opt,name=bloom,proto3" json:"bloom,omitempty"` -} - -func (m *EventBlockBloom) Reset() { *m = EventBlockBloom{} } -func (m *EventBlockBloom) String() string { return proto.CompactTextString(m) } -func (*EventBlockBloom) ProtoMessage() {} -func (*EventBlockBloom) Descriptor() ([]byte, []int) { - return fileDescriptor_432e0d592184bde3, []int{3} -} -func (m *EventBlockBloom) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBlockBloom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBlockBloom.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventBlockBloom) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBlockBloom.Merge(m, src) -} -func (m *EventBlockBloom) XXX_Size() int { - return m.Size() -} -func (m *EventBlockBloom) XXX_DiscardUnknown() { - xxx_messageInfo_EventBlockBloom.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBlockBloom proto.InternalMessageInfo - -func (m *EventBlockBloom) GetBloom() string { - if m != nil { - return m.Bloom - } - return "" -} - -func init() { - proto.RegisterType((*EventEthereumTx)(nil), "ethermint.evm.v1.EventEthereumTx") - proto.RegisterType((*EventTxLog)(nil), "ethermint.evm.v1.EventTxLog") - proto.RegisterType((*EventMessage)(nil), "ethermint.evm.v1.EventMessage") - proto.RegisterType((*EventBlockBloom)(nil), "ethermint.evm.v1.EventBlockBloom") -} - -func init() { proto.RegisterFile("ethermint/evm/v1/events.proto", fileDescriptor_432e0d592184bde3) } - -var fileDescriptor_432e0d592184bde3 = []byte{ - // 360 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x51, 0xdd, 0x4a, 0xc3, 0x30, - 0x18, 0x5d, 0xdd, 0xd6, 0xb9, 0xa8, 0x28, 0x41, 0xb4, 0x82, 0x96, 0x51, 0xf0, 0xe7, 0xaa, 0x75, - 0xfa, 0x02, 0x32, 0x98, 0x78, 0xa1, 0x37, 0x52, 0x11, 0xbc, 0x29, 0xdd, 0xfa, 0xd9, 0x14, 0x9b, - 0xa6, 0x34, 0x69, 0xc9, 0xde, 0xc2, 0xc7, 0x12, 0xbc, 0xd9, 0xa5, 0x97, 0xb2, 0xbd, 0x88, 0x24, - 0x8d, 0x7a, 0x13, 0x72, 0xce, 0xf9, 0x7e, 0x38, 0xdf, 0x41, 0x27, 0x20, 0x08, 0x54, 0x34, 0x2b, - 0x44, 0x00, 0x0d, 0x0d, 0x9a, 0x71, 0x00, 0x0d, 0x14, 0x82, 0xfb, 0x65, 0xc5, 0x04, 0xc3, 0x7b, - 0x7f, 0xb2, 0x0f, 0x0d, 0xf5, 0x9b, 0xb1, 0xf7, 0x69, 0xa1, 0xdd, 0xa9, 0x2a, 0x99, 0x2a, 0x05, - 0x6a, 0x1a, 0x4a, 0x7c, 0x80, 0xec, 0x98, 0xb2, 0xba, 0x10, 0x8e, 0x35, 0xb2, 0x2e, 0x86, 0x8f, - 0x06, 0xe1, 0x23, 0xb4, 0x09, 0x82, 0x44, 0x24, 0xe6, 0xc4, 0xd9, 0xd0, 0xca, 0x00, 0x04, 0xb9, - 0x8b, 0x39, 0xc1, 0xfb, 0xa8, 0x9f, 0x15, 0x09, 0x48, 0xa7, 0xab, 0xf9, 0x16, 0xa8, 0x86, 0x34, - 0xe6, 0x51, 0xcd, 0x21, 0x71, 0x7a, 0x6d, 0x43, 0x1a, 0xf3, 0x27, 0x0e, 0x09, 0xc6, 0xa8, 0xa7, - 0xe7, 0xf4, 0x35, 0xad, 0xff, 0xf8, 0x18, 0x0d, 0x2b, 0x98, 0x67, 0x65, 0x06, 0x85, 0x70, 0x6c, - 0x2d, 0xfc, 0x13, 0xd8, 0x43, 0x3b, 0x6a, 0xbb, 0x90, 0xd1, 0x6b, 0x9c, 0xe5, 0x90, 0x38, 0x03, - 0x5d, 0xb1, 0x05, 0x82, 0x84, 0xf2, 0x56, 0x53, 0xde, 0x29, 0x42, 0xda, 0x4c, 0x28, 0xef, 0x59, - 0x8a, 0x0f, 0xd1, 0x40, 0xc8, 0x28, 0x67, 0x29, 0x77, 0xac, 0x51, 0x57, 0x19, 0x11, 0x8a, 0xe7, - 0xde, 0x33, 0xda, 0xd6, 0x65, 0x0f, 0xc0, 0x79, 0x9c, 0x82, 0x32, 0x4c, 0x59, 0x52, 0xe7, 0xf0, - 0x6b, 0xb8, 0x45, 0x8a, 0xe7, 0x50, 0x24, 0x50, 0x19, 0xbb, 0x06, 0x99, 0xc1, 0x62, 0x51, 0x82, - 0xf1, 0x6b, 0x0b, 0x19, 0x2e, 0x4a, 0xf0, 0xce, 0xcd, 0x31, 0x27, 0x39, 0x9b, 0xbf, 0x4d, 0x72, - 0xc6, 0xa8, 0xba, 0xcc, 0x4c, 0x7d, 0xcc, 0xe8, 0x16, 0x4c, 0x6e, 0x3e, 0x56, 0xae, 0xb5, 0x5c, - 0xb9, 0xd6, 0xf7, 0xca, 0xb5, 0xde, 0xd7, 0x6e, 0x67, 0xb9, 0x76, 0x3b, 0x5f, 0x6b, 0xb7, 0xf3, - 0x72, 0x96, 0x66, 0x82, 0xd4, 0x33, 0x7f, 0xce, 0xa8, 0x8a, 0x90, 0x71, 0xf3, 0x36, 0x57, 0x97, - 0x81, 0xd4, 0xa1, 0xaa, 0xbd, 0x7c, 0x66, 0xeb, 0x44, 0xaf, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x1e, 0x34, 0x40, 0xd6, 0xf2, 0x01, 0x00, 0x00, -} - -func (m *EventEthereumTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventEthereumTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EthTxFailed) > 0 { - i -= len(m.EthTxFailed) - copy(dAtA[i:], m.EthTxFailed) - i = encodeVarintEvents(dAtA, i, uint64(len(m.EthTxFailed))) - i-- - dAtA[i] = 0x3a - } - if len(m.Recipient) > 0 { - i -= len(m.Recipient) - copy(dAtA[i:], m.Recipient) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Recipient))) - i-- - dAtA[i] = 0x32 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x2a - } - if len(m.GasUsed) > 0 { - i -= len(m.GasUsed) - copy(dAtA[i:], m.GasUsed) - i = encodeVarintEvents(dAtA, i, uint64(len(m.GasUsed))) - i-- - dAtA[i] = 0x22 - } - if len(m.Index) > 0 { - i -= len(m.Index) - copy(dAtA[i:], m.Index) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Index))) - i-- - dAtA[i] = 0x1a - } - if len(m.EthHash) > 0 { - i -= len(m.EthHash) - copy(dAtA[i:], m.EthHash) - i = encodeVarintEvents(dAtA, i, uint64(len(m.EthHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventTxLog) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventTxLog) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventTxLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TxLogs) > 0 { - for iNdEx := len(m.TxLogs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TxLogs[iNdEx]) - copy(dAtA[i:], m.TxLogs[iNdEx]) - i = encodeVarintEvents(dAtA, i, uint64(len(m.TxLogs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *EventMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TxType) > 0 { - i -= len(m.TxType) - copy(dAtA[i:], m.TxType) - i = encodeVarintEvents(dAtA, i, uint64(len(m.TxType))) - i-- - dAtA[i] = 0x1a - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(m.Module) > 0 { - i -= len(m.Module) - copy(dAtA[i:], m.Module) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Module))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventBlockBloom) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventBlockBloom) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBlockBloom) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Bloom) > 0 { - i -= len(m.Bloom) - copy(dAtA[i:], m.Bloom) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Bloom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { - offset -= sovEvents(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EventEthereumTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.EthHash) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Index) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.GasUsed) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Recipient) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.EthTxFailed) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventTxLog) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TxLogs) > 0 { - for _, s := range m.TxLogs { - l = len(s) - n += 1 + l + sovEvents(uint64(l)) - } - } - return n -} - -func (m *EventMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Module) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.TxType) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func (m *EventBlockBloom) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Bloom) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func sovEvents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvents(x uint64) (n int) { - return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EventEthereumTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventEthereumTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Index = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GasUsed = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthTxFailed", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthTxFailed = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventTxLog) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventTxLog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventTxLog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxLogs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxLogs = append(m.TxLogs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBlockBloom) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventBlockBloom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBlockBloom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bloom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bloom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvents(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvents - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvents - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") -) diff --git a/app/upgrades/v9/legacy/evm/types/evm.pb.go b/app/upgrades/v9/legacy/evm/types/evm.pb.go deleted file mode 100644 index 7c3425d..0000000 --- a/app/upgrades/v9/legacy/evm/types/evm.pb.go +++ /dev/null @@ -1,4586 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/evm/v1/evm.proto - -package types - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - cosmossdk_io_math "cosmossdk.io/math" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AccessType defines the types of permissions for the operations -type AccessType int32 - -const ( - // ACCESS_TYPE_PERMISSIONLESS does not restrict the operation to anyone - AccessTypePermissionless AccessType = 0 - // ACCESS_TYPE_RESTRICTED restrict the operation to anyone - AccessTypeRestricted AccessType = 1 - // ACCESS_TYPE_PERMISSIONED only allows the operation for specific addresses - AccessTypePermissioned AccessType = 2 -) - -var AccessType_name = map[int32]string{ - 0: "ACCESS_TYPE_PERMISSIONLESS", - 1: "ACCESS_TYPE_RESTRICTED", - 2: "ACCESS_TYPE_PERMISSIONED", -} - -var AccessType_value = map[string]int32{ - "ACCESS_TYPE_PERMISSIONLESS": 0, - "ACCESS_TYPE_RESTRICTED": 1, - "ACCESS_TYPE_PERMISSIONED": 2, -} - -func (x AccessType) String() string { - return proto.EnumName(AccessType_name, int32(x)) -} - -func (AccessType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{0} -} - -// Params defines the EVM module parameters -type Params struct { - // evm_denom represents the token denomination used to run the EVM state - // transitions. - EvmDenom string `protobuf:"bytes,1,opt,name=evm_denom,json=evmDenom,proto3" json:"evm_denom,omitempty" yaml:"evm_denom"` - // extra_eips defines the additional EIPs for the vm.Config - ExtraEIPs []string `protobuf:"bytes,4,rep,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` - // chain_config defines the EVM chain configuration parameters - ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` - // allow_unprotected_txs defines if replay-protected (i.e non EIP155 - // signed) transactions can be executed on the state machine. - AllowUnprotectedTxs bool `protobuf:"varint,6,opt,name=allow_unprotected_txs,json=allowUnprotectedTxs,proto3" json:"allow_unprotected_txs,omitempty"` - // evm_channels is the list of channel identifiers from EVM compatible chains - EVMChannels []string `protobuf:"bytes,8,rep,name=evm_channels,json=evmChannels,proto3" json:"evm_channels,omitempty"` - // access_control defines the permission policy of the EVM - AccessControl AccessControl `protobuf:"bytes,9,opt,name=access_control,json=accessControl,proto3" json:"access_control"` - // active_static_precompiles defines the slice of hex addresses of the precompiled - // contracts that are active - ActiveStaticPrecompiles []string `protobuf:"bytes,10,rep,name=active_static_precompiles,json=activeStaticPrecompiles,proto3" json:"active_static_precompiles,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetEvmDenom() string { - if m != nil { - return m.EvmDenom - } - return "" -} - -func (m *Params) GetExtraEIPs() []string { - if m != nil { - return m.ExtraEIPs - } - return nil -} - -func (m *Params) GetChainConfig() ChainConfig { - if m != nil { - return m.ChainConfig - } - return ChainConfig{} -} - -func (m *Params) GetAllowUnprotectedTxs() bool { - if m != nil { - return m.AllowUnprotectedTxs - } - return false -} - -func (m *Params) GetEVMChannels() []string { - if m != nil { - return m.EVMChannels - } - return nil -} - -func (m *Params) GetAccessControl() AccessControl { - if m != nil { - return m.AccessControl - } - return AccessControl{} -} - -func (m *Params) GetActiveStaticPrecompiles() []string { - if m != nil { - return m.ActiveStaticPrecompiles - } - return nil -} - -// AccessControl defines the permission policy of the EVM -// for creating and calling contracts -type AccessControl struct { - // create defines the permission policy for creating contracts - Create AccessControlType `protobuf:"bytes,1,opt,name=create,proto3" json:"create"` - // call defines the permission policy for calling contracts - Call AccessControlType `protobuf:"bytes,2,opt,name=call,proto3" json:"call"` -} - -func (m *AccessControl) Reset() { *m = AccessControl{} } -func (m *AccessControl) String() string { return proto.CompactTextString(m) } -func (*AccessControl) ProtoMessage() {} -func (*AccessControl) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{1} -} -func (m *AccessControl) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccessControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccessControl.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccessControl) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccessControl.Merge(m, src) -} -func (m *AccessControl) XXX_Size() int { - return m.Size() -} -func (m *AccessControl) XXX_DiscardUnknown() { - xxx_messageInfo_AccessControl.DiscardUnknown(m) -} - -var xxx_messageInfo_AccessControl proto.InternalMessageInfo - -func (m *AccessControl) GetCreate() AccessControlType { - if m != nil { - return m.Create - } - return AccessControlType{} -} - -func (m *AccessControl) GetCall() AccessControlType { - if m != nil { - return m.Call - } - return AccessControlType{} -} - -// AccessControlType defines the permission type for policies -type AccessControlType struct { - // access_type defines which type of permission is required for the operation - AccessType AccessType `protobuf:"varint,1,opt,name=access_type,json=accessType,proto3,enum=ethermint.evm.v1.AccessType" json:"access_type,omitempty" yaml:"access_type"` - // access_control_list defines defines different things depending on the AccessType: - // - ACCESS_TYPE_PERMISSIONLESS: list of addresses that are blocked from performing the operation - // - ACCESS_TYPE_RESTRICTED: ignored - // - ACCESS_TYPE_PERMISSIONED: list of addresses that are allowed to perform the operation - AccessControlList []string `protobuf:"bytes,2,rep,name=access_control_list,json=accessControlList,proto3" json:"access_control_list,omitempty" yaml:"access_control_list"` -} - -func (m *AccessControlType) Reset() { *m = AccessControlType{} } -func (m *AccessControlType) String() string { return proto.CompactTextString(m) } -func (*AccessControlType) ProtoMessage() {} -func (*AccessControlType) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{2} -} -func (m *AccessControlType) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccessControlType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccessControlType.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccessControlType) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccessControlType.Merge(m, src) -} -func (m *AccessControlType) XXX_Size() int { - return m.Size() -} -func (m *AccessControlType) XXX_DiscardUnknown() { - xxx_messageInfo_AccessControlType.DiscardUnknown(m) -} - -var xxx_messageInfo_AccessControlType proto.InternalMessageInfo - -func (m *AccessControlType) GetAccessType() AccessType { - if m != nil { - return m.AccessType - } - return AccessTypePermissionless -} - -func (m *AccessControlType) GetAccessControlList() []string { - if m != nil { - return m.AccessControlList - } - return nil -} - -// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values -// instead of *big.Int. -type ChainConfig struct { - // homestead_block switch (nil no fork, 0 = already homestead) - HomesteadBlock *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=cosmossdk.io/math.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` - // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) - DAOForkBlock *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=cosmossdk.io/math.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` - // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork - DAOForkSupport bool `protobuf:"varint,3,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"` - // eip150_block: EIP150 implements the Gas price changes - // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) - EIP150Block *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` - // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) - EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"` - // eip155_block: EIP155Block HF block - EIP155Block *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` - // eip158_block: EIP158 HF block - EIP158Block *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` - // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) - ByzantiumBlock *cosmossdk_io_math.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=cosmossdk.io/math.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` - // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) - ConstantinopleBlock *cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=cosmossdk.io/math.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` - // petersburg_block: Petersburg switch block (nil same as Constantinople) - PetersburgBlock *cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=cosmossdk.io/math.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` - // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) - IstanbulBlock *cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=cosmossdk.io/math.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` - // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) - MuirGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` - // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) - BerlinBlock *cosmossdk_io_math.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=cosmossdk.io/math.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` - // london_block: London switch block (nil = no fork, 0 = already on london) - LondonBlock *cosmossdk_io_math.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=cosmossdk.io/math.Int" json:"london_block,omitempty" yaml:"london_block"` - // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - ArrowGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` - // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) - GrayGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"` - // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter - MergeNetsplitBlock *cosmossdk_io_math.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=cosmossdk.io/math.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` - // shanghai_block switch block (nil = no fork, 0 = already on shanghai) - ShanghaiBlock *cosmossdk_io_math.Int `protobuf:"bytes,22,opt,name=shanghai_block,json=shanghaiBlock,proto3,customtype=cosmossdk.io/math.Int" json:"shanghai_block,omitempty" yaml:"shanghai_block"` - // cancun_block switch block (nil = no fork, 0 = already on cancun) - CancunBlock *cosmossdk_io_math.Int `protobuf:"bytes,23,opt,name=cancun_block,json=cancunBlock,proto3,customtype=cosmossdk.io/math.Int" json:"cancun_block,omitempty" yaml:"cancun_block"` -} - -func (m *ChainConfig) Reset() { *m = ChainConfig{} } -func (m *ChainConfig) String() string { return proto.CompactTextString(m) } -func (*ChainConfig) ProtoMessage() {} -func (*ChainConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{3} -} -func (m *ChainConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChainConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainConfig.Merge(m, src) -} -func (m *ChainConfig) XXX_Size() int { - return m.Size() -} -func (m *ChainConfig) XXX_DiscardUnknown() { - xxx_messageInfo_ChainConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainConfig proto.InternalMessageInfo - -func (m *ChainConfig) GetDAOForkSupport() bool { - if m != nil { - return m.DAOForkSupport - } - return false -} - -func (m *ChainConfig) GetEIP150Hash() string { - if m != nil { - return m.EIP150Hash - } - return "" -} - -// State represents a single Storage key value pair item. -type State struct { - // key is the stored key - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // value is the stored value for the given key - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *State) Reset() { *m = State{} } -func (m *State) String() string { return proto.CompactTextString(m) } -func (*State) ProtoMessage() {} -func (*State) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{4} -} -func (m *State) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_State.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *State) XXX_Merge(src proto.Message) { - xxx_messageInfo_State.Merge(m, src) -} -func (m *State) XXX_Size() int { - return m.Size() -} -func (m *State) XXX_DiscardUnknown() { - xxx_messageInfo_State.DiscardUnknown(m) -} - -var xxx_messageInfo_State proto.InternalMessageInfo - -func (m *State) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *State) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// TransactionLogs define the logs generated from a transaction execution -// with a given hash. It it used for import/export data as transactions are not -// persisted on blockchain state after an upgrade. -type TransactionLogs struct { - // hash of the transaction - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // logs is an array of Logs for the given transaction hash - Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` -} - -func (m *TransactionLogs) Reset() { *m = TransactionLogs{} } -func (m *TransactionLogs) String() string { return proto.CompactTextString(m) } -func (*TransactionLogs) ProtoMessage() {} -func (*TransactionLogs) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{5} -} -func (m *TransactionLogs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionLogs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TransactionLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionLogs.Merge(m, src) -} -func (m *TransactionLogs) XXX_Size() int { - return m.Size() -} -func (m *TransactionLogs) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionLogs.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionLogs proto.InternalMessageInfo - -func (m *TransactionLogs) GetHash() string { - if m != nil { - return m.Hash - } - return "" -} - -func (m *TransactionLogs) GetLogs() []*Log { - if m != nil { - return m.Logs - } - return nil -} - -// Log represents an protobuf compatible Ethereum Log that defines a contract -// log event. These events are generated by the LOG opcode and stored/indexed by -// the node. -// -// NOTE: address, topics and data are consensus fields. The rest of the fields -// are derived, i.e. filled in by the nodes, but not secured by consensus. -type Log struct { - // address of the contract that generated the event - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // topics is a list of topics provided by the contract. - Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` - // data which is supplied by the contract, usually ABI-encoded - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - // block_number of the block in which the transaction was included - BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"blockNumber"` - // tx_hash is the transaction hash - TxHash string `protobuf:"bytes,5,opt,name=tx_hash,json=txHash,proto3" json:"transactionHash"` - // tx_index of the transaction in the block - TxIndex uint64 `protobuf:"varint,6,opt,name=tx_index,json=txIndex,proto3" json:"transactionIndex"` - // block_hash of the block in which the transaction was included - BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"blockHash"` - // index of the log in the block - Index uint64 `protobuf:"varint,8,opt,name=index,proto3" json:"logIndex"` - // removed is true if this log was reverted due to a chain - // reorganisation. You must pay attention to this field if you receive logs - // through a filter query. - Removed bool `protobuf:"varint,9,opt,name=removed,proto3" json:"removed,omitempty"` -} - -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{6} -} -func (m *Log) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Log.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Log) XXX_Merge(src proto.Message) { - xxx_messageInfo_Log.Merge(m, src) -} -func (m *Log) XXX_Size() int { - return m.Size() -} -func (m *Log) XXX_DiscardUnknown() { - xxx_messageInfo_Log.DiscardUnknown(m) -} - -var xxx_messageInfo_Log proto.InternalMessageInfo - -func (m *Log) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *Log) GetTopics() []string { - if m != nil { - return m.Topics - } - return nil -} - -func (m *Log) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *Log) GetBlockNumber() uint64 { - if m != nil { - return m.BlockNumber - } - return 0 -} - -func (m *Log) GetTxHash() string { - if m != nil { - return m.TxHash - } - return "" -} - -func (m *Log) GetTxIndex() uint64 { - if m != nil { - return m.TxIndex - } - return 0 -} - -func (m *Log) GetBlockHash() string { - if m != nil { - return m.BlockHash - } - return "" -} - -func (m *Log) GetIndex() uint64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *Log) GetRemoved() bool { - if m != nil { - return m.Removed - } - return false -} - -// TxResult stores results of Tx execution. -type TxResult struct { - // contract_address contains the ethereum address of the created contract (if - // any). If the state transition is an evm.Call, the contract address will be - // empty. - ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" yaml:"contract_address"` - // bloom represents the bloom filter bytes - Bloom []byte `protobuf:"bytes,2,opt,name=bloom,proto3" json:"bloom,omitempty"` - // tx_logs contains the transaction hash and the proto-compatible ethereum - // logs. - TxLogs TransactionLogs `protobuf:"bytes,3,opt,name=tx_logs,json=txLogs,proto3" json:"tx_logs" yaml:"tx_logs"` - // ret defines the bytes from the execution. - Ret []byte `protobuf:"bytes,4,opt,name=ret,proto3" json:"ret,omitempty"` - // reverted flag is set to true when the call has been reverted - Reverted bool `protobuf:"varint,5,opt,name=reverted,proto3" json:"reverted,omitempty"` - // gas_used notes the amount of gas consumed while execution - GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` -} - -func (m *TxResult) Reset() { *m = TxResult{} } -func (m *TxResult) String() string { return proto.CompactTextString(m) } -func (*TxResult) ProtoMessage() {} -func (*TxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{7} -} -func (m *TxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxResult.Merge(m, src) -} -func (m *TxResult) XXX_Size() int { - return m.Size() -} -func (m *TxResult) XXX_DiscardUnknown() { - xxx_messageInfo_TxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_TxResult proto.InternalMessageInfo - -// AccessTuple is the element type of an access list. -type AccessTuple struct { - // address is a hex formatted ethereum address - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // storage_keys are hex formatted hashes of the storage keys - StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storageKeys"` -} - -func (m *AccessTuple) Reset() { *m = AccessTuple{} } -func (m *AccessTuple) String() string { return proto.CompactTextString(m) } -func (*AccessTuple) ProtoMessage() {} -func (*AccessTuple) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{8} -} -func (m *AccessTuple) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccessTuple.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccessTuple) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccessTuple.Merge(m, src) -} -func (m *AccessTuple) XXX_Size() int { - return m.Size() -} -func (m *AccessTuple) XXX_DiscardUnknown() { - xxx_messageInfo_AccessTuple.DiscardUnknown(m) -} - -var xxx_messageInfo_AccessTuple proto.InternalMessageInfo - -// TraceConfig holds extra parameters to trace functions. -type TraceConfig struct { - // tracer is a custom javascript tracer - Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` - // timeout overrides the default timeout of 5 seconds for JavaScript-based tracing - // calls - Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - // reexec defines the number of blocks the tracer is willing to go back - Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"` - // disable_stack switches stack capture - DisableStack bool `protobuf:"varint,5,opt,name=disable_stack,json=disableStack,proto3" json:"disableStack"` - // disable_storage switches storage capture - DisableStorage bool `protobuf:"varint,6,opt,name=disable_storage,json=disableStorage,proto3" json:"disableStorage"` - // debug can be used to print output during capture end - Debug bool `protobuf:"varint,8,opt,name=debug,proto3" json:"debug,omitempty"` - // limit defines the maximum length of output, but zero means unlimited - Limit int32 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit,omitempty"` - // overrides can be used to execute a trace using future fork rules - Overrides *ChainConfig `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"` - // enable_memory switches memory capture - EnableMemory bool `protobuf:"varint,11,opt,name=enable_memory,json=enableMemory,proto3" json:"enableMemory"` - // enable_return_data switches the capture of return data - EnableReturnData bool `protobuf:"varint,12,opt,name=enable_return_data,json=enableReturnData,proto3" json:"enableReturnData"` - // tracer_json_config configures the tracer using a JSON string - TracerJsonConfig string `protobuf:"bytes,13,opt,name=tracer_json_config,json=tracerJsonConfig,proto3" json:"tracerConfig"` -} - -func (m *TraceConfig) Reset() { *m = TraceConfig{} } -func (m *TraceConfig) String() string { return proto.CompactTextString(m) } -func (*TraceConfig) ProtoMessage() {} -func (*TraceConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_d21ecc92c8c8583e, []int{9} -} -func (m *TraceConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TraceConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_TraceConfig.Merge(m, src) -} -func (m *TraceConfig) XXX_Size() int { - return m.Size() -} -func (m *TraceConfig) XXX_DiscardUnknown() { - xxx_messageInfo_TraceConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_TraceConfig proto.InternalMessageInfo - -func (m *TraceConfig) GetTracer() string { - if m != nil { - return m.Tracer - } - return "" -} - -func (m *TraceConfig) GetTimeout() string { - if m != nil { - return m.Timeout - } - return "" -} - -func (m *TraceConfig) GetReexec() uint64 { - if m != nil { - return m.Reexec - } - return 0 -} - -func (m *TraceConfig) GetDisableStack() bool { - if m != nil { - return m.DisableStack - } - return false -} - -func (m *TraceConfig) GetDisableStorage() bool { - if m != nil { - return m.DisableStorage - } - return false -} - -func (m *TraceConfig) GetDebug() bool { - if m != nil { - return m.Debug - } - return false -} - -func (m *TraceConfig) GetLimit() int32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *TraceConfig) GetOverrides() *ChainConfig { - if m != nil { - return m.Overrides - } - return nil -} - -func (m *TraceConfig) GetEnableMemory() bool { - if m != nil { - return m.EnableMemory - } - return false -} - -func (m *TraceConfig) GetEnableReturnData() bool { - if m != nil { - return m.EnableReturnData - } - return false -} - -func (m *TraceConfig) GetTracerJsonConfig() string { - if m != nil { - return m.TracerJsonConfig - } - return "" -} - -func init() { - proto.RegisterEnum("ethermint.evm.v1.AccessType", AccessType_name, AccessType_value) - proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params") - proto.RegisterType((*AccessControl)(nil), "ethermint.evm.v1.AccessControl") - proto.RegisterType((*AccessControlType)(nil), "ethermint.evm.v1.AccessControlType") - proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig") - proto.RegisterType((*State)(nil), "ethermint.evm.v1.State") - proto.RegisterType((*TransactionLogs)(nil), "ethermint.evm.v1.TransactionLogs") - proto.RegisterType((*Log)(nil), "ethermint.evm.v1.Log") - proto.RegisterType((*TxResult)(nil), "ethermint.evm.v1.TxResult") - proto.RegisterType((*AccessTuple)(nil), "ethermint.evm.v1.AccessTuple") - proto.RegisterType((*TraceConfig)(nil), "ethermint.evm.v1.TraceConfig") -} - -func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) } - -var fileDescriptor_d21ecc92c8c8583e = []byte{ - // 1927 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0x4b, 0x6f, 0x23, 0xc7, - 0x11, 0x16, 0xa5, 0x91, 0x34, 0x6c, 0x52, 0xe4, 0xa8, 0x45, 0xed, 0x72, 0xb9, 0x8e, 0x46, 0x99, - 0x04, 0xc1, 0x66, 0xe1, 0x48, 0x2b, 0xad, 0x95, 0x08, 0xeb, 0xbc, 0x44, 0x89, 0x4e, 0xa4, 0x68, - 0xd7, 0x42, 0x53, 0x8e, 0xe1, 0x20, 0xc1, 0xa0, 0x39, 0xd3, 0x26, 0xc7, 0x9a, 0x99, 0x26, 0xa6, - 0x9b, 0x5c, 0x32, 0xbf, 0xc0, 0xd8, 0xd3, 0xe6, 0x07, 0x2c, 0x60, 0x20, 0x97, 0x1c, 0xfd, 0x13, - 0x72, 0x34, 0x72, 0xf2, 0x31, 0x08, 0x90, 0x41, 0xc0, 0x3d, 0x18, 0xd0, 0x51, 0xf7, 0x00, 0x41, - 0x3f, 0xf8, 0x94, 0x2c, 0x2b, 0x17, 0xaa, 0xab, 0xba, 0xea, 0xfb, 0xaa, 0xaa, 0x6b, 0xfa, 0x21, - 0x50, 0x21, 0xbc, 0x45, 0x92, 0x28, 0x88, 0xf9, 0x36, 0xe9, 0x46, 0xdb, 0xdd, 0x1d, 0xf1, 0x67, - 0xab, 0x9d, 0x50, 0x4e, 0xa1, 0x35, 0x9a, 0xdb, 0x12, 0xca, 0xee, 0x4e, 0x65, 0x15, 0x47, 0x41, - 0x4c, 0xb7, 0xe5, 0xaf, 0x32, 0xaa, 0x94, 0x9a, 0xb4, 0x49, 0xe5, 0x70, 0x5b, 0x8c, 0x94, 0xd6, - 0x79, 0x6d, 0x80, 0xa5, 0x33, 0x9c, 0xe0, 0x88, 0xc1, 0x1d, 0x90, 0x25, 0xdd, 0xc8, 0xf5, 0x49, - 0x4c, 0xa3, 0x72, 0x66, 0x33, 0xf3, 0x28, 0x5b, 0x2d, 0x5d, 0xa5, 0xb6, 0xd5, 0xc7, 0x51, 0xf8, - 0xcc, 0x19, 0x4d, 0x39, 0xc8, 0x24, 0xdd, 0xe8, 0x48, 0x0c, 0xe1, 0x01, 0x00, 0xa4, 0xc7, 0x13, - 0xec, 0x92, 0xa0, 0xcd, 0xca, 0xc6, 0xe6, 0xc2, 0xa3, 0x6c, 0xd5, 0x19, 0xa4, 0x76, 0xb6, 0x26, - 0xb4, 0xb5, 0xe3, 0x33, 0x76, 0x95, 0xda, 0xab, 0x1a, 0x60, 0x64, 0xe8, 0xa0, 0xac, 0x14, 0x6a, - 0x41, 0x9b, 0xc1, 0x06, 0xc8, 0x7b, 0x2d, 0x1c, 0xc4, 0xae, 0x47, 0xe3, 0x4f, 0x83, 0x66, 0x79, - 0x71, 0x33, 0xf3, 0x28, 0xb7, 0xfb, 0xbd, 0xad, 0xd9, 0x94, 0xb6, 0x0e, 0x85, 0xd5, 0xa1, 0x34, - 0xaa, 0x6e, 0x7e, 0x95, 0xda, 0x73, 0x57, 0xa9, 0xbd, 0xa6, 0xa0, 0x27, 0x01, 0x9c, 0xbf, 0x7d, - 0xf3, 0xe5, 0xe3, 0x0c, 0xca, 0x79, 0x63, 0x73, 0xb8, 0x0b, 0xd6, 0x71, 0x18, 0xd2, 0x97, 0x6e, - 0x27, 0x16, 0x59, 0x13, 0x8f, 0x13, 0xdf, 0xe5, 0x3d, 0x56, 0x5e, 0xda, 0xcc, 0x3c, 0x32, 0xd1, - 0x9a, 0x9c, 0xfc, 0x68, 0x3c, 0x77, 0xde, 0x63, 0x70, 0x17, 0xe4, 0x45, 0xca, 0x5e, 0x0b, 0xc7, - 0x31, 0x09, 0x59, 0xd9, 0x94, 0xc9, 0x15, 0x07, 0xa9, 0x9d, 0xab, 0xfd, 0xfe, 0xf9, 0xa1, 0x56, - 0xa3, 0x1c, 0xe9, 0x46, 0x43, 0x01, 0xfe, 0x09, 0x14, 0xb0, 0xe7, 0x11, 0xc6, 0x44, 0x2c, 0x3c, - 0xa1, 0x61, 0x39, 0x2b, 0xb3, 0xb1, 0xaf, 0x67, 0x73, 0x20, 0xed, 0x0e, 0x95, 0x59, 0x75, 0x5d, - 0xe4, 0x33, 0x48, 0xed, 0x95, 0x29, 0x35, 0x5a, 0xc1, 0x93, 0x22, 0x7c, 0x06, 0x1e, 0x60, 0x8f, - 0x07, 0x5d, 0xe2, 0x32, 0x8e, 0x79, 0xe0, 0xb9, 0xed, 0x84, 0x78, 0x34, 0x6a, 0x07, 0x21, 0x61, - 0x65, 0x20, 0xe2, 0x43, 0xf7, 0x95, 0x41, 0x5d, 0xce, 0x9f, 0x8d, 0xa7, 0x9f, 0xdd, 0x7f, 0xf5, - 0xcd, 0x97, 0x8f, 0x21, 0xe9, 0x46, 0x94, 0x6d, 0xf7, 0x64, 0x07, 0xa9, 0x55, 0x3f, 0x31, 0xcc, - 0x79, 0x6b, 0xe1, 0xc4, 0x30, 0x17, 0x2c, 0xe3, 0xc4, 0x30, 0x97, 0x2d, 0xd3, 0xf9, 0x4b, 0x06, - 0x4c, 0xc7, 0x01, 0x0f, 0xc0, 0x92, 0x97, 0x10, 0xcc, 0x89, 0x6c, 0x8b, 0xdc, 0xee, 0x0f, 0xbe, - 0x23, 0x9f, 0xf3, 0x7e, 0x9b, 0x54, 0x0d, 0x91, 0x13, 0xd2, 0x8e, 0xf0, 0x17, 0xc0, 0xf0, 0x70, - 0x18, 0x96, 0xe7, 0xff, 0x5f, 0x00, 0xe9, 0xe6, 0xfc, 0x3b, 0x03, 0x56, 0xaf, 0x59, 0x40, 0x0f, - 0xe4, 0x74, 0xbd, 0x79, 0xbf, 0xad, 0x82, 0x2b, 0xec, 0xbe, 0xf3, 0x6d, 0xd8, 0x12, 0xf4, 0x87, - 0x83, 0xd4, 0x06, 0x63, 0xf9, 0x2a, 0xb5, 0xa1, 0xea, 0xa1, 0x09, 0x20, 0x07, 0x01, 0x3c, 0xb2, - 0x80, 0x1e, 0x58, 0x9b, 0x5e, 0x54, 0x37, 0x0c, 0x18, 0x2f, 0xcf, 0xcb, 0x7e, 0x78, 0x3a, 0x48, - 0xed, 0xe9, 0xc0, 0x4e, 0x03, 0xc6, 0xaf, 0x52, 0xbb, 0x32, 0x85, 0x3a, 0xe9, 0xe9, 0xa0, 0x55, - 0x3c, 0xeb, 0xe0, 0xfc, 0xb7, 0x00, 0x72, 0x13, 0x0d, 0x0e, 0xff, 0x08, 0x8a, 0x2d, 0x1a, 0x11, - 0xc6, 0x09, 0xf6, 0xdd, 0x46, 0x48, 0xbd, 0x0b, 0xfd, 0x45, 0x3e, 0xfd, 0x57, 0x6a, 0xaf, 0x7b, - 0x94, 0x45, 0x94, 0x31, 0xff, 0x62, 0x2b, 0xa0, 0xdb, 0x11, 0xe6, 0xad, 0xad, 0xe3, 0x58, 0x90, - 0xde, 0x53, 0xa4, 0x33, 0x9e, 0x0e, 0x2a, 0x8c, 0x34, 0x55, 0xa1, 0x80, 0x2d, 0x50, 0xf0, 0x31, - 0x75, 0x3f, 0xa5, 0xc9, 0x85, 0x06, 0x9f, 0x97, 0xe0, 0xd5, 0x6f, 0x05, 0x1f, 0xa4, 0x76, 0xfe, - 0xe8, 0xe0, 0xc3, 0x0f, 0x68, 0x72, 0x21, 0x21, 0xae, 0x52, 0x7b, 0x5d, 0x91, 0x4d, 0x03, 0x39, - 0x28, 0xef, 0x63, 0x3a, 0x32, 0x83, 0x1f, 0x03, 0x6b, 0x64, 0xc0, 0x3a, 0xed, 0x36, 0x4d, 0x78, - 0x79, 0x41, 0x7c, 0x74, 0xd5, 0x9f, 0x0c, 0x52, 0xbb, 0xa0, 0x21, 0xeb, 0x6a, 0xe6, 0x2a, 0xb5, - 0xef, 0xcf, 0x80, 0x6a, 0x1f, 0x07, 0x15, 0x34, 0xac, 0x36, 0x15, 0xdb, 0x06, 0x09, 0xda, 0x3b, - 0x7b, 0x4f, 0x74, 0x02, 0x86, 0x4c, 0xe0, 0x57, 0xb7, 0x25, 0x90, 0xab, 0x1d, 0x9f, 0xed, 0xec, - 0x3d, 0x19, 0xc6, 0xaf, 0xf7, 0x8e, 0x49, 0x14, 0x07, 0xe5, 0x94, 0xa8, 0x82, 0x3f, 0x06, 0x5a, - 0x74, 0x5b, 0x98, 0xb5, 0xe4, 0xce, 0x94, 0xad, 0x3e, 0x12, 0x0d, 0xa4, 0x90, 0x7e, 0x8b, 0x59, - 0x6b, 0x5c, 0xf5, 0x46, 0xff, 0xcf, 0x38, 0xe6, 0x41, 0x27, 0x1a, 0x62, 0x01, 0xe5, 0x2c, 0xac, - 0x46, 0xe1, 0xee, 0xe9, 0x70, 0x97, 0xee, 0x1a, 0xee, 0xde, 0x4d, 0xe1, 0xee, 0x4d, 0x87, 0xab, - 0x6c, 0x46, 0x1c, 0xfb, 0x9a, 0x63, 0xf9, 0xae, 0x1c, 0xfb, 0x37, 0x71, 0xec, 0x4f, 0x73, 0x28, - 0x1b, 0xd1, 0x97, 0x33, 0x79, 0x96, 0xcd, 0x3b, 0xf7, 0xe5, 0xb5, 0x0a, 0x15, 0x46, 0x1a, 0x85, - 0x7e, 0x01, 0x4a, 0x1e, 0x8d, 0x19, 0x17, 0xba, 0x98, 0xb6, 0x43, 0xa2, 0x29, 0xb2, 0x92, 0x62, - 0xff, 0x36, 0x8a, 0x87, 0xfa, 0x24, 0xb8, 0xc1, 0xdd, 0x41, 0x6b, 0xd3, 0x6a, 0x45, 0xe6, 0x02, - 0xab, 0x4d, 0x38, 0x49, 0x58, 0xa3, 0x93, 0x34, 0x35, 0x11, 0x90, 0x44, 0xef, 0xdd, 0x46, 0xa4, - 0x3b, 0x74, 0xd6, 0xd5, 0x41, 0xc5, 0xb1, 0x4a, 0x11, 0x7c, 0x02, 0x0a, 0x81, 0x60, 0x6d, 0x74, - 0x42, 0x0d, 0x9f, 0x93, 0xf0, 0xbb, 0xb7, 0xc1, 0xeb, 0xaf, 0x6a, 0xda, 0xd1, 0x41, 0x2b, 0x43, - 0x85, 0x82, 0xf6, 0x01, 0x8c, 0x3a, 0x41, 0xe2, 0x36, 0x43, 0xec, 0x05, 0x24, 0xd1, 0xf0, 0x79, - 0x09, 0xff, 0xd3, 0xdb, 0xe0, 0x1f, 0x28, 0xf8, 0xeb, 0xce, 0x0e, 0xb2, 0x84, 0xf2, 0x37, 0x4a, - 0xa7, 0x58, 0xea, 0x20, 0xdf, 0x20, 0x49, 0x18, 0xc4, 0x1a, 0x7f, 0x45, 0xe2, 0x3f, 0xb9, 0x0d, - 0x5f, 0x77, 0xd0, 0xa4, 0x9b, 0x83, 0x72, 0x4a, 0x1c, 0x81, 0x86, 0x34, 0xf6, 0xe9, 0x10, 0x74, - 0xf5, 0xce, 0xa0, 0x93, 0x6e, 0x0e, 0xca, 0x29, 0x51, 0x81, 0x36, 0xc1, 0x1a, 0x4e, 0x12, 0xfa, - 0x72, 0xa6, 0x20, 0x50, 0x62, 0xff, 0xec, 0x36, 0xec, 0xe1, 0x3e, 0x7d, 0xdd, 0x5b, 0xec, 0xd3, - 0x42, 0x3b, 0x55, 0x12, 0x1f, 0xc0, 0x66, 0x82, 0xfb, 0x33, 0x3c, 0xa5, 0x3b, 0x17, 0xfe, 0xba, - 0xb3, 0x83, 0x2c, 0xa1, 0x9c, 0x62, 0xf9, 0x0c, 0x94, 0x22, 0x92, 0x34, 0x89, 0x1b, 0x13, 0xce, - 0xda, 0x61, 0xc0, 0x35, 0xcf, 0xfa, 0x9d, 0xbf, 0x83, 0x9b, 0xdc, 0x1d, 0x04, 0xa5, 0xfa, 0x85, - 0xd6, 0x8e, 0xba, 0x94, 0xb5, 0x70, 0xdc, 0x6c, 0xe1, 0x40, 0xb3, 0xdc, 0xbb, 0x73, 0x97, 0x4e, - 0x3b, 0x3a, 0x68, 0x65, 0xa8, 0x18, 0x2d, 0xb5, 0x87, 0x63, 0xaf, 0x33, 0x5c, 0xea, 0xfb, 0x77, - 0x5e, 0xea, 0x49, 0x37, 0x07, 0xe5, 0x94, 0x28, 0x41, 0x4f, 0x0c, 0xb3, 0x60, 0x15, 0x4f, 0x0c, - 0xb3, 0x68, 0x59, 0x27, 0x86, 0x69, 0x59, 0xab, 0x27, 0x86, 0xb9, 0x66, 0x95, 0xd0, 0x4a, 0x9f, - 0x86, 0xd4, 0xed, 0x3e, 0x55, 0x4e, 0x28, 0x47, 0x5e, 0x62, 0xa6, 0x37, 0x1a, 0x54, 0xf0, 0x30, - 0xc7, 0x61, 0x9f, 0xe9, 0x42, 0x20, 0x4b, 0x95, 0x67, 0xe2, 0xd8, 0xda, 0x06, 0x8b, 0xe2, 0xce, - 0x44, 0xa0, 0x05, 0x16, 0x2e, 0x48, 0x5f, 0x1d, 0xb6, 0x48, 0x0c, 0x61, 0x09, 0x2c, 0x76, 0x71, - 0xd8, 0x21, 0xea, 0x8c, 0x44, 0x4a, 0x70, 0xce, 0x40, 0xf1, 0x3c, 0xc1, 0x31, 0x13, 0xf7, 0x2d, - 0x1a, 0x9f, 0xd2, 0x26, 0x83, 0x10, 0x18, 0xf2, 0x9c, 0x50, 0xbe, 0x72, 0x0c, 0x7f, 0x0c, 0x8c, - 0x90, 0x36, 0x99, 0xbc, 0x2d, 0xe4, 0x76, 0xd7, 0xaf, 0x5f, 0x4d, 0x4e, 0x69, 0x13, 0x49, 0x13, - 0xe7, 0x1f, 0xf3, 0x60, 0xe1, 0x94, 0x36, 0x61, 0x19, 0x2c, 0x63, 0xdf, 0x4f, 0x08, 0x63, 0x1a, - 0x69, 0x28, 0xc2, 0x7b, 0x60, 0x89, 0xd3, 0x76, 0xe0, 0x29, 0xb8, 0x2c, 0xd2, 0x92, 0x20, 0xf6, - 0x31, 0xc7, 0xf2, 0x60, 0xcd, 0x23, 0x39, 0x16, 0xd7, 0x57, 0x99, 0x99, 0x1b, 0x77, 0xa2, 0x06, - 0x49, 0xe4, 0xf9, 0x68, 0x54, 0x8b, 0x97, 0xa9, 0x9d, 0x93, 0xfa, 0x17, 0x52, 0x8d, 0x26, 0x05, - 0xf8, 0x2e, 0x58, 0xe6, 0xbd, 0xc9, 0xb3, 0x6e, 0xed, 0x32, 0xb5, 0x8b, 0x7c, 0x9c, 0xa6, 0x38, - 0xca, 0xd0, 0x12, 0xef, 0xc9, 0x23, 0x6d, 0x1b, 0x98, 0xbc, 0xe7, 0x06, 0xb1, 0x4f, 0x7a, 0xf2, - 0x38, 0x33, 0xaa, 0xa5, 0xcb, 0xd4, 0xb6, 0x26, 0xcc, 0x8f, 0xc5, 0x1c, 0x5a, 0xe6, 0x3d, 0x39, - 0x80, 0xef, 0x02, 0xa0, 0x42, 0x92, 0x0c, 0xea, 0x74, 0x5a, 0xb9, 0x4c, 0xed, 0xac, 0xd4, 0x4a, - 0xec, 0xf1, 0x10, 0x3a, 0x60, 0x51, 0x61, 0x9b, 0x12, 0x3b, 0x7f, 0x99, 0xda, 0x66, 0x48, 0x9b, - 0x0a, 0x53, 0x4d, 0x89, 0x52, 0x25, 0x24, 0xa2, 0x5d, 0xe2, 0xcb, 0x23, 0xc2, 0x44, 0x43, 0xd1, - 0x79, 0x3d, 0x0f, 0xcc, 0xf3, 0x1e, 0x22, 0xac, 0x13, 0x72, 0xf8, 0x01, 0xb0, 0xe4, 0x05, 0x0c, - 0x7b, 0xdc, 0x9d, 0x2a, 0x6d, 0xf5, 0xe1, 0x78, 0x43, 0x9f, 0xb5, 0x70, 0x50, 0x71, 0xa8, 0x3a, - 0xd0, 0xf5, 0x2f, 0x81, 0xc5, 0x46, 0x48, 0x69, 0x24, 0x3b, 0x21, 0x8f, 0x94, 0x00, 0x3f, 0x96, - 0x55, 0x93, 0xab, 0xbc, 0x20, 0x2f, 0xb7, 0xdf, 0xbf, 0xbe, 0xca, 0x33, 0xad, 0x52, 0x7d, 0xa8, - 0xdf, 0x2f, 0x05, 0xc5, 0xad, 0xfd, 0xf5, 0xd3, 0x65, 0x89, 0xf7, 0x64, 0x3f, 0x59, 0x60, 0x21, - 0x21, 0x5c, 0xae, 0x5c, 0x1e, 0x89, 0x21, 0xac, 0x00, 0x33, 0x21, 0x5d, 0x92, 0x70, 0xe2, 0xcb, - 0x15, 0x32, 0xd1, 0x48, 0x86, 0x0f, 0x80, 0xd9, 0xc4, 0xcc, 0xed, 0x30, 0xe2, 0xab, 0xe5, 0x40, - 0xcb, 0x4d, 0xcc, 0x3e, 0x62, 0xc4, 0x7f, 0x66, 0x7c, 0xfe, 0x85, 0x3d, 0xe7, 0x60, 0x90, 0xd3, - 0xf7, 0xde, 0x4e, 0x3b, 0x24, 0xb7, 0xb4, 0xd9, 0x2e, 0xc8, 0x33, 0x4e, 0x13, 0xdc, 0x24, 0xee, - 0x05, 0xe9, 0xeb, 0x66, 0x53, 0xad, 0xa3, 0xf5, 0xbf, 0x23, 0x7d, 0x86, 0x26, 0x05, 0x4d, 0xf1, - 0x85, 0x01, 0x72, 0xe7, 0x09, 0xf6, 0x88, 0xbe, 0xc5, 0x8a, 0x86, 0x15, 0x62, 0xa2, 0x29, 0xb4, - 0x24, 0xb8, 0x79, 0x10, 0x11, 0xda, 0xe1, 0xfa, 0xa3, 0x1a, 0x8a, 0xc2, 0x23, 0x21, 0xa4, 0x47, - 0x3c, 0x59, 0x4b, 0x03, 0x69, 0x09, 0xee, 0x81, 0x15, 0x3f, 0x60, 0xb8, 0x11, 0xca, 0xb7, 0x8f, - 0x77, 0xa1, 0xd2, 0xaf, 0x5a, 0x97, 0xa9, 0x9d, 0xd7, 0x13, 0x75, 0xa1, 0x47, 0x53, 0x12, 0x7c, - 0x1f, 0x14, 0xc7, 0x6e, 0x32, 0x5a, 0xf5, 0xe4, 0xab, 0xc2, 0xcb, 0xd4, 0x2e, 0x8c, 0x4c, 0xe5, - 0x0c, 0x9a, 0x91, 0xc5, 0x72, 0xfb, 0xa4, 0xd1, 0x69, 0xca, 0x0e, 0x34, 0x91, 0x12, 0x84, 0x36, - 0x0c, 0xa2, 0x80, 0xcb, 0x8e, 0x5b, 0x44, 0x4a, 0x80, 0xef, 0x83, 0x2c, 0xed, 0x92, 0x24, 0x09, - 0x7c, 0xf9, 0x14, 0xfb, 0xee, 0x27, 0x2c, 0x1a, 0xdb, 0x8b, 0xe4, 0x48, 0x2c, 0x83, 0x8c, 0x48, - 0x44, 0x93, 0xbe, 0xbc, 0x27, 0xe8, 0xe4, 0xd4, 0xc4, 0x73, 0xa9, 0x47, 0x53, 0x12, 0xac, 0x02, - 0xa8, 0xdd, 0x12, 0xc2, 0x3b, 0x49, 0xec, 0xca, 0x4d, 0x20, 0x2f, 0x7d, 0xe5, 0xa7, 0xa8, 0x66, - 0x91, 0x9c, 0x3c, 0xc2, 0x1c, 0xa3, 0x6b, 0x1a, 0xf8, 0x4b, 0x00, 0xd5, 0x9a, 0xb8, 0x9f, 0x31, - 0x3a, 0x7a, 0x83, 0xab, 0x83, 0x5e, 0xf2, 0xab, 0x59, 0x1d, 0xb3, 0xa5, 0xa4, 0x13, 0x46, 0x75, - 0x16, 0x27, 0x86, 0x69, 0x58, 0x8b, 0xea, 0xdd, 0x38, 0xaa, 0x9f, 0xce, 0x02, 0xad, 0x0d, 0xe5, - 0x89, 0xf0, 0x1e, 0xff, 0x3d, 0x03, 0x26, 0x9e, 0x5f, 0xf0, 0xe7, 0xa0, 0x72, 0x70, 0x78, 0x58, - 0xab, 0xd7, 0xdd, 0xf3, 0x4f, 0xce, 0x6a, 0xee, 0x59, 0x0d, 0x3d, 0x3f, 0xae, 0xd7, 0x8f, 0x3f, - 0x7c, 0x71, 0x5a, 0xab, 0xd7, 0xad, 0xb9, 0xca, 0x3b, 0xaf, 0xde, 0x6c, 0x96, 0xc7, 0xf6, 0x67, - 0xa2, 0x9e, 0x8c, 0x05, 0x34, 0x0e, 0x45, 0xa7, 0xbe, 0x07, 0xee, 0x4d, 0x7a, 0xa3, 0x5a, 0xfd, - 0x1c, 0x1d, 0x1f, 0x9e, 0xd7, 0x8e, 0xac, 0x4c, 0xa5, 0xfc, 0xea, 0xcd, 0x66, 0x69, 0xec, 0x89, - 0x08, 0xe3, 0x49, 0x20, 0x1e, 0xf7, 0x70, 0x1f, 0x94, 0x6f, 0xe6, 0xac, 0x1d, 0x59, 0xf3, 0x95, - 0xca, 0xab, 0x37, 0x9b, 0xf7, 0x6e, 0x62, 0x24, 0x7e, 0xc5, 0xf8, 0xfc, 0xaf, 0x1b, 0x73, 0xd5, - 0x5f, 0x7f, 0x35, 0xd8, 0xc8, 0x7c, 0x3d, 0xd8, 0xc8, 0xfc, 0x67, 0xb0, 0x91, 0x79, 0xfd, 0x76, - 0x63, 0xee, 0xeb, 0xb7, 0x1b, 0x73, 0xff, 0x7c, 0xbb, 0x31, 0xf7, 0x87, 0x1f, 0x35, 0x03, 0xde, - 0xea, 0x34, 0xb6, 0x3c, 0x1a, 0x6d, 0xab, 0xa7, 0xb6, 0xfa, 0xed, 0xee, 0x3e, 0xd1, 0x8f, 0x6e, - 0xf1, 0xbc, 0x64, 0x8d, 0x25, 0xf9, 0xbf, 0x97, 0xa7, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x80, - 0xcf, 0xeb, 0x91, 0xd4, 0x11, 0x00, 0x00, -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ActiveStaticPrecompiles) > 0 { - for iNdEx := len(m.ActiveStaticPrecompiles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ActiveStaticPrecompiles[iNdEx]) - copy(dAtA[i:], m.ActiveStaticPrecompiles[iNdEx]) - i = encodeVarintEvm(dAtA, i, uint64(len(m.ActiveStaticPrecompiles[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - { - size, err := m.AccessControl.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - if len(m.EVMChannels) > 0 { - for iNdEx := len(m.EVMChannels) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EVMChannels[iNdEx]) - copy(dAtA[i:], m.EVMChannels[iNdEx]) - i = encodeVarintEvm(dAtA, i, uint64(len(m.EVMChannels[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if m.AllowUnprotectedTxs { - i-- - if m.AllowUnprotectedTxs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - { - size, err := m.ChainConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.ExtraEIPs) > 0 { - for iNdEx := len(m.ExtraEIPs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExtraEIPs[iNdEx]) - copy(dAtA[i:], m.ExtraEIPs[iNdEx]) - i = encodeVarintEvm(dAtA, i, uint64(len(m.ExtraEIPs[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.EvmDenom) > 0 { - i -= len(m.EvmDenom) - copy(dAtA[i:], m.EvmDenom) - i = encodeVarintEvm(dAtA, i, uint64(len(m.EvmDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccessControl) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccessControl) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccessControl) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Call.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Create.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AccessControlType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccessControlType) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccessControlType) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AccessControlList) > 0 { - for iNdEx := len(m.AccessControlList) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AccessControlList[iNdEx]) - copy(dAtA[i:], m.AccessControlList[iNdEx]) - i = encodeVarintEvm(dAtA, i, uint64(len(m.AccessControlList[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.AccessType != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.AccessType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ChainConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChainConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CancunBlock != nil { - { - size := m.CancunBlock.Size() - i -= size - if _, err := m.CancunBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - if m.ShanghaiBlock != nil { - { - size := m.ShanghaiBlock.Size() - i -= size - if _, err := m.ShanghaiBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if m.MergeNetsplitBlock != nil { - { - size := m.MergeNetsplitBlock.Size() - i -= size - if _, err := m.MergeNetsplitBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if m.GrayGlacierBlock != nil { - { - size := m.GrayGlacierBlock.Size() - i -= size - if _, err := m.GrayGlacierBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.ArrowGlacierBlock != nil { - { - size := m.ArrowGlacierBlock.Size() - i -= size - if _, err := m.ArrowGlacierBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if m.LondonBlock != nil { - { - size := m.LondonBlock.Size() - i -= size - if _, err := m.LondonBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if m.BerlinBlock != nil { - { - size := m.BerlinBlock.Size() - i -= size - if _, err := m.BerlinBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - if m.MuirGlacierBlock != nil { - { - size := m.MuirGlacierBlock.Size() - i -= size - if _, err := m.MuirGlacierBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - if m.IstanbulBlock != nil { - { - size := m.IstanbulBlock.Size() - i -= size - if _, err := m.IstanbulBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.PetersburgBlock != nil { - { - size := m.PetersburgBlock.Size() - i -= size - if _, err := m.PetersburgBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.ConstantinopleBlock != nil { - { - size := m.ConstantinopleBlock.Size() - i -= size - if _, err := m.ConstantinopleBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.ByzantiumBlock != nil { - { - size := m.ByzantiumBlock.Size() - i -= size - if _, err := m.ByzantiumBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.EIP158Block != nil { - { - size := m.EIP158Block.Size() - i -= size - if _, err := m.EIP158Block.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.EIP155Block != nil { - { - size := m.EIP155Block.Size() - i -= size - if _, err := m.EIP155Block.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.EIP150Hash) > 0 { - i -= len(m.EIP150Hash) - copy(dAtA[i:], m.EIP150Hash) - i = encodeVarintEvm(dAtA, i, uint64(len(m.EIP150Hash))) - i-- - dAtA[i] = 0x2a - } - if m.EIP150Block != nil { - { - size := m.EIP150Block.Size() - i -= size - if _, err := m.EIP150Block.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.DAOForkSupport { - i-- - if m.DAOForkSupport { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.DAOForkBlock != nil { - { - size := m.DAOForkBlock.Size() - i -= size - if _, err := m.DAOForkBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.HomesteadBlock != nil { - { - size := m.HomesteadBlock.Size() - i -= size - if _, err := m.HomesteadBlock.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *State) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *State) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionLogs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransactionLogs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Logs) > 0 { - for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Log) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Log) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Removed { - i-- - if m.Removed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.Index != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x40 - } - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = encodeVarintEvm(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0x3a - } - if m.TxIndex != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.TxIndex)) - i-- - dAtA[i] = 0x30 - } - if len(m.TxHash) > 0 { - i -= len(m.TxHash) - copy(dAtA[i:], m.TxHash) - i = encodeVarintEvm(dAtA, i, uint64(len(m.TxHash))) - i-- - dAtA[i] = 0x2a - } - if m.BlockNumber != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.BlockNumber)) - i-- - dAtA[i] = 0x20 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if len(m.Topics) > 0 { - for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Topics[iNdEx]) - copy(dAtA[i:], m.Topics[iNdEx]) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Topics[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TxResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GasUsed != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.Reverted { - i-- - if m.Reverted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.Ret) > 0 { - i -= len(m.Ret) - copy(dAtA[i:], m.Ret) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Ret))) - i-- - dAtA[i] = 0x22 - } - { - size, err := m.TxLogs.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Bloom) > 0 { - i -= len(m.Bloom) - copy(dAtA[i:], m.Bloom) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Bloom))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = encodeVarintEvm(dAtA, i, uint64(len(m.ContractAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccessTuple) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccessTuple) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StorageKeys) > 0 { - for iNdEx := len(m.StorageKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StorageKeys[iNdEx]) - copy(dAtA[i:], m.StorageKeys[iNdEx]) - i = encodeVarintEvm(dAtA, i, uint64(len(m.StorageKeys[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TraceConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TraceConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TracerJsonConfig) > 0 { - i -= len(m.TracerJsonConfig) - copy(dAtA[i:], m.TracerJsonConfig) - i = encodeVarintEvm(dAtA, i, uint64(len(m.TracerJsonConfig))) - i-- - dAtA[i] = 0x6a - } - if m.EnableReturnData { - i-- - if m.EnableReturnData { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if m.EnableMemory { - i-- - if m.EnableMemory { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.Overrides != nil { - { - size, err := m.Overrides.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.Limit != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x48 - } - if m.Debug { - i-- - if m.Debug { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.DisableStorage { - i-- - if m.DisableStorage { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.DisableStack { - i-- - if m.DisableStack { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Reexec != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.Reexec)) - i-- - dAtA[i] = 0x18 - } - if len(m.Timeout) > 0 { - i -= len(m.Timeout) - copy(dAtA[i:], m.Timeout) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Timeout))) - i-- - dAtA[i] = 0x12 - } - if len(m.Tracer) > 0 { - i -= len(m.Tracer) - copy(dAtA[i:], m.Tracer) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Tracer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { - offset -= sovEvm(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EvmDenom) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if len(m.ExtraEIPs) > 0 { - for _, s := range m.ExtraEIPs { - l = len(s) - n += 1 + l + sovEvm(uint64(l)) - } - } - l = m.ChainConfig.Size() - n += 1 + l + sovEvm(uint64(l)) - if m.AllowUnprotectedTxs { - n += 2 - } - if len(m.EVMChannels) > 0 { - for _, s := range m.EVMChannels { - l = len(s) - n += 1 + l + sovEvm(uint64(l)) - } - } - l = m.AccessControl.Size() - n += 1 + l + sovEvm(uint64(l)) - if len(m.ActiveStaticPrecompiles) > 0 { - for _, s := range m.ActiveStaticPrecompiles { - l = len(s) - n += 1 + l + sovEvm(uint64(l)) - } - } - return n -} - -func (m *AccessControl) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Create.Size() - n += 1 + l + sovEvm(uint64(l)) - l = m.Call.Size() - n += 1 + l + sovEvm(uint64(l)) - return n -} - -func (m *AccessControlType) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AccessType != 0 { - n += 1 + sovEvm(uint64(m.AccessType)) - } - if len(m.AccessControlList) > 0 { - for _, s := range m.AccessControlList { - l = len(s) - n += 1 + l + sovEvm(uint64(l)) - } - } - return n -} - -func (m *ChainConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HomesteadBlock != nil { - l = m.HomesteadBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.DAOForkBlock != nil { - l = m.DAOForkBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.DAOForkSupport { - n += 2 - } - if m.EIP150Block != nil { - l = m.EIP150Block.Size() - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.EIP150Hash) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if m.EIP155Block != nil { - l = m.EIP155Block.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.EIP158Block != nil { - l = m.EIP158Block.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.ByzantiumBlock != nil { - l = m.ByzantiumBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.ConstantinopleBlock != nil { - l = m.ConstantinopleBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.PetersburgBlock != nil { - l = m.PetersburgBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.IstanbulBlock != nil { - l = m.IstanbulBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.MuirGlacierBlock != nil { - l = m.MuirGlacierBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.BerlinBlock != nil { - l = m.BerlinBlock.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.LondonBlock != nil { - l = m.LondonBlock.Size() - n += 2 + l + sovEvm(uint64(l)) - } - if m.ArrowGlacierBlock != nil { - l = m.ArrowGlacierBlock.Size() - n += 2 + l + sovEvm(uint64(l)) - } - if m.GrayGlacierBlock != nil { - l = m.GrayGlacierBlock.Size() - n += 2 + l + sovEvm(uint64(l)) - } - if m.MergeNetsplitBlock != nil { - l = m.MergeNetsplitBlock.Size() - n += 2 + l + sovEvm(uint64(l)) - } - if m.ShanghaiBlock != nil { - l = m.ShanghaiBlock.Size() - n += 2 + l + sovEvm(uint64(l)) - } - if m.CancunBlock != nil { - l = m.CancunBlock.Size() - n += 2 + l + sovEvm(uint64(l)) - } - return n -} - -func (m *State) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - return n -} - -func (m *TransactionLogs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if len(m.Logs) > 0 { - for _, e := range m.Logs { - l = e.Size() - n += 1 + l + sovEvm(uint64(l)) - } - } - return n -} - -func (m *Log) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if len(m.Topics) > 0 { - for _, s := range m.Topics { - l = len(s) - n += 1 + l + sovEvm(uint64(l)) - } - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if m.BlockNumber != 0 { - n += 1 + sovEvm(uint64(m.BlockNumber)) - } - l = len(m.TxHash) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if m.TxIndex != 0 { - n += 1 + sovEvm(uint64(m.TxIndex)) - } - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if m.Index != 0 { - n += 1 + sovEvm(uint64(m.Index)) - } - if m.Removed { - n += 2 - } - return n -} - -func (m *TxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContractAddress) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.Bloom) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = m.TxLogs.Size() - n += 1 + l + sovEvm(uint64(l)) - l = len(m.Ret) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if m.Reverted { - n += 2 - } - if m.GasUsed != 0 { - n += 1 + sovEvm(uint64(m.GasUsed)) - } - return n -} - -func (m *AccessTuple) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if len(m.StorageKeys) > 0 { - for _, s := range m.StorageKeys { - l = len(s) - n += 1 + l + sovEvm(uint64(l)) - } - } - return n -} - -func (m *TraceConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Tracer) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.Timeout) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if m.Reexec != 0 { - n += 1 + sovEvm(uint64(m.Reexec)) - } - if m.DisableStack { - n += 2 - } - if m.DisableStorage { - n += 2 - } - if m.Debug { - n += 2 - } - if m.Limit != 0 { - n += 1 + sovEvm(uint64(m.Limit)) - } - if m.Overrides != nil { - l = m.Overrides.Size() - n += 1 + l + sovEvm(uint64(l)) - } - if m.EnableMemory { - n += 2 - } - if m.EnableReturnData { - n += 2 - } - l = len(m.TracerJsonConfig) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - return n -} - -func sovEvm(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvm(x uint64) (n int) { - return sovEvm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvmDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvmDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtraEIPs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtraEIPs = append(m.ExtraEIPs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ChainConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowUnprotectedTxs", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowUnprotectedTxs = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EVMChannels", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EVMChannels = append(m.EVMChannels, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessControl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AccessControl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveStaticPrecompiles", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActiveStaticPrecompiles = append(m.ActiveStaticPrecompiles, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccessControl) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccessControl: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccessControl: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Create", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Create.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Call", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Call.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccessControlType) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccessControlType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccessControlType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessType", wireType) - } - m.AccessType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccessType |= AccessType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessControlList", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccessControlList = append(m.AccessControlList, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChainConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChainConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChainConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HomesteadBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.HomesteadBlock = &v - if err := m.HomesteadBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DAOForkBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.DAOForkBlock = &v - if err := m.DAOForkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DAOForkSupport", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DAOForkSupport = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EIP150Block", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.EIP150Block = &v - if err := m.EIP150Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EIP150Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EIP150Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EIP155Block", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.EIP155Block = &v - if err := m.EIP155Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EIP158Block", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.EIP158Block = &v - if err := m.EIP158Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByzantiumBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.ByzantiumBlock = &v - if err := m.ByzantiumBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConstantinopleBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.ConstantinopleBlock = &v - if err := m.ConstantinopleBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PetersburgBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.PetersburgBlock = &v - if err := m.PetersburgBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IstanbulBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.IstanbulBlock = &v - if err := m.IstanbulBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MuirGlacierBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.MuirGlacierBlock = &v - if err := m.MuirGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BerlinBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.BerlinBlock = &v - if err := m.BerlinBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LondonBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.LondonBlock = &v - if err := m.LondonBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ArrowGlacierBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.ArrowGlacierBlock = &v - if err := m.ArrowGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrayGlacierBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.GrayGlacierBlock = &v - if err := m.GrayGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MergeNetsplitBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.MergeNetsplitBlock = &v - if err := m.MergeNetsplitBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShanghaiBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.ShanghaiBlock = &v - if err := m.ShanghaiBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CancunBlock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.CancunBlock = &v - if err := m.CancunBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *State) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: State: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionLogs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransactionLogs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionLogs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Logs = append(m.Logs, &Log{}) - if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Log) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Log: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Topics = append(m.Topics, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) - } - m.BlockNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) - } - m.TxIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TxIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Removed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Removed = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bloom", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bloom = append(m.Bloom[:0], dAtA[iNdEx:postIndex]...) - if m.Bloom == nil { - m.Bloom = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TxLogs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) - if m.Ret == nil { - m.Ret = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Reverted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Reverted = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccessTuple) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccessTuple: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccessTuple: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageKeys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageKeys = append(m.StorageKeys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TraceConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tracer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tracer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timeout = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Reexec", wireType) - } - m.Reexec = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Reexec |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableStack", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableStack = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableStorage", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DisableStorage = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Debug = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Overrides == nil { - m.Overrides = &ChainConfig{} - } - if err := m.Overrides.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableMemory", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableMemory = bool(v != 0) - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableReturnData", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableReturnData = bool(v != 0) - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TracerJsonConfig", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TracerJsonConfig = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvm(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvm - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvm - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvm - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvm - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvm - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvm - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvm = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvm = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvm = fmt.Errorf("proto: unexpected end of group") -) diff --git a/app/upgrades/v9/legacy/evm/types/genesis.pb.go b/app/upgrades/v9/legacy/evm/types/genesis.pb.go deleted file mode 100644 index 8150b8c..0000000 --- a/app/upgrades/v9/legacy/evm/types/genesis.pb.go +++ /dev/null @@ -1,684 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/evm/v1/genesis.proto - -package types - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the evm module's genesis state. -type GenesisState struct { - // accounts is an array containing the ethereum genesis accounts. - Accounts []GenesisAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` - // params defines all the parameters of the module. - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_9bcdec50cc9d156d, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetAccounts() []GenesisAccount { - if m != nil { - return m.Accounts - } - return nil -} - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// GenesisAccount defines an account to be initialized in the genesis state. -// Its main difference between with Geth's GenesisAccount is that it uses a -// custom storage type and that it doesn't contain the private key field. -type GenesisAccount struct { - // address defines an ethereum hex formated address of an account - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // code defines the hex bytes of the account code. - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - // storage defines the set of state key values for the account. - Storage Storage `protobuf:"bytes,3,rep,name=storage,proto3,castrepeated=Storage" json:"storage"` -} - -func (m *GenesisAccount) Reset() { *m = GenesisAccount{} } -func (m *GenesisAccount) String() string { return proto.CompactTextString(m) } -func (*GenesisAccount) ProtoMessage() {} -func (*GenesisAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_9bcdec50cc9d156d, []int{1} -} -func (m *GenesisAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisAccount.Merge(m, src) -} -func (m *GenesisAccount) XXX_Size() int { - return m.Size() -} -func (m *GenesisAccount) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisAccount proto.InternalMessageInfo - -func (m *GenesisAccount) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *GenesisAccount) GetCode() string { - if m != nil { - return m.Code - } - return "" -} - -func (m *GenesisAccount) GetStorage() Storage { - if m != nil { - return m.Storage - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "ethermint.evm.v1.GenesisState") - proto.RegisterType((*GenesisAccount)(nil), "ethermint.evm.v1.GenesisAccount") -} - -func init() { proto.RegisterFile("ethermint/evm/v1/genesis.proto", fileDescriptor_9bcdec50cc9d156d) } - -var fileDescriptor_9bcdec50cc9d156d = []byte{ - // 321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0x2d, 0xc9, 0x48, - 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x2d, 0xcb, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, - 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xcb, 0xeb, 0xa5, - 0x96, 0xe5, 0xea, 0x95, 0x19, 0x4a, 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, - 0x22, 0x29, 0x29, 0x0c, 0x43, 0x40, 0x6a, 0x21, 0x72, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, - 0x3e, 0x88, 0x05, 0x11, 0x55, 0x9a, 0xc2, 0xc8, 0xc5, 0xe3, 0x0e, 0xb1, 0x28, 0xb8, 0x24, 0xb1, - 0x24, 0x55, 0xc8, 0x9d, 0x8b, 0x23, 0x31, 0x39, 0x39, 0xbf, 0x34, 0xaf, 0xa4, 0x58, 0x82, 0x51, - 0x81, 0x59, 0x83, 0xdb, 0x48, 0x41, 0x0f, 0xdd, 0x6a, 0x3d, 0xa8, 0x0e, 0x47, 0x88, 0x42, 0x27, - 0xce, 0x13, 0xf7, 0xe4, 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, 0xd7, 0x2c, 0x64, 0xcd, - 0xc5, 0x56, 0x90, 0x58, 0x94, 0x98, 0x5b, 0x2c, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0x81, - 0x69, 0x4c, 0x00, 0x58, 0x1e, 0x59, 0x3b, 0x54, 0x8b, 0x52, 0x3b, 0x23, 0x17, 0x1f, 0xaa, 0x25, - 0x42, 0x12, 0x5c, 0xec, 0x89, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0x20, 0x77, 0x31, 0x6a, 0x70, 0x06, - 0xc1, 0xb8, 0x42, 0x42, 0x5c, 0x2c, 0xc9, 0xf9, 0x29, 0xa9, 0x60, 0x7b, 0x38, 0x83, 0xc0, 0x6c, - 0x21, 0x77, 0x2e, 0xf6, 0xe2, 0x92, 0xfc, 0xa2, 0xc4, 0xf4, 0x54, 0x09, 0x66, 0xb0, 0x2f, 0xc4, - 0x31, 0xad, 0x07, 0x7b, 0xd8, 0x49, 0x04, 0x64, 0xfb, 0xaa, 0xfb, 0xf2, 0xec, 0xc1, 0x10, 0xf5, - 0x10, 0x87, 0xc0, 0x74, 0x3b, 0x39, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, - 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, - 0x94, 0x5a, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0x28, 0x98, 0xf3, 0x8b, - 0xa1, 0x64, 0x99, 0x91, 0x81, 0x7e, 0x05, 0x38, 0xfc, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, - 0xc0, 0x21, 0x6d, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe2, 0xca, 0x72, 0xe8, 0xe2, 0x01, 0x00, - 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Accounts) > 0 { - for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *GenesisAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Storage) > 0 { - for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Code) > 0 { - i -= len(m.Code) - copy(dAtA[i:], m.Code) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Code))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Accounts) > 0 { - for _, e := range m.Accounts { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - return n -} - -func (m *GenesisAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Code) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.Storage) > 0 { - for _, e := range m.Storage { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Accounts = append(m.Accounts, GenesisAccount{}) - if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Code = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Storage = append(m.Storage, State{}) - if err := m.Storage[len(m.Storage)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/app/upgrades/v9/legacy/evm/types/query.pb.go b/app/upgrades/v9/legacy/evm/types/query.pb.go deleted file mode 100644 index d3eb16b..0000000 --- a/app/upgrades/v9/legacy/evm/types/query.pb.go +++ /dev/null @@ -1,6103 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/evm/v1/query.proto - -package types - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - time "time" - - cosmossdk_io_math "cosmossdk.io/math" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - _ "google.golang.org/protobuf/types/known/timestamppb" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryAccountRequest is the request type for the Query/Account RPC method. -type QueryAccountRequest struct { - // address is the ethereum hex address to query the account for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryAccountRequest) Reset() { *m = QueryAccountRequest{} } -func (m *QueryAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAccountRequest) ProtoMessage() {} -func (*QueryAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{0} -} -func (m *QueryAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountRequest.Merge(m, src) -} -func (m *QueryAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo - -// QueryAccountResponse is the response type for the Query/Account RPC method. -type QueryAccountResponse struct { - // balance is the balance of the EVM denomination. - Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` - // code_hash is the hex-formatted code bytes from the EOA. - CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` - // nonce is the account's sequence number. - Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } -func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountResponse) ProtoMessage() {} -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{1} -} -func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountResponse.Merge(m, src) -} -func (m *QueryAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo - -func (m *QueryAccountResponse) GetBalance() string { - if m != nil { - return m.Balance - } - return "" -} - -func (m *QueryAccountResponse) GetCodeHash() string { - if m != nil { - return m.CodeHash - } - return "" -} - -func (m *QueryAccountResponse) GetNonce() uint64 { - if m != nil { - return m.Nonce - } - return 0 -} - -// QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC -// method. -type QueryCosmosAccountRequest struct { - // address is the ethereum hex address to query the account for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryCosmosAccountRequest) Reset() { *m = QueryCosmosAccountRequest{} } -func (m *QueryCosmosAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCosmosAccountRequest) ProtoMessage() {} -func (*QueryCosmosAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{2} -} -func (m *QueryCosmosAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCosmosAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCosmosAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCosmosAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCosmosAccountRequest.Merge(m, src) -} -func (m *QueryCosmosAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCosmosAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCosmosAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCosmosAccountRequest proto.InternalMessageInfo - -// QueryCosmosAccountResponse is the response type for the Query/CosmosAccount -// RPC method. -type QueryCosmosAccountResponse struct { - // cosmos_address is the cosmos address of the account. - CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"` - // sequence is the account's sequence number. - Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` - // account_number is the account number - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` -} - -func (m *QueryCosmosAccountResponse) Reset() { *m = QueryCosmosAccountResponse{} } -func (m *QueryCosmosAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCosmosAccountResponse) ProtoMessage() {} -func (*QueryCosmosAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{3} -} -func (m *QueryCosmosAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCosmosAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCosmosAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCosmosAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCosmosAccountResponse.Merge(m, src) -} -func (m *QueryCosmosAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCosmosAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCosmosAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCosmosAccountResponse proto.InternalMessageInfo - -func (m *QueryCosmosAccountResponse) GetCosmosAddress() string { - if m != nil { - return m.CosmosAddress - } - return "" -} - -func (m *QueryCosmosAccountResponse) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -func (m *QueryCosmosAccountResponse) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber - } - return 0 -} - -// QueryValidatorAccountRequest is the request type for the -// Query/ValidatorAccount RPC method. -type QueryValidatorAccountRequest struct { - // cons_address is the validator cons address to query the account for. - ConsAddress string `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3" json:"cons_address,omitempty"` -} - -func (m *QueryValidatorAccountRequest) Reset() { *m = QueryValidatorAccountRequest{} } -func (m *QueryValidatorAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorAccountRequest) ProtoMessage() {} -func (*QueryValidatorAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{4} -} -func (m *QueryValidatorAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryValidatorAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryValidatorAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorAccountRequest.Merge(m, src) -} -func (m *QueryValidatorAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryValidatorAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorAccountRequest proto.InternalMessageInfo - -// QueryValidatorAccountResponse is the response type for the -// Query/ValidatorAccount RPC method. -type QueryValidatorAccountResponse struct { - // account_address is the cosmos address of the account in bech32 format. - AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - // sequence is the account's sequence number. - Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` - // account_number is the account number - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` -} - -func (m *QueryValidatorAccountResponse) Reset() { *m = QueryValidatorAccountResponse{} } -func (m *QueryValidatorAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorAccountResponse) ProtoMessage() {} -func (*QueryValidatorAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{5} -} -func (m *QueryValidatorAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryValidatorAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryValidatorAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorAccountResponse.Merge(m, src) -} -func (m *QueryValidatorAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryValidatorAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorAccountResponse proto.InternalMessageInfo - -func (m *QueryValidatorAccountResponse) GetAccountAddress() string { - if m != nil { - return m.AccountAddress - } - return "" -} - -func (m *QueryValidatorAccountResponse) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -func (m *QueryValidatorAccountResponse) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber - } - return 0 -} - -// QueryBalanceRequest is the request type for the Query/Balance RPC method. -type QueryBalanceRequest struct { - // address is the ethereum hex address to query the balance for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } -func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceRequest) ProtoMessage() {} -func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{6} -} -func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceRequest.Merge(m, src) -} -func (m *QueryBalanceRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBalanceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -type QueryBalanceResponse struct { - // balance is the balance of the EVM denomination. - Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } -func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceResponse) ProtoMessage() {} -func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{7} -} -func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBalanceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceResponse.Merge(m, src) -} -func (m *QueryBalanceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo - -func (m *QueryBalanceResponse) GetBalance() string { - if m != nil { - return m.Balance - } - return "" -} - -// QueryStorageRequest is the request type for the Query/Storage RPC method. -type QueryStorageRequest struct { - // address is the ethereum hex address to query the storage state for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // key defines the key of the storage state - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (m *QueryStorageRequest) Reset() { *m = QueryStorageRequest{} } -func (m *QueryStorageRequest) String() string { return proto.CompactTextString(m) } -func (*QueryStorageRequest) ProtoMessage() {} -func (*QueryStorageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{8} -} -func (m *QueryStorageRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryStorageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryStorageRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryStorageRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStorageRequest.Merge(m, src) -} -func (m *QueryStorageRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryStorageRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryStorageRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryStorageRequest proto.InternalMessageInfo - -// QueryStorageResponse is the response type for the Query/Storage RPC -// method. -type QueryStorageResponse struct { - // value defines the storage state value hash associated with the given key. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *QueryStorageResponse) Reset() { *m = QueryStorageResponse{} } -func (m *QueryStorageResponse) String() string { return proto.CompactTextString(m) } -func (*QueryStorageResponse) ProtoMessage() {} -func (*QueryStorageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{9} -} -func (m *QueryStorageResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryStorageResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryStorageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStorageResponse.Merge(m, src) -} -func (m *QueryStorageResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryStorageResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryStorageResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryStorageResponse proto.InternalMessageInfo - -func (m *QueryStorageResponse) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// QueryCodeRequest is the request type for the Query/Code RPC method. -type QueryCodeRequest struct { - // address is the ethereum hex address to query the code for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryCodeRequest) Reset() { *m = QueryCodeRequest{} } -func (m *QueryCodeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCodeRequest) ProtoMessage() {} -func (*QueryCodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{10} -} -func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCodeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCodeRequest.Merge(m, src) -} -func (m *QueryCodeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCodeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCodeRequest proto.InternalMessageInfo - -// QueryCodeResponse is the response type for the Query/Code RPC -// method. -type QueryCodeResponse struct { - // code represents the code bytes from an ethereum address. - Code []byte `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` -} - -func (m *QueryCodeResponse) Reset() { *m = QueryCodeResponse{} } -func (m *QueryCodeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCodeResponse) ProtoMessage() {} -func (*QueryCodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{11} -} -func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCodeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCodeResponse.Merge(m, src) -} -func (m *QueryCodeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCodeResponse proto.InternalMessageInfo - -func (m *QueryCodeResponse) GetCode() []byte { - if m != nil { - return m.Code - } - return nil -} - -// QueryTxLogsRequest is the request type for the Query/TxLogs RPC method. -type QueryTxLogsRequest struct { - // hash is the ethereum transaction hex hash to query the logs for. - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryTxLogsRequest) Reset() { *m = QueryTxLogsRequest{} } -func (m *QueryTxLogsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTxLogsRequest) ProtoMessage() {} -func (*QueryTxLogsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{12} -} -func (m *QueryTxLogsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTxLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTxLogsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTxLogsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTxLogsRequest.Merge(m, src) -} -func (m *QueryTxLogsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTxLogsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTxLogsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTxLogsRequest proto.InternalMessageInfo - -// QueryTxLogsResponse is the response type for the Query/TxLogs RPC method. -type QueryTxLogsResponse struct { - // logs represents the ethereum logs generated from the given transaction. - Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryTxLogsResponse) Reset() { *m = QueryTxLogsResponse{} } -func (m *QueryTxLogsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTxLogsResponse) ProtoMessage() {} -func (*QueryTxLogsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{13} -} -func (m *QueryTxLogsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTxLogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTxLogsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTxLogsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTxLogsResponse.Merge(m, src) -} -func (m *QueryTxLogsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTxLogsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTxLogsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTxLogsResponse proto.InternalMessageInfo - -func (m *QueryTxLogsResponse) GetLogs() []*Log { - if m != nil { - return m.Logs - } - return nil -} - -func (m *QueryTxLogsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryParamsRequest defines the request type for querying x/evm parameters. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{14} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse defines the response type for querying x/evm parameters. -type QueryParamsResponse struct { - // params define the evm module parameters. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{15} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// EthCallRequest defines EthCall request -type EthCallRequest struct { - // args uses the same json format as the json rpc api. - Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"` - // gas_cap defines the default gas cap to be used - GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"` - // proposer_address of the requested block in hex format - ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` - // chain_id is the eip155 chain id parsed from the requested block header - ChainId int64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (m *EthCallRequest) Reset() { *m = EthCallRequest{} } -func (m *EthCallRequest) String() string { return proto.CompactTextString(m) } -func (*EthCallRequest) ProtoMessage() {} -func (*EthCallRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{16} -} -func (m *EthCallRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EthCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EthCallRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EthCallRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EthCallRequest.Merge(m, src) -} -func (m *EthCallRequest) XXX_Size() int { - return m.Size() -} -func (m *EthCallRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EthCallRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EthCallRequest proto.InternalMessageInfo - -func (m *EthCallRequest) GetArgs() []byte { - if m != nil { - return m.Args - } - return nil -} - -func (m *EthCallRequest) GetGasCap() uint64 { - if m != nil { - return m.GasCap - } - return 0 -} - -func (m *EthCallRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { - if m != nil { - return m.ProposerAddress - } - return nil -} - -func (m *EthCallRequest) GetChainId() int64 { - if m != nil { - return m.ChainId - } - return 0 -} - -// EstimateGasResponse defines EstimateGas response -type EstimateGasResponse struct { - // gas returns the estimated gas - Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"` - // ret is the returned data from evm function (result or data supplied with revert - // opcode) - Ret []byte `protobuf:"bytes,2,opt,name=ret,proto3" json:"ret,omitempty"` - // vm_error is the error returned by vm execution - VmError string `protobuf:"bytes,3,opt,name=vm_error,json=vmError,proto3" json:"vm_error,omitempty"` -} - -func (m *EstimateGasResponse) Reset() { *m = EstimateGasResponse{} } -func (m *EstimateGasResponse) String() string { return proto.CompactTextString(m) } -func (*EstimateGasResponse) ProtoMessage() {} -func (*EstimateGasResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{17} -} -func (m *EstimateGasResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EstimateGasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EstimateGasResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EstimateGasResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EstimateGasResponse.Merge(m, src) -} -func (m *EstimateGasResponse) XXX_Size() int { - return m.Size() -} -func (m *EstimateGasResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EstimateGasResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EstimateGasResponse proto.InternalMessageInfo - -func (m *EstimateGasResponse) GetGas() uint64 { - if m != nil { - return m.Gas - } - return 0 -} - -func (m *EstimateGasResponse) GetRet() []byte { - if m != nil { - return m.Ret - } - return nil -} - -func (m *EstimateGasResponse) GetVmError() string { - if m != nil { - return m.VmError - } - return "" -} - -// QueryTraceTxRequest defines TraceTx request -type QueryTraceTxRequest struct { - // msg is the MsgEthereumTx for the requested transaction - Msg *MsgEthereumTx `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` - // trace_config holds extra parameters to trace functions. - TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` - // predecessors is an array of transactions included in the same block - // need to be replayed first to get correct context for tracing. - Predecessors []*MsgEthereumTx `protobuf:"bytes,4,rep,name=predecessors,proto3" json:"predecessors,omitempty"` - // block_number of requested transaction - BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - // block_hash of requested transaction - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - // block_time of requested transaction - BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` - // proposer_address is the proposer of the requested block - ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` - // chain_id is the eip155 chain id parsed from the requested block header - ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // block_max_gas of the block of the requested transaction - BlockMaxGas int64 `protobuf:"varint,10,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` -} - -func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } -func (m *QueryTraceTxRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTraceTxRequest) ProtoMessage() {} -func (*QueryTraceTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{18} -} -func (m *QueryTraceTxRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTraceTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTraceTxRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTraceTxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTraceTxRequest.Merge(m, src) -} -func (m *QueryTraceTxRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTraceTxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTraceTxRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTraceTxRequest proto.InternalMessageInfo - -func (m *QueryTraceTxRequest) GetMsg() *MsgEthereumTx { - if m != nil { - return m.Msg - } - return nil -} - -func (m *QueryTraceTxRequest) GetTraceConfig() *TraceConfig { - if m != nil { - return m.TraceConfig - } - return nil -} - -func (m *QueryTraceTxRequest) GetPredecessors() []*MsgEthereumTx { - if m != nil { - return m.Predecessors - } - return nil -} - -func (m *QueryTraceTxRequest) GetBlockNumber() int64 { - if m != nil { - return m.BlockNumber - } - return 0 -} - -func (m *QueryTraceTxRequest) GetBlockHash() string { - if m != nil { - return m.BlockHash - } - return "" -} - -func (m *QueryTraceTxRequest) GetBlockTime() time.Time { - if m != nil { - return m.BlockTime - } - return time.Time{} -} - -func (m *QueryTraceTxRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { - if m != nil { - return m.ProposerAddress - } - return nil -} - -func (m *QueryTraceTxRequest) GetChainId() int64 { - if m != nil { - return m.ChainId - } - return 0 -} - -func (m *QueryTraceTxRequest) GetBlockMaxGas() int64 { - if m != nil { - return m.BlockMaxGas - } - return 0 -} - -// QueryTraceTxResponse defines TraceTx response -type QueryTraceTxResponse struct { - // data is the response serialized in bytes - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *QueryTraceTxResponse) Reset() { *m = QueryTraceTxResponse{} } -func (m *QueryTraceTxResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTraceTxResponse) ProtoMessage() {} -func (*QueryTraceTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{19} -} -func (m *QueryTraceTxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTraceTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTraceTxResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTraceTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTraceTxResponse.Merge(m, src) -} -func (m *QueryTraceTxResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTraceTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTraceTxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTraceTxResponse proto.InternalMessageInfo - -func (m *QueryTraceTxResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -// QueryTraceBlockRequest defines TraceTx request -type QueryTraceBlockRequest struct { - // txs is an array of messages in the block - Txs []*MsgEthereumTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` - // trace_config holds extra parameters to trace functions. - TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` - // block_number of the traced block - BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - // block_hash (hex) of the traced block - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - // block_time of the traced block - BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` - // proposer_address is the address of the requested block - ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` - // chain_id is the eip155 chain id parsed from the requested block header - ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // block_max_gas of the traced block - BlockMaxGas int64 `protobuf:"varint,10,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` -} - -func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} } -func (m *QueryTraceBlockRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTraceBlockRequest) ProtoMessage() {} -func (*QueryTraceBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{20} -} -func (m *QueryTraceBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTraceBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTraceBlockRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTraceBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTraceBlockRequest.Merge(m, src) -} -func (m *QueryTraceBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTraceBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTraceBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTraceBlockRequest proto.InternalMessageInfo - -func (m *QueryTraceBlockRequest) GetTxs() []*MsgEthereumTx { - if m != nil { - return m.Txs - } - return nil -} - -func (m *QueryTraceBlockRequest) GetTraceConfig() *TraceConfig { - if m != nil { - return m.TraceConfig - } - return nil -} - -func (m *QueryTraceBlockRequest) GetBlockNumber() int64 { - if m != nil { - return m.BlockNumber - } - return 0 -} - -func (m *QueryTraceBlockRequest) GetBlockHash() string { - if m != nil { - return m.BlockHash - } - return "" -} - -func (m *QueryTraceBlockRequest) GetBlockTime() time.Time { - if m != nil { - return m.BlockTime - } - return time.Time{} -} - -func (m *QueryTraceBlockRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { - if m != nil { - return m.ProposerAddress - } - return nil -} - -func (m *QueryTraceBlockRequest) GetChainId() int64 { - if m != nil { - return m.ChainId - } - return 0 -} - -func (m *QueryTraceBlockRequest) GetBlockMaxGas() int64 { - if m != nil { - return m.BlockMaxGas - } - return 0 -} - -// QueryTraceBlockResponse defines TraceBlock response -type QueryTraceBlockResponse struct { - // data is the response serialized in bytes - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *QueryTraceBlockResponse) Reset() { *m = QueryTraceBlockResponse{} } -func (m *QueryTraceBlockResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTraceBlockResponse) ProtoMessage() {} -func (*QueryTraceBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{21} -} -func (m *QueryTraceBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTraceBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTraceBlockResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTraceBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTraceBlockResponse.Merge(m, src) -} -func (m *QueryTraceBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTraceBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTraceBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTraceBlockResponse proto.InternalMessageInfo - -func (m *QueryTraceBlockResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -// QueryBaseFeeRequest defines the request type for querying the EIP1559 base -// fee. -type QueryBaseFeeRequest struct { -} - -func (m *QueryBaseFeeRequest) Reset() { *m = QueryBaseFeeRequest{} } -func (m *QueryBaseFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBaseFeeRequest) ProtoMessage() {} -func (*QueryBaseFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{22} -} -func (m *QueryBaseFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBaseFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBaseFeeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBaseFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBaseFeeRequest.Merge(m, src) -} -func (m *QueryBaseFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBaseFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBaseFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo - -// QueryBaseFeeResponse returns the EIP1559 base fee. -type QueryBaseFeeResponse struct { - // base_fee is the EIP1559 base fee - BaseFee *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee,omitempty"` -} - -func (m *QueryBaseFeeResponse) Reset() { *m = QueryBaseFeeResponse{} } -func (m *QueryBaseFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBaseFeeResponse) ProtoMessage() {} -func (*QueryBaseFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{23} -} -func (m *QueryBaseFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBaseFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBaseFeeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBaseFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBaseFeeResponse.Merge(m, src) -} -func (m *QueryBaseFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBaseFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBaseFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBaseFeeResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*QueryAccountRequest)(nil), "ethermint.evm.v1.QueryAccountRequest") - proto.RegisterType((*QueryAccountResponse)(nil), "ethermint.evm.v1.QueryAccountResponse") - proto.RegisterType((*QueryCosmosAccountRequest)(nil), "ethermint.evm.v1.QueryCosmosAccountRequest") - proto.RegisterType((*QueryCosmosAccountResponse)(nil), "ethermint.evm.v1.QueryCosmosAccountResponse") - proto.RegisterType((*QueryValidatorAccountRequest)(nil), "ethermint.evm.v1.QueryValidatorAccountRequest") - proto.RegisterType((*QueryValidatorAccountResponse)(nil), "ethermint.evm.v1.QueryValidatorAccountResponse") - proto.RegisterType((*QueryBalanceRequest)(nil), "ethermint.evm.v1.QueryBalanceRequest") - proto.RegisterType((*QueryBalanceResponse)(nil), "ethermint.evm.v1.QueryBalanceResponse") - proto.RegisterType((*QueryStorageRequest)(nil), "ethermint.evm.v1.QueryStorageRequest") - proto.RegisterType((*QueryStorageResponse)(nil), "ethermint.evm.v1.QueryStorageResponse") - proto.RegisterType((*QueryCodeRequest)(nil), "ethermint.evm.v1.QueryCodeRequest") - proto.RegisterType((*QueryCodeResponse)(nil), "ethermint.evm.v1.QueryCodeResponse") - proto.RegisterType((*QueryTxLogsRequest)(nil), "ethermint.evm.v1.QueryTxLogsRequest") - proto.RegisterType((*QueryTxLogsResponse)(nil), "ethermint.evm.v1.QueryTxLogsResponse") - proto.RegisterType((*QueryParamsRequest)(nil), "ethermint.evm.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "ethermint.evm.v1.QueryParamsResponse") - proto.RegisterType((*EthCallRequest)(nil), "ethermint.evm.v1.EthCallRequest") - proto.RegisterType((*EstimateGasResponse)(nil), "ethermint.evm.v1.EstimateGasResponse") - proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest") - proto.RegisterType((*QueryTraceTxResponse)(nil), "ethermint.evm.v1.QueryTraceTxResponse") - proto.RegisterType((*QueryTraceBlockRequest)(nil), "ethermint.evm.v1.QueryTraceBlockRequest") - proto.RegisterType((*QueryTraceBlockResponse)(nil), "ethermint.evm.v1.QueryTraceBlockResponse") - proto.RegisterType((*QueryBaseFeeRequest)(nil), "ethermint.evm.v1.QueryBaseFeeRequest") - proto.RegisterType((*QueryBaseFeeResponse)(nil), "ethermint.evm.v1.QueryBaseFeeResponse") -} - -func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } - -var fileDescriptor_e15a877459347994 = []byte{ - // 1512 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xc6, 0x4e, 0xec, 0x8c, 0x93, 0x36, 0x9d, 0xa6, 0xad, 0xb3, 0x4d, 0xe2, 0x74, 0xbf, - 0xdf, 0xfc, 0x68, 0x69, 0x77, 0x9b, 0x80, 0x2a, 0x01, 0x07, 0x5a, 0x47, 0xe9, 0x0f, 0xda, 0xa2, - 0xb2, 0x44, 0x1c, 0x90, 0x90, 0x35, 0x5e, 0x4f, 0xd7, 0xab, 0x78, 0x77, 0xdc, 0x9d, 0xb1, 0xe5, - 0xb4, 0xea, 0x81, 0x0a, 0x01, 0x15, 0x97, 0x4a, 0xdc, 0x38, 0xf5, 0x88, 0xc4, 0x85, 0x5b, 0x8f, - 0x5c, 0x7b, 0xac, 0xc4, 0x05, 0x71, 0x28, 0xa8, 0x45, 0x82, 0xbf, 0x81, 0x13, 0x9a, 0x1f, 0x6b, - 0xef, 0xda, 0xde, 0x38, 0x45, 0xe5, 0xc6, 0xc5, 0xde, 0x99, 0x79, 0xef, 0x7d, 0x3e, 0xf3, 0xe6, - 0xcd, 0xbc, 0x0f, 0x58, 0xc0, 0xac, 0x8e, 0x43, 0xdf, 0x0b, 0x98, 0x85, 0xdb, 0xbe, 0xd5, 0xde, - 0xb0, 0xee, 0xb4, 0x70, 0xb8, 0x67, 0x36, 0x43, 0xc2, 0x08, 0x9c, 0xed, 0xae, 0x9a, 0xb8, 0xed, - 0x9b, 0xed, 0x0d, 0xfd, 0x08, 0xf2, 0xbd, 0x80, 0x58, 0xe2, 0x57, 0x1a, 0xe9, 0x67, 0x1c, 0x42, - 0x7d, 0x42, 0xad, 0x2a, 0xa2, 0x58, 0x7a, 0x5b, 0xed, 0x8d, 0x2a, 0x66, 0x68, 0xc3, 0x6a, 0x22, - 0xd7, 0x0b, 0x10, 0xf3, 0x48, 0xa0, 0x6c, 0xf5, 0x01, 0x38, 0x1e, 0x57, 0xae, 0xcd, 0x0f, 0xac, - 0xb1, 0x8e, 0x5a, 0x9a, 0x73, 0x89, 0x4b, 0xc4, 0xa7, 0xc5, 0xbf, 0xd4, 0xec, 0x82, 0x4b, 0x88, - 0xdb, 0xc0, 0x16, 0x6a, 0x7a, 0x16, 0x0a, 0x02, 0xc2, 0x04, 0x12, 0x55, 0xab, 0x25, 0xb5, 0x2a, - 0x46, 0xd5, 0xd6, 0x6d, 0x8b, 0x79, 0x3e, 0xa6, 0x0c, 0xf9, 0x4d, 0x69, 0x60, 0xbc, 0x0d, 0x8e, - 0x7e, 0xc8, 0xd9, 0x5e, 0x72, 0x1c, 0xd2, 0x0a, 0x98, 0x8d, 0xef, 0xb4, 0x30, 0x65, 0xb0, 0x08, - 0x72, 0xa8, 0x56, 0x0b, 0x31, 0xa5, 0x45, 0x6d, 0x59, 0x5b, 0x9f, 0xb2, 0xa3, 0xe1, 0x3b, 0xf9, - 0xaf, 0x1e, 0x97, 0xc6, 0xfe, 0x7c, 0x5c, 0x1a, 0x33, 0x1c, 0x30, 0x97, 0x74, 0xa5, 0x4d, 0x12, - 0x50, 0xcc, 0x7d, 0xab, 0xa8, 0x81, 0x02, 0x07, 0x47, 0xbe, 0x6a, 0x08, 0x4f, 0x82, 0x29, 0x87, - 0xd4, 0x70, 0xa5, 0x8e, 0x68, 0xbd, 0x38, 0x2e, 0xd6, 0xf2, 0x7c, 0xe2, 0x2a, 0xa2, 0x75, 0x38, - 0x07, 0x26, 0x02, 0xc2, 0x9d, 0x32, 0xcb, 0xda, 0x7a, 0xd6, 0x96, 0x03, 0xe3, 0x3d, 0x30, 0x2f, - 0x40, 0xb6, 0x44, 0x7a, 0xff, 0x01, 0xcb, 0x2f, 0x34, 0xa0, 0x0f, 0x8b, 0xa0, 0xc8, 0xae, 0x80, - 0x43, 0xf2, 0xe4, 0x2a, 0xc9, 0x48, 0x33, 0x72, 0xf6, 0x92, 0x9c, 0x84, 0x3a, 0xc8, 0x53, 0x0e, - 0xca, 0xf9, 0x8d, 0x0b, 0x7e, 0xdd, 0x31, 0x0f, 0x81, 0x64, 0xd4, 0x4a, 0xd0, 0xf2, 0xab, 0x38, - 0x54, 0x3b, 0x98, 0x51, 0xb3, 0x1f, 0x88, 0x49, 0xe3, 0x3a, 0x58, 0x10, 0x3c, 0x3e, 0x46, 0x0d, - 0xaf, 0x86, 0x18, 0x09, 0xfb, 0x36, 0x73, 0x0a, 0x4c, 0x3b, 0x24, 0xe8, 0xe7, 0x51, 0xe0, 0x73, - 0x97, 0x06, 0x76, 0xf5, 0xb5, 0x06, 0x16, 0x53, 0xa2, 0xa9, 0x8d, 0xad, 0x81, 0xc3, 0x11, 0xab, - 0x64, 0xc4, 0x88, 0xec, 0x6b, 0xdc, 0x5a, 0x54, 0x44, 0x65, 0x79, 0xce, 0xaf, 0x72, 0x3c, 0xe7, - 0x55, 0x11, 0x75, 0x5d, 0x47, 0x15, 0x91, 0x71, 0x5d, 0x81, 0x7d, 0xc4, 0x48, 0x88, 0xdc, 0xd1, - 0x60, 0x70, 0x16, 0x64, 0x76, 0xf1, 0x9e, 0xaa, 0x37, 0xfe, 0x19, 0x83, 0x3f, 0xab, 0xe0, 0xbb, - 0xc1, 0x14, 0xfc, 0x1c, 0x98, 0x68, 0xa3, 0x46, 0x2b, 0x02, 0x97, 0x03, 0xe3, 0x02, 0x98, 0x55, - 0xa5, 0x54, 0x7b, 0xa5, 0x4d, 0xae, 0x81, 0x23, 0x31, 0x3f, 0x05, 0x01, 0x41, 0x96, 0xd7, 0xbe, - 0xf0, 0x9a, 0xb6, 0xc5, 0xb7, 0x71, 0x17, 0x40, 0x61, 0xb8, 0xd3, 0xb9, 0x41, 0x5c, 0x1a, 0x41, - 0x40, 0x90, 0x15, 0x37, 0x46, 0xc6, 0x17, 0xdf, 0xf0, 0x32, 0x00, 0xbd, 0x77, 0x45, 0xec, 0xad, - 0xb0, 0xb9, 0x6a, 0xca, 0xa2, 0x35, 0xf9, 0x23, 0x64, 0xca, 0x27, 0x4c, 0x3d, 0x42, 0xe6, 0xad, - 0x5e, 0xaa, 0xec, 0x98, 0x67, 0x8c, 0xe4, 0x43, 0x4d, 0x25, 0x36, 0x02, 0x57, 0x3c, 0x4f, 0x83, - 0x6c, 0x83, 0xb8, 0x7c, 0x77, 0x99, 0xf5, 0xc2, 0xe6, 0x31, 0xb3, 0xff, 0x35, 0x34, 0x6f, 0x10, - 0xd7, 0x16, 0x26, 0xf0, 0xca, 0x10, 0x52, 0x6b, 0x23, 0x49, 0x49, 0x9c, 0x38, 0x2b, 0x63, 0x4e, - 0xe5, 0xe1, 0x16, 0x0a, 0x91, 0x1f, 0xe5, 0xc1, 0xb0, 0x15, 0xc1, 0x68, 0x56, 0x11, 0x7c, 0x17, - 0x4c, 0x36, 0xc5, 0x8c, 0x48, 0x50, 0x61, 0xb3, 0x38, 0x48, 0x51, 0x7a, 0x94, 0xa7, 0x9e, 0x3e, - 0x2f, 0x8d, 0x7d, 0xf7, 0xc7, 0x0f, 0x67, 0x34, 0x5b, 0xb9, 0x18, 0x4f, 0x34, 0x70, 0x68, 0x9b, - 0xd5, 0xb7, 0x50, 0xa3, 0x11, 0x4b, 0x37, 0x0a, 0x5d, 0x1a, 0x1d, 0x0c, 0xff, 0x86, 0x27, 0x40, - 0xce, 0x45, 0xb4, 0xe2, 0xa0, 0xa6, 0xba, 0x23, 0x93, 0x2e, 0xa2, 0x5b, 0xa8, 0x09, 0x3f, 0x05, - 0xb3, 0xcd, 0x90, 0x34, 0x09, 0xc5, 0x61, 0xf7, 0x9e, 0xf1, 0x3b, 0x32, 0x5d, 0xde, 0xfc, 0xeb, - 0x79, 0xc9, 0x74, 0x3d, 0x56, 0x6f, 0x55, 0x4d, 0x87, 0xf8, 0x96, 0x6a, 0x10, 0xf2, 0xef, 0x1c, - 0xad, 0xed, 0x5a, 0x6c, 0xaf, 0x89, 0xa9, 0xb9, 0xd5, 0xbb, 0xe0, 0xf6, 0xe1, 0x28, 0x56, 0x74, - 0x39, 0xe7, 0x41, 0xde, 0xa9, 0x23, 0x2f, 0xa8, 0x78, 0xb5, 0x62, 0x76, 0x59, 0x5b, 0xcf, 0xd8, - 0x39, 0x31, 0xbe, 0x56, 0x33, 0x76, 0xc0, 0xd1, 0x6d, 0xca, 0x3c, 0x1f, 0x31, 0x7c, 0x05, 0xf5, - 0xb2, 0x31, 0x0b, 0x32, 0x2e, 0x92, 0xe4, 0xb3, 0x36, 0xff, 0xe4, 0x33, 0x21, 0x66, 0x82, 0xf7, - 0xb4, 0xcd, 0x3f, 0x79, 0xd4, 0xb6, 0x5f, 0xc1, 0x61, 0x48, 0xe4, 0x85, 0x9e, 0xb2, 0x73, 0x6d, - 0x7f, 0x9b, 0x0f, 0x8d, 0x87, 0xd9, 0xa8, 0x0a, 0x42, 0xe4, 0xe0, 0x9d, 0x4e, 0x94, 0x94, 0x0d, - 0x90, 0xf1, 0xa9, 0xab, 0x32, 0x5c, 0x1a, 0xcc, 0xf0, 0x4d, 0xea, 0x6e, 0xf3, 0x39, 0xdc, 0xf2, - 0x77, 0x3a, 0x36, 0xb7, 0x85, 0x17, 0xc1, 0x34, 0xe3, 0x41, 0x2a, 0x0e, 0x09, 0x6e, 0x7b, 0xae, - 0x40, 0x2a, 0x6c, 0x2e, 0x0e, 0xfa, 0x0a, 0xa8, 0x2d, 0x61, 0x64, 0x17, 0x58, 0x6f, 0x00, 0xb7, - 0xc0, 0x74, 0x33, 0xc4, 0x35, 0xec, 0x60, 0x4a, 0x49, 0x48, 0x8b, 0x59, 0x51, 0x82, 0x23, 0xd1, - 0x13, 0x4e, 0xfc, 0x5d, 0xad, 0x36, 0x88, 0xb3, 0x1b, 0xbd, 0x60, 0x13, 0x22, 0x8d, 0x05, 0x31, - 0x27, 0xdf, 0x2f, 0xb8, 0x08, 0x80, 0x34, 0x11, 0xd7, 0x6c, 0x52, 0x64, 0x64, 0x4a, 0xcc, 0x88, - 0xce, 0x74, 0x35, 0x5a, 0xe6, 0xcd, 0xb3, 0x98, 0x13, 0xdb, 0xd0, 0x4d, 0xd9, 0x59, 0xcd, 0xa8, - 0xb3, 0x9a, 0x3b, 0x51, 0x67, 0x2d, 0xcf, 0xf0, 0x32, 0x7b, 0xf4, 0x6b, 0x49, 0x93, 0xa5, 0x26, - 0x23, 0xf1, 0xe5, 0xa1, 0xd5, 0x92, 0xff, 0x77, 0xaa, 0x65, 0x2a, 0x51, 0x2d, 0xd0, 0x00, 0x33, - 0x72, 0x0f, 0x3e, 0xea, 0x54, 0x78, 0x81, 0x80, 0x58, 0x1a, 0x6e, 0xa2, 0xce, 0x15, 0x44, 0xdf, - 0xcf, 0xe6, 0xc7, 0x67, 0x33, 0x76, 0x9e, 0x75, 0x2a, 0x5e, 0x50, 0xc3, 0x1d, 0xe3, 0x8c, 0x7a, - 0x1c, 0xbb, 0xa5, 0xd0, 0x7b, 0xb9, 0x6a, 0x88, 0xa1, 0xe8, 0x82, 0xf0, 0x6f, 0xe3, 0x49, 0x06, - 0x1c, 0xef, 0x19, 0x97, 0x79, 0xd4, 0x58, 0xe9, 0xb0, 0x4e, 0xf4, 0x7e, 0x8c, 0x2e, 0x1d, 0xd6, - 0xa1, 0xaf, 0xa1, 0x74, 0xfe, 0x3b, 0xf5, 0x03, 0x9e, 0xba, 0x71, 0x0e, 0x9c, 0x18, 0x38, 0xb8, - 0x7d, 0x0e, 0xfa, 0x58, 0xb7, 0xd7, 0x53, 0x7c, 0x19, 0x47, 0x3d, 0xc5, 0xb8, 0xd1, 0xed, 0xe3, - 0x6a, 0x5a, 0x85, 0x78, 0x0b, 0xe4, 0xf9, 0xc3, 0x5f, 0xb9, 0x8d, 0x55, 0x2f, 0x2d, 0xcf, 0xff, - 0xf2, 0xbc, 0x74, 0x4c, 0xee, 0x90, 0xd6, 0x76, 0x4d, 0x8f, 0x58, 0x3e, 0x62, 0x75, 0xf3, 0x5a, - 0xc0, 0x78, 0x8f, 0x17, 0xde, 0x9b, 0x3f, 0x4e, 0x83, 0x09, 0x11, 0x0e, 0x7e, 0xa6, 0x81, 0x9c, - 0x92, 0x36, 0x70, 0x65, 0xf0, 0xfc, 0x87, 0x68, 0x57, 0x7d, 0x75, 0x94, 0x99, 0xa4, 0x66, 0xac, - 0x3d, 0xf8, 0xe9, 0xf7, 0x6f, 0xc6, 0x4f, 0xc1, 0x12, 0x57, 0xda, 0x84, 0x46, 0x7a, 0x5b, 0x49, - 0x1b, 0xeb, 0x9e, 0x3a, 0xaa, 0xfb, 0xf0, 0x5b, 0x0d, 0xcc, 0x24, 0xd4, 0x23, 0x7c, 0x23, 0x05, - 0x62, 0x98, 0x4a, 0xd5, 0xcf, 0x1e, 0xcc, 0x58, 0xb1, 0x32, 0x05, 0xab, 0x75, 0xb8, 0x9a, 0x64, - 0x15, 0x89, 0xd4, 0x01, 0x72, 0xdf, 0x6b, 0x60, 0xb6, 0x5f, 0x04, 0x42, 0x33, 0x05, 0x32, 0x45, - 0x7b, 0xea, 0xd6, 0x81, 0xed, 0x15, 0xcb, 0x0b, 0x82, 0xe5, 0x79, 0x68, 0x26, 0x59, 0xb6, 0x23, - 0xfb, 0x1e, 0xd1, 0xb8, 0xa6, 0xbd, 0x0f, 0x1f, 0x68, 0x20, 0xa7, 0xa4, 0x5e, 0xea, 0x71, 0x26, - 0x55, 0x64, 0xea, 0x71, 0xf6, 0x29, 0x46, 0x63, 0x5d, 0x50, 0x32, 0xe0, 0x72, 0x92, 0x92, 0x92, - 0x8d, 0x34, 0x96, 0xb2, 0x2f, 0x35, 0x90, 0x53, 0x82, 0x2f, 0x95, 0x44, 0x52, 0x5d, 0xa6, 0x92, - 0xe8, 0xd3, 0x8d, 0xc6, 0x39, 0x41, 0x62, 0x0d, 0xae, 0x24, 0x49, 0x50, 0x69, 0xd6, 0xe3, 0x60, - 0xdd, 0xdb, 0xc5, 0x7b, 0xf7, 0x61, 0x1b, 0x64, 0xb9, 0x26, 0x84, 0x46, 0x6a, 0x89, 0x74, 0x85, - 0xa6, 0xfe, 0xbf, 0x7d, 0x6d, 0x14, 0xfe, 0x8a, 0xc0, 0x2f, 0xc1, 0xc5, 0xfe, 0xea, 0xa9, 0x25, - 0x32, 0x40, 0xc1, 0xa4, 0x94, 0x44, 0xf0, 0xff, 0x29, 0x51, 0x13, 0xca, 0x4b, 0x5f, 0x19, 0x61, - 0xa5, 0xd0, 0x17, 0x04, 0xfa, 0x71, 0x38, 0x97, 0x44, 0x97, 0x52, 0x0b, 0x32, 0x90, 0x53, 0x4a, - 0x0b, 0x2e, 0x0f, 0xc6, 0x4b, 0x8a, 0x30, 0x7d, 0x6d, 0x54, 0x9f, 0x88, 0x30, 0x97, 0x04, 0x66, - 0x11, 0x1e, 0x4f, 0x62, 0x62, 0x56, 0xaf, 0x38, 0x1c, 0xea, 0x2e, 0x28, 0xc4, 0x64, 0xd2, 0x01, - 0x90, 0x87, 0xec, 0x75, 0x88, 0xce, 0x32, 0x0c, 0x81, 0xbb, 0x00, 0xf5, 0x3e, 0x5c, 0x65, 0xca, - 0x5f, 0x5b, 0xd8, 0x01, 0x39, 0xd5, 0x3b, 0x53, 0xeb, 0x2c, 0x29, 0xb3, 0x52, 0xeb, 0xac, 0xaf, - 0x05, 0xa7, 0xed, 0x5a, 0x36, 0x4d, 0xd6, 0x81, 0x9f, 0x6b, 0x00, 0xf4, 0x1e, 0x74, 0xb8, 0xbe, - 0x5f, 0xd8, 0x78, 0xb3, 0xd6, 0x4f, 0x1f, 0xc0, 0x52, 0x71, 0x38, 0x25, 0x38, 0x9c, 0x84, 0xf3, - 0xc3, 0x38, 0x88, 0x0e, 0xc3, 0x13, 0xa0, 0x1a, 0xc2, 0x3e, 0xb7, 0x3d, 0xde, 0x47, 0xf6, 0xb9, - 0xed, 0x89, 0xbe, 0x92, 0x96, 0x80, 0xa8, 0xd7, 0x94, 0x2f, 0x3e, 0x7d, 0xb1, 0xa4, 0x3d, 0x7b, - 0xb1, 0xa4, 0xfd, 0xf6, 0x62, 0x49, 0x7b, 0xf4, 0x72, 0x69, 0xec, 0xd9, 0xcb, 0xa5, 0xb1, 0x9f, - 0x5f, 0x2e, 0x8d, 0x7d, 0xb2, 0x1a, 0xeb, 0xb7, 0x5d, 0x5f, 0x42, 0xad, 0xf6, 0xe6, 0x79, 0xab, - 0x23, 0xe2, 0x88, 0x9e, 0x5b, 0x9d, 0x14, 0x3d, 0xfe, 0xcd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x44, 0x79, 0x97, 0x64, 0x1d, 0x12, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Account queries an Ethereum account. - Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) - // CosmosAccount queries an Ethereum account's Cosmos Address. - CosmosAccount(ctx context.Context, in *QueryCosmosAccountRequest, opts ...grpc.CallOption) (*QueryCosmosAccountResponse, error) - // ValidatorAccount queries an Ethereum account's from a validator consensus - // Address. - ValidatorAccount(ctx context.Context, in *QueryValidatorAccountRequest, opts ...grpc.CallOption) (*QueryValidatorAccountResponse, error) - // Balance queries the balance of a the EVM denomination for a single - // EthAccount. - Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) - // Storage queries the balance of all coins for a single account. - Storage(ctx context.Context, in *QueryStorageRequest, opts ...grpc.CallOption) (*QueryStorageResponse, error) - // Code queries the balance of all coins for a single account. - Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) - // Params queries the parameters of x/evm module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // EthCall implements the `eth_call` rpc api - EthCall(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) - // EstimateGas implements the `eth_estimateGas` rpc api - EstimateGas(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) - // TraceTx implements the `debug_traceTransaction` rpc api - TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error) - // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api - TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) - // BaseFee queries the base fee of the parent block of the current block, - // it's similar to feemarket module's method, but also checks london hardfork status. - BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { - out := new(QueryAccountResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Account", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CosmosAccount(ctx context.Context, in *QueryCosmosAccountRequest, opts ...grpc.CallOption) (*QueryCosmosAccountResponse, error) { - out := new(QueryCosmosAccountResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/CosmosAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ValidatorAccount(ctx context.Context, in *QueryValidatorAccountRequest, opts ...grpc.CallOption) (*QueryValidatorAccountResponse, error) { - out := new(QueryValidatorAccountResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/ValidatorAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { - out := new(QueryBalanceResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Balance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Storage(ctx context.Context, in *QueryStorageRequest, opts ...grpc.CallOption) (*QueryStorageResponse, error) { - out := new(QueryStorageResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Storage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) { - out := new(QueryCodeResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Code", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EthCall(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) { - out := new(MsgEthereumTxResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/EthCall", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EstimateGas(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) { - out := new(EstimateGasResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/EstimateGas", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error) { - out := new(QueryTraceTxResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) { - out := new(QueryTraceBlockResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) { - out := new(QueryBaseFeeResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/BaseFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Account queries an Ethereum account. - Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) - // CosmosAccount queries an Ethereum account's Cosmos Address. - CosmosAccount(context.Context, *QueryCosmosAccountRequest) (*QueryCosmosAccountResponse, error) - // ValidatorAccount queries an Ethereum account's from a validator consensus - // Address. - ValidatorAccount(context.Context, *QueryValidatorAccountRequest) (*QueryValidatorAccountResponse, error) - // Balance queries the balance of a the EVM denomination for a single - // EthAccount. - Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) - // Storage queries the balance of all coins for a single account. - Storage(context.Context, *QueryStorageRequest) (*QueryStorageResponse, error) - // Code queries the balance of all coins for a single account. - Code(context.Context, *QueryCodeRequest) (*QueryCodeResponse, error) - // Params queries the parameters of x/evm module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // EthCall implements the `eth_call` rpc api - EthCall(context.Context, *EthCallRequest) (*MsgEthereumTxResponse, error) - // EstimateGas implements the `eth_estimateGas` rpc api - EstimateGas(context.Context, *EthCallRequest) (*EstimateGasResponse, error) - // TraceTx implements the `debug_traceTransaction` rpc api - TraceTx(context.Context, *QueryTraceTxRequest) (*QueryTraceTxResponse, error) - // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api - TraceBlock(context.Context, *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) - // BaseFee queries the base fee of the parent block of the current block, - // it's similar to feemarket module's method, but also checks london hardfork status. - BaseFee(context.Context, *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") -} -func (*UnimplementedQueryServer) CosmosAccount(ctx context.Context, req *QueryCosmosAccountRequest) (*QueryCosmosAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CosmosAccount not implemented") -} -func (*UnimplementedQueryServer) ValidatorAccount(ctx context.Context, req *QueryValidatorAccountRequest) (*QueryValidatorAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorAccount not implemented") -} -func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") -} -func (*UnimplementedQueryServer) Storage(ctx context.Context, req *QueryStorageRequest) (*QueryStorageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Storage not implemented") -} -func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Code not implemented") -} -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) EthCall(ctx context.Context, req *EthCallRequest) (*MsgEthereumTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EthCall not implemented") -} -func (*UnimplementedQueryServer) EstimateGas(ctx context.Context, req *EthCallRequest) (*EstimateGasResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EstimateGas not implemented") -} -func (*UnimplementedQueryServer) TraceTx(ctx context.Context, req *QueryTraceTxRequest) (*QueryTraceTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TraceTx not implemented") -} -func (*UnimplementedQueryServer) TraceBlock(ctx context.Context, req *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TraceBlock not implemented") -} -func (*UnimplementedQueryServer) BaseFee(ctx context.Context, req *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BaseFee not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Account(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/Account", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CosmosAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCosmosAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CosmosAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/CosmosAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CosmosAccount(ctx, req.(*QueryCosmosAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ValidatorAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/ValidatorAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorAccount(ctx, req.(*QueryValidatorAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBalanceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Balance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/Balance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Storage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryStorageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Storage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/Storage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Storage(ctx, req.(*QueryStorageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Code_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Code(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/Code", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Code(ctx, req.(*QueryCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EthCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EthCallRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EthCall(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/EthCall", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EthCall(ctx, req.(*EthCallRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EstimateGas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EthCallRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EstimateGas(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/EstimateGas", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EstimateGas(ctx, req.(*EthCallRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TraceTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTraceTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TraceTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/TraceTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TraceTx(ctx, req.(*QueryTraceTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TraceBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTraceBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TraceBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/TraceBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TraceBlock(ctx, req.(*QueryTraceBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BaseFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBaseFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BaseFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Query/BaseFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BaseFee(ctx, req.(*QueryBaseFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ethermint.evm.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Account", - Handler: _Query_Account_Handler, - }, - { - MethodName: "CosmosAccount", - Handler: _Query_CosmosAccount_Handler, - }, - { - MethodName: "ValidatorAccount", - Handler: _Query_ValidatorAccount_Handler, - }, - { - MethodName: "Balance", - Handler: _Query_Balance_Handler, - }, - { - MethodName: "Storage", - Handler: _Query_Storage_Handler, - }, - { - MethodName: "Code", - Handler: _Query_Code_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "EthCall", - Handler: _Query_EthCall_Handler, - }, - { - MethodName: "EstimateGas", - Handler: _Query_EstimateGas_Handler, - }, - { - MethodName: "TraceTx", - Handler: _Query_TraceTx_Handler, - }, - { - MethodName: "TraceBlock", - Handler: _Query_TraceBlock_Handler, - }, - { - MethodName: "BaseFee", - Handler: _Query_BaseFee_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ethermint/evm/v1/query.proto", -} - -func (m *QueryAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Nonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x18 - } - if len(m.CodeHash) > 0 { - i -= len(m.CodeHash) - copy(dAtA[i:], m.CodeHash) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CodeHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.Balance) > 0 { - i -= len(m.Balance) - copy(dAtA[i:], m.Balance) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCosmosAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCosmosAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCosmosAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCosmosAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCosmosAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCosmosAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AccountNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) - i-- - dAtA[i] = 0x18 - } - if m.Sequence != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x10 - } - if len(m.CosmosAddress) > 0 { - i -= len(m.CosmosAddress) - copy(dAtA[i:], m.CosmosAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CosmosAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryValidatorAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryValidatorAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ConsAddress) > 0 { - i -= len(m.ConsAddress) - copy(dAtA[i:], m.ConsAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ConsAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryValidatorAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryValidatorAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AccountNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) - i-- - dAtA[i] = 0x18 - } - if m.Sequence != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x10 - } - if len(m.AccountAddress) > 0 { - i -= len(m.AccountAddress) - copy(dAtA[i:], m.AccountAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Balance) > 0 { - i -= len(m.Balance) - copy(dAtA[i:], m.Balance) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryStorageRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryStorageRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryStorageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryStorageResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryStorageResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryStorageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCodeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCodeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCodeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Code) > 0 { - i -= len(m.Code) - copy(dAtA[i:], m.Code) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Code))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTxLogsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTxLogsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTxLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTxLogsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTxLogsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTxLogsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Logs) > 0 { - for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EthCallRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EthCallRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ChainId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) - i-- - dAtA[i] = 0x20 - } - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x1a - } - if m.GasCap != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.GasCap)) - i-- - dAtA[i] = 0x10 - } - if len(m.Args) > 0 { - i -= len(m.Args) - copy(dAtA[i:], m.Args) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Args))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EstimateGasResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EstimateGasResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EstimateGasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VmError) > 0 { - i -= len(m.VmError) - copy(dAtA[i:], m.VmError) - i = encodeVarintQuery(dAtA, i, uint64(len(m.VmError))) - i-- - dAtA[i] = 0x1a - } - if len(m.Ret) > 0 { - i -= len(m.Ret) - copy(dAtA[i:], m.Ret) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Ret))) - i-- - dAtA[i] = 0x12 - } - if m.Gas != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Gas)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryTraceTxRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTraceTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockMaxGas != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockMaxGas)) - i-- - dAtA[i] = 0x50 - } - if m.ChainId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) - i-- - dAtA[i] = 0x48 - } - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x42 - } - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintQuery(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x3a - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0x32 - } - if m.BlockNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) - i-- - dAtA[i] = 0x28 - } - if len(m.Predecessors) > 0 { - for iNdEx := len(m.Predecessors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Predecessors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.TraceConfig != nil { - { - size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Msg != nil { - { - size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTraceTxResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTraceTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTraceTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTraceBlockRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTraceBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockMaxGas != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockMaxGas)) - i-- - dAtA[i] = 0x50 - } - if m.ChainId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) - i-- - dAtA[i] = 0x48 - } - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x42 - } - n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) - if err7 != nil { - return 0, err7 - } - i -= n7 - i = encodeVarintQuery(dAtA, i, uint64(n7)) - i-- - dAtA[i] = 0x3a - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0x32 - } - if m.BlockNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) - i-- - dAtA[i] = 0x28 - } - if m.TraceConfig != nil { - { - size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryTraceBlockResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryTraceBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTraceBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBaseFeeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBaseFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBaseFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryBaseFeeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBaseFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBaseFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BaseFee != nil { - { - size := m.BaseFee.Size() - i -= size - if _, err := m.BaseFee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Balance) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.CodeHash) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Nonce != 0 { - n += 1 + sovQuery(uint64(m.Nonce)) - } - return n -} - -func (m *QueryCosmosAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCosmosAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CosmosAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovQuery(uint64(m.Sequence)) - } - if m.AccountNumber != 0 { - n += 1 + sovQuery(uint64(m.AccountNumber)) - } - return n -} - -func (m *QueryValidatorAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ConsAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryValidatorAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AccountAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovQuery(uint64(m.Sequence)) - } - if m.AccountNumber != 0 { - n += 1 + sovQuery(uint64(m.AccountNumber)) - } - return n -} - -func (m *QueryBalanceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBalanceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Balance) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryStorageRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryStorageResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCodeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Code) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTxLogsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTxLogsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Logs) > 0 { - for _, e := range m.Logs { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *EthCallRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Args) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.GasCap != 0 { - n += 1 + sovQuery(uint64(m.GasCap)) - } - l = len(m.ProposerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.ChainId != 0 { - n += 1 + sovQuery(uint64(m.ChainId)) - } - return n -} - -func (m *EstimateGasResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Gas != 0 { - n += 1 + sovQuery(uint64(m.Gas)) - } - l = len(m.Ret) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.VmError) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTraceTxRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Msg != nil { - l = m.Msg.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.TraceConfig != nil { - l = m.TraceConfig.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.Predecessors) > 0 { - for _, e := range m.Predecessors { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.BlockNumber != 0 { - n += 1 + sovQuery(uint64(m.BlockNumber)) - } - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) - n += 1 + l + sovQuery(uint64(l)) - l = len(m.ProposerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.ChainId != 0 { - n += 1 + sovQuery(uint64(m.ChainId)) - } - if m.BlockMaxGas != 0 { - n += 1 + sovQuery(uint64(m.BlockMaxGas)) - } - return n -} - -func (m *QueryTraceTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTraceBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Txs) > 0 { - for _, e := range m.Txs { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.TraceConfig != nil { - l = m.TraceConfig.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.BlockNumber != 0 { - n += 1 + sovQuery(uint64(m.BlockNumber)) - } - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) - n += 1 + l + sovQuery(uint64(l)) - l = len(m.ProposerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.ChainId != 0 { - n += 1 + sovQuery(uint64(m.ChainId)) - } - if m.BlockMaxGas != 0 { - n += 1 + sovQuery(uint64(m.BlockMaxGas)) - } - return n -} - -func (m *QueryTraceBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBaseFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryBaseFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BaseFee != nil { - l = m.BaseFee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCosmosAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCosmosAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCosmosAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCosmosAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCosmosAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCosmosAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CosmosAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - m.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryValidatorAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryValidatorAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - m.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryStorageRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryStorageRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStorageRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryStorageResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryStorageResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStorageResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCodeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Code = append(m.Code[:0], dAtA[iNdEx:postIndex]...) - if m.Code == nil { - m.Code = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTxLogsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTxLogsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTxLogsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTxLogsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTxLogsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTxLogsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Logs = append(m.Logs, &Log{}) - if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EthCallRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EthCallRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EthCallRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args[:0], dAtA[iNdEx:postIndex]...) - if m.Args == nil { - m.Args = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasCap", wireType) - } - m.GasCap = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasCap |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerAddress == nil { - m.ProposerAddress = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - m.ChainId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChainId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EstimateGasResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EstimateGasResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EstimateGasResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Gas", wireType) - } - m.Gas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Gas |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) - if m.Ret == nil { - m.Ret = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VmError", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VmError = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTraceTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTraceTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Msg == nil { - m.Msg = &MsgEthereumTx{} - } - if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TraceConfig == nil { - m.TraceConfig = &TraceConfig{} - } - if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Predecessors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Predecessors = append(m.Predecessors, &MsgEthereumTx{}) - if err := m.Predecessors[len(m.Predecessors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) - } - m.BlockNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockNumber |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerAddress == nil { - m.ProposerAddress = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - m.ChainId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChainId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) - } - m.BlockMaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockMaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTraceTxResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTraceTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTraceTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTraceBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTraceBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, &MsgEthereumTx{}) - if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TraceConfig == nil { - m.TraceConfig = &TraceConfig{} - } - if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) - } - m.BlockNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockNumber |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerAddress == nil { - m.ProposerAddress = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - m.ChainId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChainId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) - } - m.BlockMaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockMaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTraceBlockResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTraceBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTraceBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBaseFeeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBaseFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBaseFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBaseFeeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBaseFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBaseFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.BaseFee = &v - if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/app/upgrades/v9/legacy/evm/types/query.pb.gw.go b/app/upgrades/v9/legacy/evm/types/query.pb.gw.go deleted file mode 100644 index a7ba384..0000000 --- a/app/upgrades/v9/legacy/evm/types/query.pb.gw.go +++ /dev/null @@ -1,1178 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ethermint/evm/v1/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.Account(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.Account(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_CosmosAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCosmosAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.CosmosAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_CosmosAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCosmosAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.CosmosAccount(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_ValidatorAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryValidatorAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["cons_address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") - } - - protoReq.ConsAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) - } - - msg, err := client.ValidatorAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ValidatorAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryValidatorAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["cons_address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") - } - - protoReq.ConsAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) - } - - msg, err := server.ValidatorAccount(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBalanceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.Balance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBalanceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.Balance(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Storage_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryStorageRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := client.Storage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Storage_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryStorageRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := server.Storage(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.Code(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.Code(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_EthCall_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_EthCall_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EthCallRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EthCall_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EthCall(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EthCall_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EthCallRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EthCall_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EthCall(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_EstimateGas_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EthCallRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateGas_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EstimateGas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EthCallRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateGas_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EstimateGas(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_TraceTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTraceTxRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.TraceTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTraceTxRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.TraceTx(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_TraceBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTraceBlockRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceBlock_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.TraceBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTraceBlockRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceBlock_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.TraceBlock(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBaseFeeRequest - var metadata runtime.ServerMetadata - - msg, err := client.BaseFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBaseFeeRequest - var metadata runtime.ServerMetadata - - msg, err := server.BaseFee(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Account_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CosmosAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ValidatorAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Storage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EthCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EstimateGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_TraceBlock_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Account_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Account_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_CosmosAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CosmosAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ValidatorAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ValidatorAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Balance_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Storage_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Storage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Code_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EthCall_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EthCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EstimateGas_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EstimateGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_TraceTx_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_TraceBlock_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BaseFee_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "account", "address"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_CosmosAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "cosmos_account", "address"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ValidatorAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "validator_account", "cons_address"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Storage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"evmos", "evm", "v1", "storage", "address", "key"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "codes", "address"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Account_0 = runtime.ForwardResponseMessage - - forward_Query_CosmosAccount_0 = runtime.ForwardResponseMessage - - forward_Query_ValidatorAccount_0 = runtime.ForwardResponseMessage - - forward_Query_Balance_0 = runtime.ForwardResponseMessage - - forward_Query_Storage_0 = runtime.ForwardResponseMessage - - forward_Query_Code_0 = runtime.ForwardResponseMessage - - forward_Query_Params_0 = runtime.ForwardResponseMessage - - forward_Query_EthCall_0 = runtime.ForwardResponseMessage - - forward_Query_EstimateGas_0 = runtime.ForwardResponseMessage - - forward_Query_TraceTx_0 = runtime.ForwardResponseMessage - - forward_Query_TraceBlock_0 = runtime.ForwardResponseMessage - - forward_Query_BaseFee_0 = runtime.ForwardResponseMessage -) diff --git a/app/upgrades/v9/legacy/evm/types/storage.go b/app/upgrades/v9/legacy/evm/types/storage.go deleted file mode 100644 index 51650ee..0000000 --- a/app/upgrades/v9/legacy/evm/types/storage.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "fmt" - - "github.com/ethereum/go-ethereum/common" -) - -// Storage represents the account Storage map as a slice of single key value -// State pairs. This is to prevent non-determinism at genesis initialization or export. -type Storage []State - -// Validate performs a basic validation of the Storage fields. -func (s Storage) Validate() error { - seenStorage := make(map[string]bool) - for _, state := range s { - if seenStorage[state.Key] { - return nil - } - - if err := state.Validate(); err != nil { - return err - } - - seenStorage[state.Key] = true - } - return nil -} - -// String implements the stringer interface -func (s Storage) String() string { - var str string - for _, state := range s { - str += fmt.Sprintf("%s\n", state.String()) - } - - return str -} - -// Copy returns a copy of storage. -func (s Storage) Copy() Storage { - cpy := make(Storage, len(s)) - copy(cpy, s) - - return cpy -} - -// Validate performs a basic validation of the State fields. -// NOTE: state value can be empty -func (s State) Validate() error { - return nil -} - -// NewState creates a new State instance -func NewState(key, value common.Hash) State { - return State{ - Key: key.String(), - Value: value.String(), - } -} diff --git a/app/upgrades/v9/legacy/evm/types/tx.pb.go b/app/upgrades/v9/legacy/evm/types/tx.pb.go deleted file mode 100644 index 5d9657d..0000000 --- a/app/upgrades/v9/legacy/evm/types/tx.pb.go +++ /dev/null @@ -1,3270 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/evm/v1/tx.proto - -package types - -import ( - context "context" - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - cosmossdk_io_math "cosmossdk.io/math" - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. -type MsgEthereumTx struct { - // data is inner transaction data of the Ethereum transaction - Data *types.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - // size is the encoded storage size of the transaction (DEPRECATED) - Size_ float64 `protobuf:"fixed64,2,opt,name=size,proto3" json:"-"` - // hash of the transaction in hex format - Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty" rlp:"-"` - // from is the ethereum signer address in hex format. This address value is checked - // against the address derived from the signature (V, R, S) using the - // secp256k1 elliptic curve - From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` -} - -func (m *MsgEthereumTx) Reset() { *m = MsgEthereumTx{} } -func (m *MsgEthereumTx) String() string { return proto.CompactTextString(m) } -func (*MsgEthereumTx) ProtoMessage() {} -func (*MsgEthereumTx) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{0} -} -func (m *MsgEthereumTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEthereumTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgEthereumTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEthereumTx.Merge(m, src) -} -func (m *MsgEthereumTx) XXX_Size() int { - return m.Size() -} -func (m *MsgEthereumTx) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEthereumTx.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEthereumTx proto.InternalMessageInfo - -// LegacyTx is the transaction data of regular Ethereum transactions. -// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the -// AllowUnprotectedTxs parameter is disabled. -type LegacyTx struct { - // nonce corresponds to the account nonce (transaction sequence). - Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` - // gas_price defines the value for each gas unit - GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` - // gas defines the gas limit defined for the transaction. - GasLimit uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"` - // to is the hex formatted address of the recipient - To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` - // value defines the unsigned integer value of the transaction amount. - Amount *cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` - // data is the data payload bytes of the transaction. - Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` - // v defines the signature value - V []byte `protobuf:"bytes,7,opt,name=v,proto3" json:"v,omitempty"` - // r defines the signature value - R []byte `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"` - // s define the signature value - S []byte `protobuf:"bytes,9,opt,name=s,proto3" json:"s,omitempty"` -} - -func (m *LegacyTx) Reset() { *m = LegacyTx{} } -func (m *LegacyTx) String() string { return proto.CompactTextString(m) } -func (*LegacyTx) ProtoMessage() {} -func (*LegacyTx) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{1} -} -func (m *LegacyTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LegacyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LegacyTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LegacyTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_LegacyTx.Merge(m, src) -} -func (m *LegacyTx) XXX_Size() int { - return m.Size() -} -func (m *LegacyTx) XXX_DiscardUnknown() { - xxx_messageInfo_LegacyTx.DiscardUnknown(m) -} - -var xxx_messageInfo_LegacyTx proto.InternalMessageInfo - -// AccessListTx is the data of EIP-2930 access list transactions. -type AccessListTx struct { - // chain_id of the destination EVM chain - ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` - // nonce corresponds to the account nonce (transaction sequence). - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - // gas_price defines the value for each gas unit - GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` - // gas defines the gas limit defined for the transaction. - GasLimit uint64 `protobuf:"varint,4,opt,name=gas,proto3" json:"gas,omitempty"` - // to is the recipient address in hex format - To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` - // value defines the unsigned integer value of the transaction amount. - Amount *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` - // data is the data payload bytes of the transaction. - Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` - // accesses is an array of access tuples - Accesses AccessList `protobuf:"bytes,8,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"` - // v defines the signature value - V []byte `protobuf:"bytes,9,opt,name=v,proto3" json:"v,omitempty"` - // r defines the signature value - R []byte `protobuf:"bytes,10,opt,name=r,proto3" json:"r,omitempty"` - // s define the signature value - S []byte `protobuf:"bytes,11,opt,name=s,proto3" json:"s,omitempty"` -} - -func (m *AccessListTx) Reset() { *m = AccessListTx{} } -func (m *AccessListTx) String() string { return proto.CompactTextString(m) } -func (*AccessListTx) ProtoMessage() {} -func (*AccessListTx) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{2} -} -func (m *AccessListTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccessListTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccessListTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AccessListTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccessListTx.Merge(m, src) -} -func (m *AccessListTx) XXX_Size() int { - return m.Size() -} -func (m *AccessListTx) XXX_DiscardUnknown() { - xxx_messageInfo_AccessListTx.DiscardUnknown(m) -} - -var xxx_messageInfo_AccessListTx proto.InternalMessageInfo - -// DynamicFeeTx is the data of EIP-1559 dynamic fee transactions. -type DynamicFeeTx struct { - // chain_id of the destination EVM chain - ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` - // nonce corresponds to the account nonce (transaction sequence). - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - // gas_tip_cap defines the max value for the gas tip - GasTipCap *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_tip_cap,json=gasTipCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_tip_cap,omitempty"` - // gas_fee_cap defines the max value for the gas fee - GasFeeCap *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=gas_fee_cap,json=gasFeeCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_fee_cap,omitempty"` - // gas defines the gas limit defined for the transaction. - GasLimit uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"` - // to is the hex formatted address of the recipient - To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` - // value defines the transaction amount. - Amount *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` - // data is the data payload bytes of the transaction. - Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` - // accesses is an array of access tuples - Accesses AccessList `protobuf:"bytes,9,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"` - // v defines the signature value - V []byte `protobuf:"bytes,10,opt,name=v,proto3" json:"v,omitempty"` - // r defines the signature value - R []byte `protobuf:"bytes,11,opt,name=r,proto3" json:"r,omitempty"` - // s define the signature value - S []byte `protobuf:"bytes,12,opt,name=s,proto3" json:"s,omitempty"` -} - -func (m *DynamicFeeTx) Reset() { *m = DynamicFeeTx{} } -func (m *DynamicFeeTx) String() string { return proto.CompactTextString(m) } -func (*DynamicFeeTx) ProtoMessage() {} -func (*DynamicFeeTx) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{3} -} -func (m *DynamicFeeTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DynamicFeeTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DynamicFeeTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_DynamicFeeTx.Merge(m, src) -} -func (m *DynamicFeeTx) XXX_Size() int { - return m.Size() -} -func (m *DynamicFeeTx) XXX_DiscardUnknown() { - xxx_messageInfo_DynamicFeeTx.DiscardUnknown(m) -} - -var xxx_messageInfo_DynamicFeeTx proto.InternalMessageInfo - -// ExtensionOptionsEthereumTx is an extension option for ethereum transactions -type ExtensionOptionsEthereumTx struct { -} - -func (m *ExtensionOptionsEthereumTx) Reset() { *m = ExtensionOptionsEthereumTx{} } -func (m *ExtensionOptionsEthereumTx) String() string { return proto.CompactTextString(m) } -func (*ExtensionOptionsEthereumTx) ProtoMessage() {} -func (*ExtensionOptionsEthereumTx) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{4} -} -func (m *ExtensionOptionsEthereumTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtensionOptionsEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtensionOptionsEthereumTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExtensionOptionsEthereumTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionOptionsEthereumTx.Merge(m, src) -} -func (m *ExtensionOptionsEthereumTx) XXX_Size() int { - return m.Size() -} -func (m *ExtensionOptionsEthereumTx) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionOptionsEthereumTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtensionOptionsEthereumTx proto.InternalMessageInfo - -// MsgEthereumTxResponse defines the Msg/EthereumTx response type. -type MsgEthereumTxResponse struct { - // hash of the ethereum transaction in hex format. This hash differs from the - // Tendermint sha256 hash of the transaction bytes. See - // https://github.com/tendermint/tendermint/issues/6539 for reference - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // logs contains the transaction hash and the proto-compatible ethereum - // logs. - Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` - // ret is the returned data from evm function (result or data supplied with revert - // opcode) - Ret []byte `protobuf:"bytes,3,opt,name=ret,proto3" json:"ret,omitempty"` - // vm_error is the error returned by vm execution - VmError string `protobuf:"bytes,4,opt,name=vm_error,json=vmError,proto3" json:"vm_error,omitempty"` - // gas_used specifies how much gas was consumed by the transaction - GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` -} - -func (m *MsgEthereumTxResponse) Reset() { *m = MsgEthereumTxResponse{} } -func (m *MsgEthereumTxResponse) String() string { return proto.CompactTextString(m) } -func (*MsgEthereumTxResponse) ProtoMessage() {} -func (*MsgEthereumTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{5} -} -func (m *MsgEthereumTxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEthereumTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEthereumTxResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgEthereumTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEthereumTxResponse.Merge(m, src) -} -func (m *MsgEthereumTxResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgEthereumTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEthereumTxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEthereumTxResponse proto.InternalMessageInfo - -// MsgUpdateParams defines a Msg for updating the x/evm module parameters. -type MsgUpdateParams struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the x/evm parameters to update. - // NOTE: All parameters must be supplied. - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } -func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParams) ProtoMessage() {} -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{6} -} -func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParams.Merge(m, src) -} -func (m *MsgUpdateParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo - -func (m *MsgUpdateParams) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateParams) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { -} - -func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } -func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{7} -} -func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) -} -func (m *MsgUpdateParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgEthereumTx)(nil), "ethermint.evm.v1.MsgEthereumTx") - proto.RegisterType((*LegacyTx)(nil), "ethermint.evm.v1.LegacyTx") - proto.RegisterType((*AccessListTx)(nil), "ethermint.evm.v1.AccessListTx") - proto.RegisterType((*DynamicFeeTx)(nil), "ethermint.evm.v1.DynamicFeeTx") - proto.RegisterType((*ExtensionOptionsEthereumTx)(nil), "ethermint.evm.v1.ExtensionOptionsEthereumTx") - proto.RegisterType((*MsgEthereumTxResponse)(nil), "ethermint.evm.v1.MsgEthereumTxResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "ethermint.evm.v1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "ethermint.evm.v1.MsgUpdateParamsResponse") -} - -func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } - -var fileDescriptor_f75ac0a12d075f21 = []byte{ - // 1038 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4f, 0x6f, 0xe3, 0xc4, - 0x1b, 0xc7, 0xeb, 0xc4, 0xf9, 0x37, 0xc9, 0xef, 0x47, 0xb1, 0x5a, 0xea, 0x64, 0x21, 0xce, 0x1a, - 0x16, 0xd2, 0x4a, 0xb5, 0xd9, 0x22, 0x21, 0x6d, 0xb8, 0xd0, 0x6c, 0xbb, 0x68, 0x51, 0x2b, 0x56, - 0x26, 0x7b, 0x41, 0x48, 0x61, 0xea, 0x4c, 0x9d, 0x11, 0xb1, 0xc7, 0xf2, 0x4c, 0xac, 0x84, 0x13, - 0xda, 0x13, 0xe2, 0x84, 0xc4, 0x95, 0x03, 0x07, 0x0e, 0x2b, 0x4e, 0x3d, 0x2c, 0xbc, 0x86, 0x15, - 0xa7, 0x15, 0x5c, 0x10, 0x87, 0x80, 0x52, 0x50, 0xa5, 0x1e, 0x79, 0x05, 0x68, 0x66, 0x9c, 0x26, - 0x69, 0x68, 0xbb, 0xac, 0x04, 0x97, 0x6a, 0x9e, 0x79, 0xfe, 0xcc, 0x93, 0xcf, 0xf3, 0xed, 0x8c, - 0x41, 0x19, 0xb1, 0x2e, 0x8a, 0x7c, 0x1c, 0x30, 0x1b, 0xc5, 0xbe, 0x1d, 0xdf, 0xb4, 0xd9, 0xc0, - 0x0a, 0x23, 0xc2, 0x88, 0xb6, 0x7c, 0xe6, 0xb2, 0x50, 0xec, 0x5b, 0xf1, 0xcd, 0xca, 0xf3, 0xd0, - 0xc7, 0x01, 0xb1, 0xc5, 0x5f, 0x19, 0x54, 0x59, 0x73, 0x09, 0xf5, 0x09, 0xb5, 0x7d, 0xea, 0xf1, - 0x64, 0x9f, 0x7a, 0x89, 0xa3, 0x2c, 0x1d, 0x6d, 0x61, 0xd9, 0xd2, 0x48, 0x5c, 0x95, 0x85, 0x33, - 0x79, 0x7d, 0xe9, 0x5b, 0xf1, 0x88, 0x47, 0x64, 0x0e, 0x5f, 0x25, 0xbb, 0x2f, 0x7a, 0x84, 0x78, - 0x3d, 0x64, 0xc3, 0x10, 0xdb, 0x30, 0x08, 0x08, 0x83, 0x0c, 0x93, 0x60, 0x52, 0xaf, 0x9c, 0x78, - 0x85, 0x75, 0xd0, 0x3f, 0xb4, 0x61, 0x30, 0x94, 0x2e, 0xf3, 0x3b, 0x05, 0xfc, 0x6f, 0x9f, 0x7a, - 0xbb, 0xfc, 0x40, 0xd4, 0xf7, 0x5b, 0x03, 0xad, 0x0e, 0xd4, 0x0e, 0x64, 0x50, 0x57, 0x6a, 0x4a, - 0xbd, 0xb8, 0xb5, 0x62, 0xc9, 0x5c, 0x6b, 0x92, 0x6b, 0x6d, 0x07, 0x43, 0x47, 0x44, 0x68, 0x55, - 0xa0, 0x52, 0xfc, 0x09, 0xd2, 0x53, 0x35, 0xa5, 0xae, 0x34, 0xc1, 0xe9, 0xc8, 0x50, 0x36, 0x1f, - 0x9e, 0x1c, 0x6d, 0x28, 0x8e, 0xd8, 0xd7, 0x5e, 0x01, 0x6a, 0x17, 0xd2, 0xae, 0x9e, 0xae, 0x29, - 0xf5, 0x42, 0x73, 0xf9, 0xcf, 0x91, 0x91, 0x8b, 0x7a, 0x61, 0xc3, 0xdc, 0x34, 0x93, 0x28, 0xee, - 0xd5, 0x34, 0xa0, 0x1e, 0x46, 0xc4, 0xd7, 0x55, 0x1e, 0xe5, 0x88, 0x75, 0xa3, 0xf6, 0xd9, 0xd7, - 0xc6, 0xd2, 0xe7, 0x27, 0x47, 0x1b, 0x6b, 0x53, 0x12, 0x73, 0x5d, 0x9a, 0x0f, 0x53, 0x20, 0xbf, - 0x87, 0x3c, 0xe8, 0x0e, 0x5b, 0x03, 0x6d, 0x05, 0x64, 0x02, 0x12, 0xb8, 0x48, 0xf4, 0xac, 0x3a, - 0xd2, 0xd0, 0xde, 0x04, 0x05, 0x0f, 0x72, 0xbe, 0xd8, 0x95, 0x3d, 0x16, 0x9a, 0xe5, 0x5f, 0x46, - 0xc6, 0xaa, 0x44, 0x4d, 0x3b, 0x1f, 0x5b, 0x98, 0xd8, 0x3e, 0x64, 0x5d, 0xeb, 0x6e, 0xc0, 0x9c, - 0xbc, 0x07, 0xe9, 0x3d, 0x1e, 0xaa, 0x55, 0x41, 0xda, 0x83, 0x54, 0x74, 0xad, 0x36, 0x4b, 0xe3, - 0x91, 0x91, 0x7f, 0x07, 0xd2, 0x3d, 0xec, 0x63, 0xe6, 0x70, 0x87, 0xf6, 0x7f, 0x90, 0x62, 0x24, - 0x69, 0x37, 0xc5, 0x88, 0x76, 0x0b, 0x64, 0x62, 0xd8, 0xeb, 0x23, 0x3d, 0x23, 0xce, 0x78, 0xf9, - 0xc2, 0x33, 0xc6, 0x23, 0x23, 0xbb, 0xed, 0x93, 0x7e, 0xc0, 0x1c, 0x99, 0xc1, 0x7f, 0xbb, 0x60, - 0x9d, 0xad, 0x29, 0xf5, 0x52, 0x42, 0xb5, 0x04, 0x94, 0x58, 0xcf, 0x89, 0x0d, 0x25, 0xe6, 0x56, - 0xa4, 0xe7, 0xa5, 0x15, 0x71, 0x8b, 0xea, 0x05, 0x69, 0xd1, 0xc6, 0x0d, 0x4e, 0xe9, 0x87, 0x47, - 0x9b, 0xd9, 0xd6, 0x60, 0x07, 0x32, 0xc8, 0x79, 0x69, 0x53, 0x5e, 0x13, 0x3a, 0xe6, 0x28, 0x0d, - 0x4a, 0xdb, 0xae, 0x8b, 0x28, 0xdd, 0xc3, 0x94, 0xb5, 0x06, 0xda, 0xbb, 0x20, 0xef, 0x76, 0x21, - 0x0e, 0xda, 0xb8, 0x23, 0x88, 0x15, 0x9a, 0xf6, 0x65, 0x3d, 0xe7, 0x6e, 0xf3, 0xe0, 0xbb, 0x3b, - 0xa7, 0x23, 0x23, 0xe7, 0xca, 0xa5, 0x93, 0x2c, 0x3a, 0x53, 0xf4, 0xa9, 0x0b, 0xd1, 0xa7, 0xff, - 0x31, 0x7a, 0xf5, 0x72, 0xf4, 0x99, 0x45, 0xf4, 0xd9, 0x67, 0x46, 0x9f, 0x9b, 0x41, 0xff, 0x11, - 0xc8, 0x43, 0x01, 0x0a, 0x51, 0x3d, 0x5f, 0x4b, 0xd7, 0x8b, 0x5b, 0x2f, 0x59, 0xe7, 0xff, 0xc7, - 0x2d, 0x89, 0xb2, 0xd5, 0x0f, 0x7b, 0xa8, 0x79, 0xe3, 0xf1, 0xc8, 0x58, 0x3a, 0x1d, 0x19, 0x00, - 0x9e, 0xf1, 0xfd, 0xf6, 0x57, 0x03, 0x4c, 0x69, 0x4b, 0xa1, 0x9f, 0x55, 0x95, 0xc3, 0x2d, 0xcc, - 0x0d, 0x17, 0xcc, 0x0d, 0xb7, 0x38, 0x19, 0xee, 0xfa, 0xe2, 0x70, 0x5f, 0x98, 0x0e, 0x77, 0x76, - 0x9e, 0xe6, 0x57, 0x2a, 0x28, 0xed, 0x0c, 0x03, 0xe8, 0x63, 0xf7, 0x0e, 0x42, 0xff, 0xc9, 0x80, - 0x6f, 0x81, 0x22, 0x1f, 0x30, 0xc3, 0x61, 0xdb, 0x85, 0xe1, 0xd5, 0x23, 0xe6, 0x72, 0x68, 0xe1, - 0xf0, 0x36, 0x0c, 0x27, 0xa9, 0x87, 0x08, 0x89, 0x54, 0xf5, 0x69, 0x52, 0xef, 0x20, 0xc4, 0x53, - 0x13, 0x79, 0x64, 0x2e, 0x97, 0x47, 0x76, 0x51, 0x1e, 0xb9, 0x67, 0x96, 0x47, 0xfe, 0x02, 0x79, - 0x14, 0xfe, 0x3d, 0x79, 0x80, 0x39, 0x79, 0x14, 0xe7, 0xe4, 0x51, 0x7a, 0x3a, 0x79, 0xcc, 0xaa, - 0xc1, 0x34, 0x41, 0x65, 0x77, 0xc0, 0x50, 0x40, 0x31, 0x09, 0xde, 0x0b, 0xc5, 0xbb, 0x30, 0xbd, - 0x48, 0x1b, 0x2a, 0x2f, 0x64, 0x7e, 0xa3, 0x80, 0xd5, 0xb9, 0x0b, 0xd6, 0x41, 0x34, 0x24, 0x01, - 0x15, 0x20, 0xc4, 0x25, 0xae, 0xc8, 0xeb, 0x59, 0x5c, 0xd9, 0xeb, 0x40, 0xed, 0x11, 0x8f, 0xea, - 0x29, 0x01, 0x61, 0x75, 0x11, 0xc2, 0x1e, 0xf1, 0x1c, 0x11, 0xa2, 0x2d, 0x83, 0x74, 0x84, 0x98, - 0x10, 0x48, 0xc9, 0xe1, 0x4b, 0xad, 0x0c, 0xf2, 0xb1, 0xdf, 0x46, 0x51, 0x44, 0xa2, 0xe4, 0x12, - 0xcd, 0xc5, 0xfe, 0x2e, 0x37, 0xb9, 0x8b, 0x4b, 0xa3, 0x4f, 0x51, 0x47, 0x0e, 0xd9, 0xc9, 0x79, - 0x90, 0xde, 0xa7, 0xa8, 0x93, 0xb4, 0xf9, 0xbd, 0x02, 0x9e, 0xdb, 0xa7, 0xde, 0xfd, 0xb0, 0x03, - 0x19, 0xba, 0x07, 0x23, 0xe8, 0x53, 0x7e, 0xd7, 0xc0, 0x3e, 0xeb, 0x92, 0x08, 0xb3, 0x61, 0xa2, - 0x76, 0xfd, 0xc7, 0x47, 0x9b, 0x2b, 0xc9, 0x8b, 0xba, 0xdd, 0xe9, 0x44, 0x88, 0xd2, 0xf7, 0x59, - 0x84, 0x03, 0xcf, 0x99, 0x86, 0x6a, 0x6f, 0x81, 0x6c, 0x28, 0x2a, 0x08, 0x65, 0x17, 0xb7, 0xf4, - 0xc5, 0x9f, 0x21, 0x4f, 0x68, 0x16, 0xf8, 0x18, 0xe5, 0xa8, 0x92, 0x94, 0x86, 0xf5, 0xe0, 0xe4, - 0x68, 0x63, 0x5a, 0x8c, 0xe3, 0xbf, 0x86, 0x62, 0xfe, 0xce, 0x0f, 0xc4, 0x93, 0x7d, 0xae, 0x49, - 0xb3, 0x0c, 0xd6, 0xce, 0x6d, 0x4d, 0x00, 0x6f, 0xfd, 0xa1, 0x80, 0xf4, 0x3e, 0xf5, 0xb4, 0x21, - 0x00, 0x33, 0xaf, 0xb0, 0xb1, 0xd8, 0xcd, 0xdc, 0x7c, 0x2a, 0xaf, 0x5d, 0x11, 0x30, 0xa9, 0x6f, - 0x5e, 0x7f, 0xf0, 0xd3, 0xef, 0x5f, 0xa6, 0xae, 0x99, 0x65, 0x5b, 0x36, 0x38, 0xf9, 0xa2, 0x48, - 0x22, 0xdb, 0x6c, 0xa0, 0x7d, 0x08, 0x4a, 0x73, 0x48, 0xaf, 0xff, 0x6d, 0xed, 0xd9, 0x90, 0xca, - 0xfa, 0x95, 0x21, 0x93, 0x06, 0x2a, 0x99, 0x4f, 0x39, 0xba, 0xe6, 0xdb, 0x8f, 0xc7, 0x55, 0xe5, - 0xc9, 0xb8, 0xaa, 0xfc, 0x36, 0xae, 0x2a, 0x5f, 0x1c, 0x57, 0x97, 0x9e, 0x1c, 0x57, 0x97, 0x7e, - 0x3e, 0xae, 0x2e, 0x7d, 0xf0, 0xaa, 0x87, 0x59, 0xb7, 0x7f, 0x60, 0xb9, 0xc4, 0x9f, 0xf6, 0x48, - 0xa8, 0x1d, 0x6f, 0xbd, 0x9e, 0xe0, 0x64, 0xc3, 0x10, 0xd1, 0x83, 0xac, 0xf8, 0x06, 0x79, 0xe3, - 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x94, 0x7d, 0xc7, 0x93, 0x09, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // EthereumTx defines a method submitting Ethereum transactions. - EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) - // UpdateParams defined a governance operation for updating the x/evm module parameters. - // The authority is hard-coded to the Cosmos SDK x/gov module account - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) { - out := new(MsgEthereumTxResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Msg/EthereumTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // EthereumTx defines a method submitting Ethereum transactions. - EthereumTx(context.Context, *MsgEthereumTx) (*MsgEthereumTxResponse, error) - // UpdateParams defined a governance operation for updating the x/evm module parameters. - // The authority is hard-coded to the Cosmos SDK x/gov module account - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) EthereumTx(ctx context.Context, req *MsgEthereumTx) (*MsgEthereumTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EthereumTx not implemented") -} -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_EthereumTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEthereumTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).EthereumTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Msg/EthereumTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EthereumTx(ctx, req.(*MsgEthereumTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethermint.evm.v1.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ethermint.evm.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "EthereumTx", - Handler: _Msg_EthereumTx_Handler, - }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ethermint/evm/v1/tx.proto", -} - -func (m *MsgEthereumTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgEthereumTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.From) > 0 { - i -= len(m.From) - copy(dAtA[i:], m.From) - i = encodeVarintTx(dAtA, i, uint64(len(m.From))) - i-- - dAtA[i] = 0x22 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x1a - } - if m.Size_ != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Size_)))) - i-- - dAtA[i] = 0x11 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LegacyTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LegacyTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LegacyTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.S) > 0 { - i -= len(m.S) - copy(dAtA[i:], m.S) - i = encodeVarintTx(dAtA, i, uint64(len(m.S))) - i-- - dAtA[i] = 0x4a - } - if len(m.R) > 0 { - i -= len(m.R) - copy(dAtA[i:], m.R) - i = encodeVarintTx(dAtA, i, uint64(len(m.R))) - i-- - dAtA[i] = 0x42 - } - if len(m.V) > 0 { - i -= len(m.V) - copy(dAtA[i:], m.V) - i = encodeVarintTx(dAtA, i, uint64(len(m.V))) - i-- - dAtA[i] = 0x3a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x32 - } - if m.Amount != nil { - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.To) > 0 { - i -= len(m.To) - copy(dAtA[i:], m.To) - i = encodeVarintTx(dAtA, i, uint64(len(m.To))) - i-- - dAtA[i] = 0x22 - } - if m.GasLimit != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) - i-- - dAtA[i] = 0x18 - } - if m.GasPrice != nil { - { - size := m.GasPrice.Size() - i -= size - if _, err := m.GasPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Nonce != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AccessListTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccessListTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccessListTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.S) > 0 { - i -= len(m.S) - copy(dAtA[i:], m.S) - i = encodeVarintTx(dAtA, i, uint64(len(m.S))) - i-- - dAtA[i] = 0x5a - } - if len(m.R) > 0 { - i -= len(m.R) - copy(dAtA[i:], m.R) - i = encodeVarintTx(dAtA, i, uint64(len(m.R))) - i-- - dAtA[i] = 0x52 - } - if len(m.V) > 0 { - i -= len(m.V) - copy(dAtA[i:], m.V) - i = encodeVarintTx(dAtA, i, uint64(len(m.V))) - i-- - dAtA[i] = 0x4a - } - if len(m.Accesses) > 0 { - for iNdEx := len(m.Accesses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Accesses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x3a - } - if m.Amount != nil { - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.To) > 0 { - i -= len(m.To) - copy(dAtA[i:], m.To) - i = encodeVarintTx(dAtA, i, uint64(len(m.To))) - i-- - dAtA[i] = 0x2a - } - if m.GasLimit != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) - i-- - dAtA[i] = 0x20 - } - if m.GasPrice != nil { - { - size := m.GasPrice.Size() - i -= size - if _, err := m.GasPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Nonce != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x10 - } - if m.ChainID != nil { - { - size := m.ChainID.Size() - i -= size - if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DynamicFeeTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DynamicFeeTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.S) > 0 { - i -= len(m.S) - copy(dAtA[i:], m.S) - i = encodeVarintTx(dAtA, i, uint64(len(m.S))) - i-- - dAtA[i] = 0x62 - } - if len(m.R) > 0 { - i -= len(m.R) - copy(dAtA[i:], m.R) - i = encodeVarintTx(dAtA, i, uint64(len(m.R))) - i-- - dAtA[i] = 0x5a - } - if len(m.V) > 0 { - i -= len(m.V) - copy(dAtA[i:], m.V) - i = encodeVarintTx(dAtA, i, uint64(len(m.V))) - i-- - dAtA[i] = 0x52 - } - if len(m.Accesses) > 0 { - for iNdEx := len(m.Accesses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Accesses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x42 - } - if m.Amount != nil { - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if len(m.To) > 0 { - i -= len(m.To) - copy(dAtA[i:], m.To) - i = encodeVarintTx(dAtA, i, uint64(len(m.To))) - i-- - dAtA[i] = 0x32 - } - if m.GasLimit != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) - i-- - dAtA[i] = 0x28 - } - if m.GasFeeCap != nil { - { - size := m.GasFeeCap.Size() - i -= size - if _, err := m.GasFeeCap.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.GasTipCap != nil { - { - size := m.GasTipCap.Size() - i -= size - if _, err := m.GasTipCap.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Nonce != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x10 - } - if m.ChainID != nil { - { - size := m.ChainID.Size() - i -= size - if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExtensionOptionsEthereumTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExtensionOptionsEthereumTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExtensionOptionsEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgEthereumTxResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgEthereumTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEthereumTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GasUsed != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x28 - } - if len(m.VmError) > 0 { - i -= len(m.VmError) - copy(dAtA[i:], m.VmError) - i = encodeVarintTx(dAtA, i, uint64(len(m.VmError))) - i-- - dAtA[i] = 0x22 - } - if len(m.Ret) > 0 { - i -= len(m.Ret) - copy(dAtA[i:], m.Ret) - i = encodeVarintTx(dAtA, i, uint64(len(m.Ret))) - i-- - dAtA[i] = 0x1a - } - if len(m.Logs) > 0 { - for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgEthereumTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.Size_ != 0 { - n += 9 - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.From) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *LegacyTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nonce != 0 { - n += 1 + sovTx(uint64(m.Nonce)) - } - if m.GasPrice != nil { - l = m.GasPrice.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.GasLimit != 0 { - n += 1 + sovTx(uint64(m.GasLimit)) - } - l = len(m.To) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.V) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.R) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.S) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *AccessListTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChainID != nil { - l = m.ChainID.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.Nonce != 0 { - n += 1 + sovTx(uint64(m.Nonce)) - } - if m.GasPrice != nil { - l = m.GasPrice.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.GasLimit != 0 { - n += 1 + sovTx(uint64(m.GasLimit)) - } - l = len(m.To) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Accesses) > 0 { - for _, e := range m.Accesses { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.V) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.R) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.S) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *DynamicFeeTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChainID != nil { - l = m.ChainID.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.Nonce != 0 { - n += 1 + sovTx(uint64(m.Nonce)) - } - if m.GasTipCap != nil { - l = m.GasTipCap.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.GasFeeCap != nil { - l = m.GasFeeCap.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.GasLimit != 0 { - n += 1 + sovTx(uint64(m.GasLimit)) - } - l = len(m.To) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Accesses) > 0 { - for _, e := range m.Accesses { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.V) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.R) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.S) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *ExtensionOptionsEthereumTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgEthereumTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Logs) > 0 { - for _, e := range m.Logs { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.Ret) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.VmError) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.GasUsed != 0 { - n += 1 + sovTx(uint64(m.GasUsed)) - } - return n -} - -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgEthereumTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgEthereumTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &types.Any{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Size_ = float64(math.Float64frombits(v)) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.From = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LegacyTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LegacyTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LegacyTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.GasPrice = &v - if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) - } - m.GasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.Amount = &v - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) - if m.V == nil { - m.V = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) - if m.R == nil { - m.R = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) - if m.S == nil { - m.S = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AccessListTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccessListTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccessListTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.ChainID = &v - if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.GasPrice = &v - if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) - } - m.GasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.Amount = &v - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accesses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Accesses = append(m.Accesses, AccessTuple{}) - if err := m.Accesses[len(m.Accesses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) - if m.V == nil { - m.V = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) - if m.R == nil { - m.R = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) - if m.S == nil { - m.S = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DynamicFeeTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DynamicFeeTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.ChainID = &v - if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasTipCap", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.GasTipCap = &v - if err := m.GasTipCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasFeeCap", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.GasFeeCap = &v - if err := m.GasFeeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) - } - m.GasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v cosmossdk_io_math.Int - m.Amount = &v - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accesses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Accesses = append(m.Accesses, AccessTuple{}) - if err := m.Accesses[len(m.Accesses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) - if m.V == nil { - m.V = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) - if m.R == nil { - m.R = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) - if m.S == nil { - m.S = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExtensionOptionsEthereumTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtensionOptionsEthereumTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtensionOptionsEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgEthereumTxResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgEthereumTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEthereumTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Logs = append(m.Logs, &Log{}) - if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) - if m.Ret == nil { - m.Ret = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VmError", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VmError = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/app/upgrades/v9/legacy/evm/types/tx.pb.gw.go b/app/upgrades/v9/legacy/evm/types/tx.pb.gw.go deleted file mode 100644 index 08f7466..0000000 --- a/app/upgrades/v9/legacy/evm/types/tx.pb.gw.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ethermint/evm/v1/tx.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -var ( - filter_Msg_EthereumTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgEthereumTx - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_EthereumTx_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EthereumTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgEthereumTx - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_EthereumTx_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EthereumTx(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". -// UnaryRPC :call MsgServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. -func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { - - mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Msg_EthereumTx_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterMsgHandler(ctx, mux, conn) -} - -// RegisterMsgHandler registers the http handlers for service Msg to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) -} - -// RegisterMsgHandlerClient registers the http handlers for service Msg -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "MsgClient" to call the correct interceptors. -func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { - - mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Msg_EthereumTx_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Msg_EthereumTx_0 = runtime.ForwardResponseMessage -) diff --git a/app/upgrades/v9/legacy/types/account.pb.go b/app/upgrades/v9/legacy/types/account.pb.go deleted file mode 100644 index a2614cb..0000000 --- a/app/upgrades/v9/legacy/types/account.pb.go +++ /dev/null @@ -1,377 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/types/v1/account.proto - -package types - -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" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// EthAccount implements the authtypes.AccountI interface and embeds an -// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. -type EthAccount struct { - // base_account is an authtypes.BaseAccount - *types.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty" yaml:"base_account"` - // code_hash is the hash calculated from the code contents - CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"` -} - -func (m *EthAccount) Reset() { *m = EthAccount{} } -func (*EthAccount) ProtoMessage() {} -func (*EthAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_4edc057d42a619ef, []int{0} -} -func (m *EthAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EthAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EthAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_EthAccount.Merge(m, src) -} -func (m *EthAccount) XXX_Size() int { - return m.Size() -} -func (m *EthAccount) XXX_DiscardUnknown() { - xxx_messageInfo_EthAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_EthAccount proto.InternalMessageInfo - -func init() { - proto.RegisterType((*EthAccount)(nil), "ethermint.types.v1.EthAccount") -} - -func init() { proto.RegisterFile("ethermint/types/v1/account.proto", fileDescriptor_4edc057d42a619ef) } - -var fileDescriptor_4edc057d42a619ef = []byte{ - // 319 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0x2d, 0xc9, 0x48, - 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, - 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xab, - 0xd0, 0x03, 0xab, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x4b, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, - 0x2c, 0x2d, 0xc9, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0x04, 0x73, 0x20, 0x7a, 0xa4, - 0x24, 0x21, 0xf2, 0xf1, 0x60, 0x9e, 0x3e, 0x84, 0x03, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x87, - 0x88, 0x83, 0x58, 0x10, 0x51, 0xa5, 0x9f, 0x8c, 0x5c, 0x5c, 0xae, 0x25, 0x19, 0x8e, 0x10, 0x9b, - 0x85, 0x12, 0xb8, 0x78, 0x92, 0x12, 0x8b, 0x53, 0xe3, 0xa1, 0x2e, 0x91, 0x60, 0x54, 0x60, 0xd4, - 0xe0, 0x36, 0x52, 0xd0, 0x83, 0x9a, 0x04, 0xb6, 0x09, 0x6a, 0xad, 0x9e, 0x53, 0x62, 0x71, 0x2a, - 0x54, 0x9f, 0x93, 0xf4, 0x85, 0x7b, 0xf2, 0x8c, 0x9f, 0xee, 0xc9, 0x0b, 0x57, 0x26, 0xe6, 0xe6, - 0x58, 0x29, 0x21, 0x9b, 0xa1, 0x14, 0xc4, 0x9d, 0x84, 0x50, 0x29, 0x64, 0xc8, 0xc5, 0x99, 0x9c, - 0x9f, 0x92, 0x1a, 0x9f, 0x91, 0x58, 0x9c, 0x21, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xf2, - 0xe9, 0x9e, 0xbc, 0x00, 0x44, 0x23, 0x5c, 0x4a, 0x29, 0x88, 0x03, 0xc4, 0xf6, 0x48, 0x2c, 0xce, - 0xb0, 0x0a, 0xeb, 0x58, 0x20, 0xcf, 0x30, 0x63, 0x81, 0x3c, 0xc3, 0x8b, 0x05, 0xf2, 0x0c, 0xa7, - 0xb6, 0xe8, 0xba, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0x42, 0xbd, 0x08, - 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x20, 0x81, 0x03, 0x09, 0x32, 0x6c, 0xee, 0x86, 0xba, - 0xc4, 0xd3, 0xc9, 0xea, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, - 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x14, 0x90, - 0x6c, 0x48, 0x2d, 0x03, 0x59, 0x00, 0x21, 0xcb, 0x8c, 0x0c, 0x20, 0x06, 0x27, 0xb1, 0x81, 0x83, - 0xcf, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x52, 0xb6, 0xfb, 0x41, 0xc7, 0x01, 0x00, 0x00, -} - -func (m *EthAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EthAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CodeHash) > 0 { - i -= len(m.CodeHash) - copy(dAtA[i:], m.CodeHash) - i = encodeVarintAccount(dAtA, i, uint64(len(m.CodeHash))) - i-- - dAtA[i] = 0x12 - } - if m.BaseAccount != nil { - { - size, err := m.BaseAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { - offset -= sovAccount(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EthAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BaseAccount != nil { - l = m.BaseAccount.Size() - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.CodeHash) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func sovAccount(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAccount(x uint64) (n int) { - return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EthAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EthAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseAccount == nil { - m.BaseAccount = &types.BaseAccount{} - } - if err := m.BaseAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAccount(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAccount - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAccount - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAccount - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") -) diff --git a/app/upgrades/v9/upgrades.go b/app/upgrades/v9/upgrades.go index 151d024..9a702e3 100644 --- a/app/upgrades/v9/upgrades.go +++ b/app/upgrades/v9/upgrades.go @@ -15,8 +15,8 @@ import ( erc20types "github.com/cosmos/evm/x/erc20/types" evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/common" - legacyevmtypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/evm/types" - legacytypes "github.com/xrplevm/node/v9/app/upgrades/v9/legacy/types" + legacyevmtypes "github.com/xrplevm/node/v9/types/legacy/ethermint/evm" + legacytypes "github.com/xrplevm/node/v9/types/legacy/ethermint/types" ) func CreateUpgradeHandler( diff --git a/cmd/exrpd/cmd/chain.go b/cmd/exrpd/cmd/chain.go index 8cdf8ca..cccbd65 100644 --- a/cmd/exrpd/cmd/chain.go +++ b/cmd/exrpd/cmd/chain.go @@ -1,19 +1,22 @@ package cmd const ( - DevnetChainID string = "exrp_1440002-1" - TestnetChainID string = "xrplevm_1449000-1" - MainnetChainID string = "xrplevm_1440000-1" + LocalnetChainID string = "exrp_1449999-1" + DevnetChainID string = "exrp_1440002-1" + TestnetChainID string = "xrplevm_1449000-1" + MainnetChainID string = "xrplevm_1440000-1" ) const ( - MainnetEVMChainID uint64 = 1440000 - TestnetEVMChainID uint64 = 1449000 - DevnetEVMChainID uint64 = 1440002 + LocalnetEVMChainID uint64 = 1449999 + MainnetEVMChainID uint64 = 1440000 + TestnetEVMChainID uint64 = 1449000 + DevnetEVMChainID uint64 = 1440002 ) var CosmosToEVMChainID = map[string]uint64{ - DevnetChainID: DevnetEVMChainID, - TestnetChainID: TestnetEVMChainID, - MainnetChainID: MainnetEVMChainID, + LocalnetChainID: LocalnetEVMChainID, + DevnetChainID: DevnetEVMChainID, + TestnetChainID: TestnetEVMChainID, + MainnetChainID: MainnetEVMChainID, } diff --git a/go.mod b/go.mod index ad4d15d..78996a9 100644 --- a/go.mod +++ b/go.mod @@ -281,14 +281,11 @@ replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // use Cosmos-SDK fork to enable Ledger functionality github.com/cosmos/cosmos-sdk => github.com/xrplevm/cosmos-sdk v0.53.4-xrplevm.2 - // map cosmos/evm to evmos // fix cosmos-sdk store path mismatch github.com/cosmos/cosmos-sdk/store => cosmossdk.io/store v1.1.2 // TODO: remove this once we have a proper fork of cosmos/evm github.com/cosmos/evm => github.com/xrplevm/evm v0.4.1-xrplevm.1 - // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91 - // use exrp Evmos fork // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb diff --git a/proto/ethermint/evm/v1/events.proto b/proto/ethermint/evm/v1/events.proto new file mode 100644 index 0000000..f2c5d7e --- /dev/null +++ b/proto/ethermint/evm/v1/events.proto @@ -0,0 +1,46 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.evm.v1; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/evm"; + +// EventEthereumTx defines the event for an Ethereum transaction +message EventEthereumTx { + // amount + string amount = 1; + // eth_hash is the Ethereum hash of the transaction + string eth_hash = 2; + // index of the transaction in the block + string index = 3; + // gas_used is the amount of gas used by the transaction + string gas_used = 4; + // hash is the Tendermint hash of the transaction + string hash = 5; + // recipient of the transaction + string recipient = 6; + // eth_tx_failed contains a VM error should it occur + string eth_tx_failed = 7; +} + +// EventTxLog defines the event for an Ethereum transaction log +message EventTxLog { + // tx_logs is an array of transaction logs + repeated string tx_logs = 1; +} + +// EventMessage +message EventMessage { + // module which emits the event + string module = 1; + // sender of the message + string sender = 2; + // tx_type is the type of the message + string tx_type = 3; +} + +// EventBlockBloom defines an Ethereum block bloom filter event +message EventBlockBloom { + // bloom is the bloom filter of the block + string bloom = 1; +} diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto new file mode 100644 index 0000000..e228bbb --- /dev/null +++ b/proto/ethermint/evm/v1/evm.proto @@ -0,0 +1,262 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.evm.v1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/evm"; + +// Params defines the EVM module parameters +message Params { + option (amino.name) = "evmos/x/evm/Params"; + // evm_denom represents the token denomination used to run the EVM state + // transitions. + string evm_denom = 1 [(gogoproto.moretags) = "yaml:\"evm_denom\""]; + // enable_create and enable call have been deprecated + reserved 2, 3; + // extra_eips defines the additional EIPs for the vm.Config + repeated string extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""]; + // chain_config defines the EVM chain configuration parameters + ChainConfig chain_config = 5 + [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // allow_unprotected_txs defines if replay-protected (i.e non EIP155 + // signed) transactions can be executed on the state machine. + bool allow_unprotected_txs = 6; + // renamed active_precompiles to active_static_precompiles + reserved 7; + // evm_channels is the list of channel identifiers from EVM compatible chains + repeated string evm_channels = 8 [(gogoproto.customname) = "EVMChannels"]; + // access_control defines the permission policy of the EVM + AccessControl access_control = 9 [(gogoproto.customname) = "AccessControl", (gogoproto.nullable) = false]; + // active_static_precompiles defines the slice of hex addresses of the precompiled + // contracts that are active + repeated string active_static_precompiles = 10; +} + +// AccessControl defines the permission policy of the EVM +// for creating and calling contracts +message AccessControl { + // create defines the permission policy for creating contracts + AccessControlType create = 1 [(gogoproto.nullable) = false]; + // call defines the permission policy for calling contracts + AccessControlType call = 2 [(gogoproto.nullable) = false]; +} + +// AccessControlType defines the permission type for policies +message AccessControlType { + // access_type defines which type of permission is required for the operation + AccessType access_type = 1 [(gogoproto.customname) = "AccessType", (gogoproto.moretags) = "yaml:\"access_type\""]; + // access_control_list defines defines different things depending on the AccessType: + // - ACCESS_TYPE_PERMISSIONLESS: list of addresses that are blocked from performing the operation + // - ACCESS_TYPE_RESTRICTED: ignored + // - ACCESS_TYPE_PERMISSIONED: list of addresses that are allowed to perform the operation + repeated string access_control_list = 2 + [(gogoproto.customname) = "AccessControlList", (gogoproto.moretags) = "yaml:\"access_control_list\""]; +} + +// AccessType defines the types of permissions for the operations +enum AccessType { + option (gogoproto.goproto_enum_prefix) = false; + + // ACCESS_TYPE_PERMISSIONLESS does not restrict the operation to anyone + ACCESS_TYPE_PERMISSIONLESS = 0 [(gogoproto.enumvalue_customname) = "AccessTypePermissionless"]; + // ACCESS_TYPE_RESTRICTED restrict the operation to anyone + ACCESS_TYPE_RESTRICTED = 1 [(gogoproto.enumvalue_customname) = "AccessTypeRestricted"]; + // ACCESS_TYPE_PERMISSIONED only allows the operation for specific addresses + ACCESS_TYPE_PERMISSIONED = 2 [(gogoproto.enumvalue_customname) = "AccessTypePermissioned"]; +} + +// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// instead of *big.Int. +message ChainConfig { + // homestead_block switch (nil no fork, 0 = already homestead) + string homestead_block = 1 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"homestead_block\""]; + // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) + string dao_fork_block = 2 [ + (gogoproto.customname) = "DAOForkBlock", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.moretags) = "yaml:\"dao_fork_block\"" + ]; + // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork + bool dao_fork_support = 3 + [(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""]; + // eip150_block: EIP150 implements the Gas price changes + // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) + string eip150_block = 4 [ + (gogoproto.customname) = "EIP150Block", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.moretags) = "yaml:\"eip150_block\"" + ]; + // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) + string eip150_hash = 5 [(gogoproto.customname) = "EIP150Hash", (gogoproto.moretags) = "yaml:\"byzantium_block\""]; + // eip155_block: EIP155Block HF block + string eip155_block = 6 [ + (gogoproto.customname) = "EIP155Block", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.moretags) = "yaml:\"eip155_block\"" + ]; + // eip158_block: EIP158 HF block + string eip158_block = 7 [ + (gogoproto.customname) = "EIP158Block", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.moretags) = "yaml:\"eip158_block\"" + ]; + // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) + string byzantium_block = 8 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"byzantium_block\""]; + // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) + string constantinople_block = 9 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"constantinople_block\""]; + // petersburg_block: Petersburg switch block (nil same as Constantinople) + string petersburg_block = 10 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"petersburg_block\""]; + // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) + string istanbul_block = 11 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"istanbul_block\""]; + // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) + string muir_glacier_block = 12 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"muir_glacier_block\""]; + // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) + string berlin_block = 13 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"berlin_block\""]; + // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated + reserved 14, 15, 16; + reserved "yolo_v3_block", "ewasm_block", "catalyst_block"; + // london_block: London switch block (nil = no fork, 0 = already on london) + string london_block = 17 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"london_block\""]; + // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) + string arrow_glacier_block = 18 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"arrow_glacier_block\""]; + // DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904 + reserved 19; + reserved "merge_fork_block"; + // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) + string gray_glacier_block = 20 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"gray_glacier_block\""]; + // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter + string merge_netsplit_block = 21 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"merge_netsplit_block\""]; + // shanghai_block switch block (nil = no fork, 0 = already on shanghai) + string shanghai_block = 22 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"shanghai_block\""]; + // cancun_block switch block (nil = no fork, 0 = already on cancun) + string cancun_block = 23 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"cancun_block\""]; +} + +// State represents a single Storage key value pair item. +message State { + // key is the stored key + string key = 1; + // value is the stored value for the given key + string value = 2; +} + +// TransactionLogs define the logs generated from a transaction execution +// with a given hash. It it used for import/export data as transactions are not +// persisted on blockchain state after an upgrade. +message TransactionLogs { + // hash of the transaction + string hash = 1; + // logs is an array of Logs for the given transaction hash + repeated Log logs = 2; +} + +// Log represents an protobuf compatible Ethereum Log that defines a contract +// log event. These events are generated by the LOG opcode and stored/indexed by +// the node. +// +// NOTE: address, topics and data are consensus fields. The rest of the fields +// are derived, i.e. filled in by the nodes, but not secured by consensus. +message Log { + // address of the contract that generated the event + string address = 1; + // topics is a list of topics provided by the contract. + repeated string topics = 2; + // data which is supplied by the contract, usually ABI-encoded + bytes data = 3; + + // block_number of the block in which the transaction was included + uint64 block_number = 4 [(gogoproto.jsontag) = "blockNumber"]; + // tx_hash is the transaction hash + string tx_hash = 5 [(gogoproto.jsontag) = "transactionHash"]; + // tx_index of the transaction in the block + uint64 tx_index = 6 [(gogoproto.jsontag) = "transactionIndex"]; + // block_hash of the block in which the transaction was included + string block_hash = 7 [(gogoproto.jsontag) = "blockHash"]; + // index of the log in the block + uint64 index = 8 [(gogoproto.jsontag) = "logIndex"]; + + // removed is true if this log was reverted due to a chain + // reorganisation. You must pay attention to this field if you receive logs + // through a filter query. + bool removed = 9; +} + +// TxResult stores results of Tx execution. +message TxResult { + option (gogoproto.goproto_getters) = false; + + // contract_address contains the ethereum address of the created contract (if + // any). If the state transition is an evm.Call, the contract address will be + // empty. + string contract_address = 1 [(gogoproto.moretags) = "yaml:\"contract_address\""]; + // bloom represents the bloom filter bytes + bytes bloom = 2; + // tx_logs contains the transaction hash and the proto-compatible ethereum + // logs. + TransactionLogs tx_logs = 3 + [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // ret defines the bytes from the execution. + bytes ret = 4; + // reverted flag is set to true when the call has been reverted + bool reverted = 5; + // gas_used notes the amount of gas consumed while execution + uint64 gas_used = 6; +} + +// AccessTuple is the element type of an access list. +message AccessTuple { + option (gogoproto.goproto_getters) = false; + + // address is a hex formatted ethereum address + string address = 1; + // storage_keys are hex formatted hashes of the storage keys + repeated string storage_keys = 2 [(gogoproto.jsontag) = "storageKeys"]; +} + +// TraceConfig holds extra parameters to trace functions. +message TraceConfig { + // DEPRECATED: DisableMemory and DisableReturnData have been renamed to + // Enable*. + reserved 4, 7; + reserved "disable_memory", "disable_return_data"; + + // tracer is a custom javascript tracer + string tracer = 1; + // timeout overrides the default timeout of 5 seconds for JavaScript-based tracing + // calls + string timeout = 2; + // reexec defines the number of blocks the tracer is willing to go back + uint64 reexec = 3; + // disable_stack switches stack capture + bool disable_stack = 5 [(gogoproto.jsontag) = "disableStack"]; + // disable_storage switches storage capture + bool disable_storage = 6 [(gogoproto.jsontag) = "disableStorage"]; + // debug can be used to print output during capture end + bool debug = 8; + // limit defines the maximum length of output, but zero means unlimited + int32 limit = 9; + // overrides can be used to execute a trace using future fork rules + ChainConfig overrides = 10; + // enable_memory switches memory capture + bool enable_memory = 11 [(gogoproto.jsontag) = "enableMemory"]; + // enable_return_data switches the capture of return data + bool enable_return_data = 12 [(gogoproto.jsontag) = "enableReturnData"]; + // tracer_json_config configures the tracer using a JSON string + string tracer_json_config = 13 [(gogoproto.jsontag) = "tracerConfig"]; +} diff --git a/proto/ethermint/evm/v1/genesis.proto b/proto/ethermint/evm/v1/genesis.proto new file mode 100644 index 0000000..c0e3a0b --- /dev/null +++ b/proto/ethermint/evm/v1/genesis.proto @@ -0,0 +1,31 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.evm.v1; + +import "amino/amino.proto"; +import "ethermint/evm/v1/evm.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/evm"; + +// GenesisState defines the evm module's genesis state. +message GenesisState { + // accounts is an array containing the ethereum genesis accounts. + repeated GenesisAccount accounts = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // params defines all the parameters of the module. + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// GenesisAccount defines an account to be initialized in the genesis state. +// Its main difference between with Geth's GenesisAccount is that it uses a +// custom storage type and that it doesn't contain the private key field. +message GenesisAccount { + // address defines an ethereum hex formated address of an account + string address = 1; + // code defines the hex bytes of the account code. + string code = 2; + // storage defines the set of state key values for the account. + repeated State storage = 3 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "Storage"]; +} diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto new file mode 100644 index 0000000..24961fa --- /dev/null +++ b/proto/ethermint/evm/v1/query.proto @@ -0,0 +1,312 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.evm.v1; + +import "amino/amino.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ethermint/evm/v1/evm.proto"; +import "ethermint/evm/v1/tx.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/evm"; + +// Query defines the gRPC querier service. +service Query { + // Account queries an Ethereum account. + rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { + option (google.api.http).get = "/evmos/evm/v1/account/{address}"; + } + + // CosmosAccount queries an Ethereum account's Cosmos Address. + rpc CosmosAccount(QueryCosmosAccountRequest) returns (QueryCosmosAccountResponse) { + option (google.api.http).get = "/evmos/evm/v1/cosmos_account/{address}"; + } + + // ValidatorAccount queries an Ethereum account's from a validator consensus + // Address. + rpc ValidatorAccount(QueryValidatorAccountRequest) returns (QueryValidatorAccountResponse) { + option (google.api.http).get = "/evmos/evm/v1/validator_account/{cons_address}"; + } + + // Balance queries the balance of a the EVM denomination for a single + // EthAccount. + rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { + option (google.api.http).get = "/evmos/evm/v1/balances/{address}"; + } + + // Storage queries the balance of all coins for a single account. + rpc Storage(QueryStorageRequest) returns (QueryStorageResponse) { + option (google.api.http).get = "/evmos/evm/v1/storage/{address}/{key}"; + } + + // Code queries the balance of all coins for a single account. + rpc Code(QueryCodeRequest) returns (QueryCodeResponse) { + option (google.api.http).get = "/evmos/evm/v1/codes/{address}"; + } + + // Params queries the parameters of x/evm module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/evmos/evm/v1/params"; + } + + // EthCall implements the `eth_call` rpc api + rpc EthCall(EthCallRequest) returns (MsgEthereumTxResponse) { + option (google.api.http).get = "/evmos/evm/v1/eth_call"; + } + + // EstimateGas implements the `eth_estimateGas` rpc api + rpc EstimateGas(EthCallRequest) returns (EstimateGasResponse) { + option (google.api.http).get = "/evmos/evm/v1/estimate_gas"; + } + + // TraceTx implements the `debug_traceTransaction` rpc api + rpc TraceTx(QueryTraceTxRequest) returns (QueryTraceTxResponse) { + option (google.api.http).get = "/evmos/evm/v1/trace_tx"; + } + + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + rpc TraceBlock(QueryTraceBlockRequest) returns (QueryTraceBlockResponse) { + option (google.api.http).get = "/evmos/evm/v1/trace_block"; + } + + // BaseFee queries the base fee of the parent block of the current block, + // it's similar to feemarket module's method, but also checks london hardfork status. + rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) { + option (google.api.http).get = "/evmos/evm/v1/base_fee"; + } +} + +// QueryAccountRequest is the request type for the Query/Account RPC method. +message QueryAccountRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the ethereum hex address to query the account for. + string address = 1; +} + +// QueryAccountResponse is the response type for the Query/Account RPC method. +message QueryAccountResponse { + // balance is the balance of the EVM denomination. + string balance = 1; + // code_hash is the hex-formatted code bytes from the EOA. + string code_hash = 2; + // nonce is the account's sequence number. + uint64 nonce = 3; +} + +// QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC +// method. +message QueryCosmosAccountRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the ethereum hex address to query the account for. + string address = 1; +} + +// QueryCosmosAccountResponse is the response type for the Query/CosmosAccount +// RPC method. +message QueryCosmosAccountResponse { + // cosmos_address is the cosmos address of the account. + string cosmos_address = 1; + // sequence is the account's sequence number. + uint64 sequence = 2; + // account_number is the account number + uint64 account_number = 3; +} + +// QueryValidatorAccountRequest is the request type for the +// Query/ValidatorAccount RPC method. +message QueryValidatorAccountRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // cons_address is the validator cons address to query the account for. + string cons_address = 1; +} + +// QueryValidatorAccountResponse is the response type for the +// Query/ValidatorAccount RPC method. +message QueryValidatorAccountResponse { + // account_address is the cosmos address of the account in bech32 format. + string account_address = 1; + // sequence is the account's sequence number. + uint64 sequence = 2; + // account_number is the account number + uint64 account_number = 3; +} + +// QueryBalanceRequest is the request type for the Query/Balance RPC method. +message QueryBalanceRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the ethereum hex address to query the balance for. + string address = 1; +} + +// QueryBalanceResponse is the response type for the Query/Balance RPC method. +message QueryBalanceResponse { + // balance is the balance of the EVM denomination. + string balance = 1; +} + +// QueryStorageRequest is the request type for the Query/Storage RPC method. +message QueryStorageRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the ethereum hex address to query the storage state for. + string address = 1; + + // key defines the key of the storage state + string key = 2; +} + +// QueryStorageResponse is the response type for the Query/Storage RPC +// method. +message QueryStorageResponse { + // value defines the storage state value hash associated with the given key. + string value = 1; +} + +// QueryCodeRequest is the request type for the Query/Code RPC method. +message QueryCodeRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the ethereum hex address to query the code for. + string address = 1; +} + +// QueryCodeResponse is the response type for the Query/Code RPC +// method. +message QueryCodeResponse { + // code represents the code bytes from an ethereum address. + bytes code = 1; +} + +// QueryTxLogsRequest is the request type for the Query/TxLogs RPC method. +message QueryTxLogsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // hash is the ethereum transaction hex hash to query the logs for. + string hash = 1; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryTxLogsResponse is the response type for the Query/TxLogs RPC method. +message QueryTxLogsResponse { + // logs represents the ethereum logs generated from the given transaction. + repeated Log logs = 1; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryParamsRequest defines the request type for querying x/evm parameters. +message QueryParamsRequest {} + +// QueryParamsResponse defines the response type for querying x/evm parameters. +message QueryParamsResponse { + // params define the evm module parameters. + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// EthCallRequest defines EthCall request +message EthCallRequest { + // args uses the same json format as the json rpc api. + bytes args = 1; + // gas_cap defines the default gas cap to be used + uint64 gas_cap = 2; + // proposer_address of the requested block in hex format + bytes proposer_address = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + // chain_id is the eip155 chain id parsed from the requested block header + int64 chain_id = 4; +} + +// EstimateGasResponse defines EstimateGas response +message EstimateGasResponse { + // gas returns the estimated gas + uint64 gas = 1; + // ret is the returned data from evm function (result or data supplied with revert + // opcode) + bytes ret = 2; + // vm_error is the error returned by vm execution + string vm_error = 3; +} + +// QueryTraceTxRequest defines TraceTx request +message QueryTraceTxRequest { + // msg is the MsgEthereumTx for the requested transaction + MsgEthereumTx msg = 1; + // tx_index is not necessary anymore + reserved 2; + reserved "tx_index"; + // trace_config holds extra parameters to trace functions. + TraceConfig trace_config = 3; + // predecessors is an array of transactions included in the same block + // need to be replayed first to get correct context for tracing. + repeated MsgEthereumTx predecessors = 4; + // block_number of requested transaction + int64 block_number = 5; + // block_hash of requested transaction + string block_hash = 6; + // block_time of requested transaction + google.protobuf.Timestamp block_time = 7 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; + // proposer_address is the proposer of the requested block + bytes proposer_address = 8 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + // chain_id is the eip155 chain id parsed from the requested block header + int64 chain_id = 9; + // block_max_gas of the block of the requested transaction + int64 block_max_gas = 10; +} + +// QueryTraceTxResponse defines TraceTx response +message QueryTraceTxResponse { + // data is the response serialized in bytes + bytes data = 1; +} + +// QueryTraceBlockRequest defines TraceTx request +message QueryTraceBlockRequest { + // txs is an array of messages in the block + repeated MsgEthereumTx txs = 1; + // trace_config holds extra parameters to trace functions. + TraceConfig trace_config = 3; + // block_number of the traced block + int64 block_number = 5; + // block_hash (hex) of the traced block + string block_hash = 6; + // block_time of the traced block + google.protobuf.Timestamp block_time = 7 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; + // proposer_address is the address of the requested block + bytes proposer_address = 8 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + // chain_id is the eip155 chain id parsed from the requested block header + int64 chain_id = 9; + // block_max_gas of the traced block + int64 block_max_gas = 10; +} + +// QueryTraceBlockResponse defines TraceBlock response +message QueryTraceBlockResponse { + // data is the response serialized in bytes + bytes data = 1; +} + +// QueryBaseFeeRequest defines the request type for querying the EIP1559 base +// fee. +message QueryBaseFeeRequest {} + +// QueryBaseFeeResponse returns the EIP1559 base fee. +message QueryBaseFeeResponse { + // base_fee is the EIP1559 base fee + string base_fee = 1 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; +} diff --git a/proto/ethermint/evm/v1/tx.proto b/proto/ethermint/evm/v1/tx.proto new file mode 100644 index 0000000..96516ea --- /dev/null +++ b/proto/ethermint/evm/v1/tx.proto @@ -0,0 +1,198 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.evm.v1; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "ethermint/evm/v1/evm.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/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 = "/evmos/evm/v1/ethereum_tx"; + }; + // UpdateParams defined a governance operation for updating the x/evm module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. +message MsgEthereumTx { + option (amino.name) = "ethermint/MsgEthereumTx"; + + option (gogoproto.goproto_getters) = false; + + // data is inner transaction data of the Ethereum transaction + google.protobuf.Any data = 1; + + // size is the encoded storage size of the transaction (DEPRECATED) + double size = 2 [(gogoproto.jsontag) = "-", (amino.dont_omitempty) = true]; + // hash of the transaction in hex format + string hash = 3 [(gogoproto.moretags) = "rlp:\"-\"", (amino.dont_omitempty) = true]; + // from is the ethereum signer address in hex format. This address value is checked + // against the address derived from the signature (V, R, S) using the + // secp256k1 elliptic curve + string from = 4; +} + +// LegacyTx is the transaction data of regular Ethereum transactions. +// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the +// AllowUnprotectedTxs parameter is disabled. +message LegacyTx { + option (amino.name) = "ethermint/LegacyTx"; + + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "TxData"; + + // nonce corresponds to the account nonce (transaction sequence). + uint64 nonce = 1; + // gas_price defines the value for each gas unit + string gas_price = 2 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; + // gas defines the gas limit defined for the transaction. + uint64 gas = 3 [(gogoproto.customname) = "GasLimit"]; + // to is the hex formatted address of the recipient + string to = 4; + // value defines the unsigned integer value of the transaction amount. + string value = 5 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; + // data is the data payload bytes of the transaction. + bytes data = 6; + // v defines the signature value + bytes v = 7; + // r defines the signature value + bytes r = 8; + // s define the signature value + bytes s = 9; +} + +// AccessListTx is the data of EIP-2930 access list transactions. +message AccessListTx { + option (amino.name) = "ethermint/AccessListTx"; + + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "TxData"; + + // chain_id of the destination EVM chain + string chain_id = 1 [ + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.customname) = "ChainID", + (gogoproto.jsontag) = "chainID" + ]; + // nonce corresponds to the account nonce (transaction sequence). + uint64 nonce = 2; + // gas_price defines the value for each gas unit + string gas_price = 3 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; + // gas defines the gas limit defined for the transaction. + uint64 gas = 4 [(gogoproto.customname) = "GasLimit"]; + // to is the recipient address in hex format + string to = 5; + // value defines the unsigned integer value of the transaction amount. + string value = 6 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; + // data is the data payload bytes of the transaction. + bytes data = 7; + // accesses is an array of access tuples + repeated AccessTuple accesses = 8 [ + (gogoproto.castrepeated) = "AccessList", + (gogoproto.jsontag) = "accessList", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // v defines the signature value + bytes v = 9; + // r defines the signature value + bytes r = 10; + // s define the signature value + bytes s = 11; +} + +// DynamicFeeTx is the data of EIP-1559 dynamic fee transactions. +message DynamicFeeTx { + option (amino.name) = "ethermint/DynamicFeeTx"; + + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "TxData"; + + // chain_id of the destination EVM chain + string chain_id = 1 [ + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.customname) = "ChainID", + (gogoproto.jsontag) = "chainID" + ]; + // nonce corresponds to the account nonce (transaction sequence). + uint64 nonce = 2; + // gas_tip_cap defines the max value for the gas tip + string gas_tip_cap = 3 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; + // gas_fee_cap defines the max value for the gas fee + string gas_fee_cap = 4 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; + // gas defines the gas limit defined for the transaction. + uint64 gas = 5 [(gogoproto.customname) = "GasLimit"]; + // to is the hex formatted address of the recipient + string to = 6; + // value defines the transaction amount. + string value = 7 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; + // data is the data payload bytes of the transaction. + bytes data = 8; + // accesses is an array of access tuples + repeated AccessTuple accesses = 9 [ + (gogoproto.castrepeated) = "AccessList", + (gogoproto.jsontag) = "accessList", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // v defines the signature value + bytes v = 10; + // r defines the signature value + bytes r = 11; + // s define the signature value + bytes s = 12; +} + +// ExtensionOptionsEthereumTx is an extension option for ethereum transactions +message ExtensionOptionsEthereumTx { + option (gogoproto.goproto_getters) = false; +} + +// MsgEthereumTxResponse defines the Msg/EthereumTx response type. +message MsgEthereumTxResponse { + option (gogoproto.goproto_getters) = false; + + // hash of the ethereum transaction in hex format. This hash differs from the + // Tendermint sha256 hash of the transaction bytes. See + // https://github.com/tendermint/tendermint/issues/6539 for reference + string hash = 1; + // logs contains the transaction hash and the proto-compatible ethereum + // logs. + repeated Log logs = 2; + // ret is the returned data from evm function (result or data supplied with revert + // opcode) + bytes ret = 3; + // vm_error is the error returned by vm execution + string vm_error = 4; + // gas_used specifies how much gas was consumed by the transaction + uint64 gas_used = 5; +} + +// MsgUpdateParams defines a Msg for updating the x/evm module parameters. +message MsgUpdateParams { + option (amino.name) = "evmos/x/evm/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/evm parameters to update. + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} diff --git a/proto/ethermint/feemarket/v1/events.proto b/proto/ethermint/feemarket/v1/events.proto new file mode 100644 index 0000000..4bdcfee --- /dev/null +++ b/proto/ethermint/feemarket/v1/events.proto @@ -0,0 +1,20 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.feemarket.v1; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/feemarket"; + +// EventFeeMarket is the event type for the fee market module +message EventFeeMarket { + // base_fee for EIP-1559 blocks + string base_fee = 1; +} + +// EventBlockGas defines an Ethereum block gas event +message EventBlockGas { + // height of the block + string height = 1; + // amount of gas wanted by the block + string amount = 2; +} diff --git a/proto/ethermint/feemarket/v1/feemarket.proto b/proto/ethermint/feemarket/v1/feemarket.proto new file mode 100644 index 0000000..c2d188a --- /dev/null +++ b/proto/ethermint/feemarket/v1/feemarket.proto @@ -0,0 +1,44 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.feemarket.v1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/feemarket"; + +// Params defines the EVM module parameters +message Params { + option (amino.name) = "evmos/x/feemarket/Params"; + + // no_base_fee forces the EIP-1559 base fee to 0 (needed for 0 price calls) + bool no_base_fee = 1; + // base_fee_change_denominator bounds the amount the base fee can change + // between blocks. + uint32 base_fee_change_denominator = 2; + // elasticity_multiplier bounds the maximum gas limit an EIP-1559 block may + // have. + uint32 elasticity_multiplier = 3; + // DEPRECATED: initial base fee for EIP-1559 blocks. + reserved 4; + reserved "initial_base_fee"; + // enable_height defines at which block height the base fee calculation is enabled. + int64 enable_height = 5; + // base_fee for EIP-1559 blocks. + string base_fee = 6 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // min_gas_price defines the minimum gas price value for cosmos and eth transactions + string min_gas_price = 7 [ + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // min_gas_multiplier bounds the minimum gas used to be charged + // to senders based on gas limit + string min_gas_multiplier = 8 [ + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} diff --git a/proto/ethermint/feemarket/v1/genesis.proto b/proto/ethermint/feemarket/v1/genesis.proto new file mode 100644 index 0000000..45f44a8 --- /dev/null +++ b/proto/ethermint/feemarket/v1/genesis.proto @@ -0,0 +1,23 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.feemarket.v1; + +import "amino/amino.proto"; +import "ethermint/feemarket/v1/feemarket.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/feemarket"; + +// GenesisState defines the feemarket module's genesis state. +message GenesisState { + // params defines all the parameters of the feemarket module. + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // DEPRECATED: base fee is the exported value from previous software version. + // Zero by default. + reserved 2; + reserved "base_fee"; + // block_gas is the amount of gas wanted on the last block before the upgrade. + // Zero by default. + uint64 block_gas = 3; +} diff --git a/proto/ethermint/feemarket/v1/query.proto b/proto/ethermint/feemarket/v1/query.proto new file mode 100644 index 0000000..54c2fe2 --- /dev/null +++ b/proto/ethermint/feemarket/v1/query.proto @@ -0,0 +1,58 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.feemarket.v1; + +import "amino/amino.proto"; +import "ethermint/feemarket/v1/feemarket.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/feemarket"; + +// Query defines the gRPC querier service. +service Query { + // Params queries the parameters of x/feemarket module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/evmos/feemarket/v1/params"; + } + + // BaseFee queries the base fee of the parent block of the current block. + rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) { + option (google.api.http).get = "/evmos/feemarket/v1/base_fee"; + } + + // BlockGas queries the gas used at a given block height + rpc BlockGas(QueryBlockGasRequest) returns (QueryBlockGasResponse) { + option (google.api.http).get = "/evmos/feemarket/v1/block_gas"; + } +} + +// QueryParamsRequest defines the request type for querying x/evm parameters. +message QueryParamsRequest {} + +// QueryParamsResponse defines the response type for querying x/evm parameters. +message QueryParamsResponse { + // params define the evm module parameters. + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// QueryBaseFeeRequest defines the request type for querying the EIP1559 base +// fee. +message QueryBaseFeeRequest {} + +// QueryBaseFeeResponse returns the EIP1559 base fee. +message QueryBaseFeeResponse { + // base_fee is the EIP1559 base fee + string base_fee = 1 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; +} + +// QueryBlockGasRequest defines the request type for querying the EIP1559 base +// fee. +message QueryBlockGasRequest {} + +// QueryBlockGasResponse returns block gas used for a given height. +message QueryBlockGasResponse { + // gas is the returned block gas + int64 gas = 1; +} diff --git a/proto/ethermint/feemarket/v1/tx.proto b/proto/ethermint/feemarket/v1/tx.proto new file mode 100644 index 0000000..f8b323c --- /dev/null +++ b/proto/ethermint/feemarket/v1/tx.proto @@ -0,0 +1,36 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.feemarket.v1; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "ethermint/feemarket/v1/feemarket.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/feemarket"; + +// Msg defines the erc20 Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + // UpdateParams defined a governance operation for updating the x/feemarket module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgUpdateParams defines a Msg for updating the x/feemarket module parameters. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "evmos/x/feemarket/MsgUpdateParams"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // params defines the x/feemarket parameters to update. + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} diff --git a/proto/ethermint/types/v1/account.proto b/proto/ethermint/types/v1/account.proto new file mode 100644 index 0000000..f454174 --- /dev/null +++ b/proto/ethermint/types/v1/account.proto @@ -0,0 +1,27 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.types.v1; + +import "cosmos/auth/v1beta1/auth.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/types"; + +// EthAccount implements the authtypes.AccountI interface and embeds an +// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. +message EthAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; + + option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.cosmos.auth.v1beta1.AccountI"; + + // base_account is an authtypes.BaseAccount + cosmos.auth.v1beta1.BaseAccount base_account = 1 + [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + + // code_hash is the hash calculated from the code contents + string code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""]; +} diff --git a/proto/ethermint/types/v1/dynamic_fee.proto b/proto/ethermint/types/v1/dynamic_fee.proto new file mode 100644 index 0000000..7a080ac --- /dev/null +++ b/proto/ethermint/types/v1/dynamic_fee.proto @@ -0,0 +1,16 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.types.v1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/types"; + +// ExtensionOptionDynamicFeeTx is an extension option that specifies the maxPrioPrice for cosmos tx +message ExtensionOptionDynamicFeeTx { + // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec + string max_priority_price = 1 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} diff --git a/proto/ethermint/types/v1/indexer.proto b/proto/ethermint/types/v1/indexer.proto new file mode 100644 index 0000000..3377058 --- /dev/null +++ b/proto/ethermint/types/v1/indexer.proto @@ -0,0 +1,32 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.types.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/types"; + +// TxResult is the value stored in eth tx indexer +message TxResult { + option (gogoproto.goproto_getters) = false; + + // height of the blockchain + int64 height = 1; + // tx_index of the cosmos transaction + uint32 tx_index = 2; + // msg_index in a batch transaction + uint32 msg_index = 3; + + // eth_tx_index is the index in the list of valid eth tx in the block, + // aka. the transaction list returned by eth_getBlock api. + int32 eth_tx_index = 4; + // failed is true if the eth transaction did not go succeed + bool failed = 5; + // gas_used by the transaction. If it exceeds the block gas limit, + // it's set to gas limit, which is what's actually deducted by ante handler. + uint64 gas_used = 6; + // cumulative_gas_used specifies the cumulated amount of gas used for all + // processed messages within the current batch transaction. + uint64 cumulative_gas_used = 7; +} diff --git a/proto/ethermint/types/v1/web3.proto b/proto/ethermint/types/v1/web3.proto new file mode 100644 index 0000000..4c43201 --- /dev/null +++ b/proto/ethermint/types/v1/web3.proto @@ -0,0 +1,27 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package ethermint.types.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/ethermint/types"; + +// ExtensionOptionsWeb3Tx is an extension option that specifies the typed chain id, +// the fee payer as well as its signature data. +message ExtensionOptionsWeb3Tx { + option (gogoproto.goproto_getters) = false; + + // typed_data_chain_id is used only in EIP712 Domain and should match + // Ethereum network ID in a Web3 provider (e.g. Metamask). + uint64 typed_data_chain_id = 1 + [(gogoproto.jsontag) = "typedDataChainID,omitempty", (gogoproto.customname) = "TypedDataChainID"]; + + // fee_payer is an account address for the fee payer. It will be validated + // during EIP712 signature checking. + string fee_payer = 2 [(gogoproto.jsontag) = "feePayer,omitempty"]; + + // fee_payer_sig is a signature data from the fee paying account, + // allows to perform fee delegation when using EIP712 Domain. + bytes fee_payer_sig = 3 [(gogoproto.jsontag) = "feePayerSig,omitempty"]; +} diff --git a/proto/evmos/erc20/v1/erc20.proto b/proto/evmos/erc20/v1/erc20.proto new file mode 100644 index 0000000..3626453 --- /dev/null +++ b/proto/evmos/erc20/v1/erc20.proto @@ -0,0 +1,87 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package evmos.erc20.v1; + +import "cosmos/bank/v1beta1/bank.proto"; +import "gogoproto/gogo.proto"; +option go_package = "github.com/xrplevm/node/v9/types/legacy/evmos/erc20"; + +// Owner enumerates the ownership of a ERC20 contract. +enum Owner { + option (gogoproto.goproto_enum_prefix) = false; + // OWNER_UNSPECIFIED defines an invalid/undefined owner. + OWNER_UNSPECIFIED = 0; + // OWNER_MODULE - erc20 is owned by the erc20 module account. + OWNER_MODULE = 1; + // OWNER_EXTERNAL - erc20 is owned by an external account. + OWNER_EXTERNAL = 2; +} + +// TokenPair defines an instance that records a pairing consisting of a native +// Cosmos Coin and an ERC20 token address. +message TokenPair { + option (gogoproto.equal) = true; + // erc20_address is the hex address of ERC20 contract token + string erc20_address = 1; + // denom defines the cosmos base denomination to be mapped to + string denom = 2; + // enabled defines the token mapping enable status + bool enabled = 3; + // contract_owner is the an ENUM specifying the type of ERC20 owner (0 invalid, 1 ModuleAccount, 2 external address) + Owner contract_owner = 4; + // owner_address is the address of the current owner of the token + // Only set if contract_owner is OWNER_MODULE + string owner_address = 5; +} + +// protolint:disable MESSAGES_HAVE_COMMENT + +// Deprecated: RegisterCoinProposal is a gov Content type to register a token pair for a +// native Cosmos coin. We're keeping it to remove the existing proposals from +// store. After that, remove this message. +// NOTE: Keep this message for backwards compatibility on proposals query +message RegisterCoinProposal { + option (gogoproto.equal) = false; + // title of the proposal + string title = 1; + // description of the proposal + string description = 2; + // metadata slice of the native Cosmos coins + repeated cosmos.bank.v1beta1.Metadata metadata = 3 [(gogoproto.nullable) = false]; +} + +// Deprecated: ProposalMetadata is used to parse a slice of denom metadata and generate +// the RegisterCoinProposal content. We're keeping it to remove the existing proposals from +// store. After that, remove this message. +message ProposalMetadata { + // metadata slice of the native Cosmos coins + repeated cosmos.bank.v1beta1.Metadata metadata = 1 [(gogoproto.nullable) = false]; +} + +// Deprecated: RegisterERC20Proposal is a gov Content type to register a token pair for an +// ERC20 token. +// NOTE: Keep this message for backwards compatibility on proposals query +message RegisterERC20Proposal { + option (gogoproto.equal) = false; + // title of the proposal + string title = 1; + // description of the proposal + string description = 2; + // erc20addresses is a slice of ERC20 token contract addresses + repeated string erc20addresses = 3; +} + +// Deprecated: ToggleTokenConversionProposal is a gov Content type to toggle the conversion +// of a token pair. +// NOTE: Keep this message for backwards compatibility on proposals query +message ToggleTokenConversionProposal { + option (gogoproto.equal) = true; + // title of the proposal + string title = 1; + // description of the proposal + string description = 2; + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + string token = 3; +} diff --git a/proto/evmos/erc20/v1/events.proto b/proto/evmos/erc20/v1/events.proto new file mode 100644 index 0000000..c6c9529 --- /dev/null +++ b/proto/evmos/erc20/v1/events.proto @@ -0,0 +1,50 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package evmos.erc20.v1; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/evmos/erc20"; + +// EventRegisterPair is an event emitted when a coin is registered. +message EventRegisterPair { + // denom is the coin's denomination. + string denom = 1; + // erc20_address is the ERC20 contract address. + string erc20_address = 2; +} + +// EventToggleTokenConversion is an event emitted when a coin's token conversion is toggled. +message EventToggleTokenConversion { + // denom is the coin's denomination. + string denom = 1; + // erc20_address is the ERC20 contract address. + string erc20_address = 2; +} + +// EventConvertCoin is an event emitted when a coin is converted. +message EventConvertCoin { + // sender is the sender's address. + string sender = 1; + // receiver is the receiver's address. + string receiver = 2; + // amount is the amount of coins to be converted. + string amount = 3; + // denom is the coin's denomination. + string denom = 4; + // erc20_address is the ERC20 contract address. + string erc20_address = 5; +} + +// EventConvertERC20 is an event emitted when an ERC20 is converted. +message EventConvertERC20 { + // sender is the sender's address. + string sender = 1; + // receiver is the receiver's address. + string receiver = 2; + // amount is the amount of coins to be converted. + string amount = 3; + // denom is the coin's denomination. + string denom = 4; + // contract_address of an ERC20 token contract, that is registered in a token pair + string contract_address = 5; +} diff --git a/proto/evmos/erc20/v1/genesis.proto b/proto/evmos/erc20/v1/genesis.proto new file mode 100644 index 0000000..58f0851 --- /dev/null +++ b/proto/evmos/erc20/v1/genesis.proto @@ -0,0 +1,32 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package evmos.erc20.v1; + +import "amino/amino.proto"; +import "evmos/erc20/v1/erc20.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/evmos/erc20"; + +// GenesisState defines the module's genesis state. +message GenesisState { + // params are the erc20 module parameters at genesis + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // token_pairs is a slice of the registered token pairs at genesis + repeated TokenPair token_pairs = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// Params defines the erc20 module params +message Params { + // enable_erc20 is the parameter to enable the conversion of Cosmos coins <--> ERC20 tokens. + bool enable_erc20 = 1; + // enable_evm_hook is now depecrated + reserved 2; + // native_precompiles defines the slice of hex addresses of the + // active precompiles that are used to interact with native staking coins as ERC20s + repeated string native_precompiles = 3; + // dynamic_precompiles defines the slice of hex addresses of the + // active precompiles that are used to interact with Bank coins as ERC20s + repeated string dynamic_precompiles = 4; +} diff --git a/proto/evmos/erc20/v1/query.proto b/proto/evmos/erc20/v1/query.proto new file mode 100644 index 0000000..fa03727 --- /dev/null +++ b/proto/evmos/erc20/v1/query.proto @@ -0,0 +1,84 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package evmos.erc20.v1; + +import "amino/amino.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "evmos/erc20/v1/erc20.proto"; +import "evmos/erc20/v1/genesis.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/evmos/erc20"; + +// Query defines the gRPC querier service. +service Query { + // TokenPairs retrieves registered token pairs + rpc TokenPairs(QueryTokenPairsRequest) returns (QueryTokenPairsResponse) { + option (google.api.http).get = "/evmos/erc20/v1/token_pairs"; + } + + // TokenPair retrieves a registered token pair + rpc TokenPair(QueryTokenPairRequest) returns (QueryTokenPairResponse) { + option (google.api.http).get = "/evmos/erc20/v1/token_pairs/{token}"; + } + + // Params retrieves the erc20 module params + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/evmos/erc20/v1/params"; + } + + // OwnerAddress retrieves the owner address for a given ERC20 contract address + rpc OwnerAddress(QueryOwnerAddressRequest) returns (QueryOwnerAddressResponse) { + option (google.api.http).get = "/evmos/erc20/v1/owner_address/{contract_address}"; + } +} + +// QueryTokenPairsRequest is the request type for the Query/TokenPairs RPC +// method. +message QueryTokenPairsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryTokenPairsResponse is the response type for the Query/TokenPairs RPC +// method. +message QueryTokenPairsResponse { + // token_pairs is a slice of registered token pairs for the erc20 module + repeated TokenPair token_pairs = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTokenPairRequest is the request type for the Query/TokenPair RPC method. +message QueryTokenPairRequest { + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + string token = 1; +} + +// QueryTokenPairResponse is the response type for the Query/TokenPair RPC +// method. +message QueryTokenPairResponse { + // token_pairs returns the info about a registered token pair for the erc20 module + TokenPair token_pair = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC +// method. +message QueryParamsResponse { + // params are the erc20 module parameters + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +message QueryOwnerAddressRequest { + string contract_address = 1; +} + +message QueryOwnerAddressResponse { + string owner_address = 1; +} diff --git a/proto/evmos/erc20/v1/tx.proto b/proto/evmos/erc20/v1/tx.proto new file mode 100644 index 0000000..05db419 --- /dev/null +++ b/proto/evmos/erc20/v1/tx.proto @@ -0,0 +1,176 @@ +// Copyright Tharsis Labs Ltd.(Evmos) +// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) +syntax = "proto3"; +package evmos.erc20.v1; + +import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "evmos/erc20/v1/genesis.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/xrplevm/node/v9/types/legacy/evmos/erc20"; + +// Msg defines the erc20 Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + // ConvertERC20 mints a native Cosmos coin representation of the ERC20 token + // contract that is registered on the token mapping. + rpc ConvertERC20(MsgConvertERC20) returns (MsgConvertERC20Response) { + option (google.api.http).get = "/evmos/erc20/v1/tx/convert_erc20"; + }; + // UpdateParams defines a governance operation for updating the x/erc20 module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + + // TransferContractOwnership defines a Msg to transfer the ownership of the ERC20 token pair to the new owner + rpc TransferContractOwnership(MsgTransferOwnership) returns (MsgTransferOwnershipResponse); + + // Mint mints ERC20 tokens + rpc Mint(MsgMint) returns (MsgMintResponse) { + option (google.api.http).post = "/evmos/erc20/v1/tx/mint"; + }; + // Burn burns ERC20 tokens + rpc Burn(MsgBurn) returns (MsgBurnResponse) { + option (google.api.http).post = "/evmos/erc20/v1/tx/burn"; + }; + + // RegisterERC20 defines a governance operation for registering a token pair for the specified erc20 contract. + // The authority is hard-coded to the Cosmos SDK x/gov module account + rpc RegisterERC20(MsgRegisterERC20) returns (MsgRegisterERC20Response); + // ToggleConversion defines a governance operation for enabling/disablen a token pair conversion. + // The authority is hard-coded to the Cosmos SDK x/gov module account + rpc ToggleConversion(MsgToggleConversion) returns (MsgToggleConversionResponse); +} + +// MsgConvertERC20 defines a Msg to convert a ERC20 token to a native Cosmos +// coin. +message MsgConvertERC20 { + option (amino.name) = "evmos/MsgConvertERC20"; + option (cosmos.msg.v1.signer) = "sender"; + // contract_address of an ERC20 token contract, that is registered in a token pair + string contract_address = 1; + // amount of ERC20 tokens to convert + string amount = 2 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // receiver is the bech32 address to receive native Cosmos coins + string receiver = 3; + // sender is the hex address from the owner of the given ERC20 tokens + string sender = 4; +} + +// MsgConvertERC20Response returns no fields +message MsgConvertERC20Response {} + +// MsgConvertCoin defines a Msg to convert a native Cosmos coin to a ERC20 token +message MsgConvertCoin { + // coin is a Cosmos coin whose denomination is registered in a token pair. The coin + // amount defines the amount of coins to convert. + cosmos.base.v1beta1.Coin coin = 1 [(gogoproto.nullable) = false]; + // receiver is the hex address to receive ERC20 token + string receiver = 2; + // sender is the cosmos bech32 address from the owner of the given Cosmos coins + string sender = 3; +} + +// MsgConvertCoinResponse returns no fields +message MsgConvertCoinResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type for Erc20 parameters. +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (amino.name) = "evmos/x/erc20/MsgUpdateParams"; + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/evm parameters to update. + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} + +// MsgTransferOwnership defines a Msg to transfer the ownership of the ERC20 token pair to the new owner +message MsgTransferOwnership { + option (cosmos.msg.v1.signer) = "authority"; + + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + string token = 2; + // new_owner is the hex address of the new owner + string new_owner = 3; +} + +// MsgTransferOwnershipResponse returns no fields +message MsgTransferOwnershipResponse {} + +// MsgMint defines a Msg to mint ERC20 tokens +message MsgMint { + option (cosmos.msg.v1.signer) = "sender"; + // contract_address of an ERC20 token contract, that is registered in a token pair + string contract_address = 1; + // amount of ERC20 tokens to mint + string amount = 2 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; + // to is the address to mint the tokens to + string to = 3; + // sender is the address of the sender + string sender = 4; +} + +message MsgMintResponse {} + +// MsgBurn defines a Msg to burn ERC20 tokens +message MsgBurn { + option (cosmos.msg.v1.signer) = "sender"; + // contract_address of an ERC20 token contract, that is registered in a token pair + string contract_address = 1; + // amount of ERC20 tokens to burn + string amount = 2 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; + // sender is the address of the sender + string sender = 3; +} + +message MsgBurnResponse {} + +// MsgRegisterERC20 is the Msg/RegisterERC20 request type for registering +// an Erc20 contract token pair. +message MsgRegisterERC20 { + option (amino.name) = "evmos/x/erc20/MsgRegisterERC20"; + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // erc20addresses is a slice of ERC20 token contract hex addresses + repeated string erc20addresses = 2; +} + +// MsgRegisterERC20Response defines the response structure for executing a +// MsgRegisterERC20 message. +message MsgRegisterERC20Response {} + +// MsgToggleConversion is the Msg/MsgToggleConversion request type for toggling +// an Erc20 contract conversion capability. +message MsgToggleConversion { + option (amino.name) = "evmos/x/erc20/MsgToggleConversion"; + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + string token = 2; +} + +// MsgToggleConversionResponse defines the response structure for executing a +// ToggleConversion message. +message MsgToggleConversionResponse {} diff --git a/proto/packages/blockchain/poa/genesis.proto b/proto/packages/blockchain/poa/genesis.proto new file mode 100644 index 0000000..d689372 --- /dev/null +++ b/proto/packages/blockchain/poa/genesis.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +package packages.blockchain.poa; + +import "gogoproto/gogo.proto"; +import "packages/blockchain/poa/params.proto"; + +option go_package = "github.com/xrplevm/node/v9/x/poa/types/legacy"; + +// GenesisState defines the poa module's genesis state. +message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/packages/blockchain/poa/params.proto b/proto/packages/blockchain/poa/params.proto new file mode 100644 index 0000000..edd2488 --- /dev/null +++ b/proto/packages/blockchain/poa/params.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; +package packages.blockchain.poa; + +option go_package = "github.com/xrplevm/node/v9/x/poa/types/legacy"; + +// Params defines the parameters for the module. +message Params {} \ No newline at end of file diff --git a/proto/packages/blockchain/poa/query.proto b/proto/packages/blockchain/poa/query.proto new file mode 100644 index 0000000..68ebd26 --- /dev/null +++ b/proto/packages/blockchain/poa/query.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package packages.blockchain.poa; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "packages/blockchain/poa/params.proto"; + +option go_package = "github.com/xrplevm/node/v9/x/poa/types/legacy"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/exrp/poa/params"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [ (gogoproto.nullable) = false ]; +} \ No newline at end of file diff --git a/proto/packages/blockchain/poa/tx.proto b/proto/packages/blockchain/poa/tx.proto new file mode 100644 index 0000000..b09e3da --- /dev/null +++ b/proto/packages/blockchain/poa/tx.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package packages.blockchain.poa; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos/staking/v1beta1/staking.proto"; +import "google/protobuf/any.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/xrplevm/node/v9/x/poa/types/legacy"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // Adds a new validator into the authority + rpc AddValidator(MsgAddValidator) returns (MsgAddValidatorResponse); + // Removes an existing validator from the authority + rpc RemoveValidator(MsgRemoveValidator) returns (MsgRemoveValidatorResponse); +} + +// MsgAddValidator defines a message for adding a new validator +message MsgAddValidator { + option (cosmos.msg.v1.signer) = "authority"; + + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string validator_address = 2 + [ (amino.dont_omitempty) = false, (cosmos_proto.scalar) = "cosmos.AddressString" ]; + cosmos.staking.v1beta1.Description description = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + google.protobuf.Any pubkey = 4 + [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ]; +} +// MsgAddValidatorResponse defines the response for adding a new validator +message MsgAddValidatorResponse {} + +// MsgRemoveValidator defines a message for removing an existing validator +message MsgRemoveValidator { + option (cosmos.msg.v1.signer) = "authority"; + + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string validator_address = 2 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} +// MsgRemoveValidatorResponse defines the response for removing an existing +// validator +message MsgRemoveValidatorResponse {} \ No newline at end of file diff --git a/state_sync.sh b/state_sync.sh new file mode 100755 index 0000000..cf9d982 --- /dev/null +++ b/state_sync.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +SNAP_RPC="https://xrp-testnet-rpc.polkachu.com:443" + +LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \ +BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \ +TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) + +sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \ +s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \ +s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \ +s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.exrpd/config/config.toml \ No newline at end of file diff --git a/types/legacy/ethermint/evm/storage.go b/types/legacy/ethermint/evm/storage.go new file mode 100644 index 0000000..68a00b0 --- /dev/null +++ b/types/legacy/ethermint/evm/storage.go @@ -0,0 +1,5 @@ +package evm + +type Storage []State + +type AccessList []AccessTuple diff --git a/app/upgrades/v9/legacy/types/account.go b/types/legacy/ethermint/types/account.go similarity index 98% rename from app/upgrades/v9/legacy/types/account.go rename to types/legacy/ethermint/types/account.go index 3f7f418..9163020 100644 --- a/app/upgrades/v9/legacy/types/account.go +++ b/types/legacy/ethermint/types/account.go @@ -1,4 +1,3 @@ -// Copyright Tharsis Labs Ltd.(Evmos) // SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) package types diff --git a/x/poa/types/genesis.pb.go b/x/poa/types/genesis.pb.go index b8659e8..4a9cd60 100644 --- a/x/poa/types/genesis.pb.go +++ b/x/poa/types/genesis.pb.go @@ -85,9 +85,9 @@ var fileDescriptor_5c9d5a9eb5268c7b = []byte{ 0x3c, 0x43, 0x10, 0x54, 0x81, 0x93, 0xc3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xa9, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x57, 0x14, 0x15, - 0xe4, 0xa4, 0x96, 0xe5, 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0xea, 0x97, 0x99, 0xe9, 0x57, 0xe8, 0x83, + 0xe4, 0xa4, 0x96, 0xe5, 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0xea, 0x97, 0x59, 0xea, 0x57, 0xe8, 0x83, 0xdc, 0x50, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0x83, 0x31, 0x20, 0x00, 0x00, 0xff, - 0xff, 0x67, 0x42, 0x12, 0x9e, 0xc5, 0x00, 0x00, 0x00, + 0xff, 0x49, 0xcd, 0x07, 0xd2, 0xc5, 0x00, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/poa/types/params.pb.go b/x/poa/types/params.pb.go index 40916dc..0fb5242 100644 --- a/x/poa/types/params.pb.go +++ b/x/poa/types/params.pb.go @@ -72,9 +72,9 @@ var fileDescriptor_bff14b3f5bf0d33e = []byte{ 0x4f, 0x54, 0xe2, 0xe0, 0x62, 0x0b, 0x00, 0x0b, 0x3a, 0x39, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x5a, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, - 0x7e, 0x45, 0x51, 0x41, 0x4e, 0x6a, 0x59, 0xae, 0x7e, 0x5e, 0x7e, 0x4a, 0xaa, 0x7e, 0x99, 0x99, + 0x7e, 0x45, 0x51, 0x41, 0x4e, 0x6a, 0x59, 0xae, 0x7e, 0x5e, 0x7e, 0x4a, 0xaa, 0x7e, 0x99, 0xa5, 0x7e, 0x85, 0x3e, 0xc8, 0xdc, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xb9, 0xc6, 0x80, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x64, 0x65, 0xda, 0x6b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xeb, 0x70, 0x96, 0x6b, 0x00, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/poa/types/query.pb.go b/x/poa/types/query.pb.go index 219415e..5ad3842 100644 --- a/x/poa/types/query.pb.go +++ b/x/poa/types/query.pb.go @@ -135,9 +135,9 @@ var fileDescriptor_9a9dd27e9dc4e2f4 = []byte{ 0x6a, 0x45, 0x51, 0x81, 0x3e, 0xc2, 0xf5, 0x4e, 0x0e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x96, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, - 0x51, 0x54, 0x90, 0x93, 0x5a, 0x96, 0xab, 0x9f, 0x97, 0x9f, 0x92, 0xaa, 0x5f, 0x66, 0xa6, 0x5f, + 0x51, 0x54, 0x90, 0x93, 0x5a, 0x96, 0xab, 0x9f, 0x97, 0x9f, 0x92, 0xaa, 0x5f, 0x66, 0xa9, 0x5f, 0x01, 0x36, 0xa2, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x00, 0xc6, 0x80, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xdc, 0xea, 0xf6, 0x23, 0x5e, 0x01, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xf2, 0x65, 0xe3, 0x6f, 0x5e, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/poa/types/tx.pb.go b/x/poa/types/tx.pb.go index ce3fca4..ecedb15 100644 --- a/x/poa/types/tx.pb.go +++ b/x/poa/types/tx.pb.go @@ -241,37 +241,37 @@ func init() { proto.RegisterFile("poa/tx.proto", fileDescriptor_8ac16a0aed23c2e2 var fileDescriptor_8ac16a0aed23c2e2 = []byte{ // 492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0xed, 0x06, 0x2a, 0xe5, 0x5a, 0x51, 0x6a, 0x45, 0x8a, 0x6b, 0x15, 0xb7, 0x0a, 0x08, - 0x55, 0x95, 0xb8, 0x53, 0x8b, 0xd4, 0x81, 0x89, 0x58, 0xc0, 0x40, 0x15, 0xa9, 0x32, 0x12, 0x03, - 0x4b, 0x75, 0x8e, 0x8f, 0xab, 0xd5, 0xd8, 0xef, 0xc9, 0x77, 0xb6, 0xe2, 0x0d, 0xf1, 0x09, 0xf8, - 0x02, 0x4c, 0x2c, 0x8c, 0x1d, 0xd8, 0x59, 0x2b, 0xa6, 0x8a, 0x89, 0x09, 0xa1, 0x64, 0xe8, 0xd7, - 0x40, 0xfe, 0x73, 0x04, 0x12, 0x32, 0x75, 0x49, 0xfc, 0xde, 0xef, 0x7d, 0x1e, 0xbd, 0xef, 0xe3, - 0x33, 0x5a, 0x17, 0x40, 0x89, 0x1a, 0x63, 0x91, 0x82, 0x02, 0xab, 0x25, 0x80, 0x3a, 0x1d, 0x0e, - 0x1c, 0xaa, 0x9a, 0x94, 0x4f, 0x35, 0x72, 0xb6, 0x86, 0x20, 0x63, 0x90, 0xa7, 0x35, 0xa8, 0x8b, - 0x06, 0x75, 0xeb, 0x8a, 0xc4, 0x92, 0x93, 0xfc, 0xa0, 0xfc, 0x6b, 0xc0, 0x83, 0x06, 0x48, 0x45, - 0xcf, 0xa3, 0xa4, 0x84, 0x01, 0x53, 0xf4, 0x40, 0xd7, 0xda, 0x99, 0x03, 0xf0, 0x11, 0x23, 0x55, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4f, 0x6b, 0xd4, 0x40, + 0x18, 0xc6, 0x93, 0xae, 0x16, 0x76, 0x5a, 0xac, 0x0d, 0x0b, 0x9b, 0x86, 0x9a, 0x96, 0x55, 0xa4, + 0x14, 0x9c, 0xa1, 0x15, 0x04, 0x3d, 0xb9, 0x41, 0x3d, 0x58, 0x16, 0x4a, 0x04, 0x0f, 0x5e, 0xca, + 0x64, 0x33, 0x4e, 0x43, 0x37, 0x79, 0x87, 0xcc, 0x24, 0x6c, 0x6e, 0xe2, 0x27, 0xf0, 0x0b, 0x78, + 0xf2, 0xe2, 0xb1, 0x07, 0xef, 0x5e, 0x8b, 0xa7, 0xe2, 0xc9, 0x93, 0xc8, 0xee, 0xa1, 0x5f, 0x43, + 0xf2, 0x67, 0x5c, 0xdd, 0x75, 0x4f, 0xbd, 0xec, 0xe6, 0x9d, 0xdf, 0xfb, 0x3c, 0xbc, 0xef, 0x93, + 0x09, 0x5a, 0x17, 0x40, 0x89, 0x1a, 0x63, 0x91, 0x82, 0x02, 0xab, 0x25, 0x80, 0x3a, 0x1d, 0x0e, + 0x1c, 0xaa, 0x9a, 0x94, 0x4f, 0x35, 0x72, 0xb6, 0x86, 0x20, 0x63, 0x90, 0x27, 0x35, 0xa8, 0x8b, + 0x06, 0x75, 0xeb, 0x8a, 0xc4, 0x92, 0x93, 0xfc, 0xa0, 0xfc, 0x6b, 0xc0, 0xbd, 0x06, 0x48, 0x45, + 0xcf, 0xa2, 0xa4, 0x84, 0x01, 0x53, 0xf4, 0x40, 0xd7, 0xda, 0x99, 0x03, 0xf0, 0x11, 0x23, 0x55, 0x15, 0x64, 0x6f, 0x09, 0x4d, 0x8a, 0x06, 0x6d, 0xd2, 0x38, 0x4a, 0x80, 0x54, 0xbf, 0xf5, 0x51, 0xef, 0xeb, 0x0a, 0xda, 0x18, 0x48, 0xde, 0x0f, 0xc3, 0xd7, 0x74, 0x14, 0x85, 0x54, 0x41, 0x6a, - 0x1d, 0xa1, 0x36, 0xcd, 0xd4, 0x19, 0xa4, 0x91, 0x2a, 0x6c, 0x73, 0xd7, 0xdc, 0x6b, 0x7b, 0xf6, - 0xf7, 0x2f, 0x8f, 0x3a, 0xcd, 0x94, 0xfd, 0x30, 0x4c, 0x99, 0x94, 0xaf, 0x54, 0x1a, 0x25, 0xdc, - 0x9f, 0xb5, 0x5a, 0x2f, 0xd1, 0x66, 0xae, 0x4d, 0x4e, 0x69, 0xdd, 0x65, 0xaf, 0x54, 0xfa, 0x7b, - 0xcb, 0xf4, 0x9f, 0xaf, 0x2f, 0xf6, 0x0d, 0xff, 0xee, 0x1f, 0x5d, 0x03, 0xad, 0x13, 0xb4, 0x16, - 0x32, 0x39, 0x4c, 0x23, 0xa1, 0x22, 0x48, 0xec, 0xd6, 0xae, 0xb9, 0xb7, 0x76, 0x78, 0x1f, 0x37, - 0x16, 0x7a, 0xe3, 0x26, 0x01, 0xfc, 0x6c, 0xd6, 0xea, 0xb5, 0x2f, 0x7f, 0xee, 0x18, 0xa5, 0xad, - 0xe9, 0xff, 0x6d, 0x61, 0xbd, 0x40, 0xab, 0x22, 0x0b, 0xce, 0x59, 0x61, 0xdf, 0xaa, 0xcc, 0x3a, - 0xb8, 0x0e, 0x0a, 0xeb, 0xa0, 0x70, 0x3f, 0x29, 0x3c, 0xfb, 0xdb, 0x6c, 0xd0, 0x61, 0x5a, 0x08, - 0x05, 0xf8, 0x24, 0x0b, 0x8e, 0x59, 0xe1, 0x37, 0xea, 0x27, 0x77, 0xde, 0x5f, 0x5f, 0xec, 0xcf, - 0xb6, 0xee, 0x6d, 0xa1, 0xee, 0x5c, 0x80, 0x3e, 0x93, 0x02, 0x12, 0xc9, 0x7a, 0x9f, 0x4c, 0x64, - 0x0d, 0x24, 0xf7, 0x59, 0x0c, 0x39, 0xbb, 0x79, 0xbe, 0xcf, 0x97, 0xe7, 0xbb, 0x5c, 0xbf, 0x10, - 0xed, 0xc2, 0x02, 0xdb, 0xc8, 0x59, 0x1c, 0x52, 0xef, 0x70, 0xf8, 0xd1, 0x44, 0xad, 0x81, 0xe4, - 0x96, 0x87, 0xd6, 0xff, 0xb9, 0x24, 0x1d, 0x2c, 0x80, 0xe2, 0xb9, 0xcd, 0x9d, 0xed, 0xff, 0x9d, - 0x6a, 0x2f, 0xeb, 0x18, 0x6d, 0xcc, 0x67, 0xd1, 0xd5, 0x82, 0x39, 0xe0, 0xec, 0x2c, 0x01, 0xda, - 0xcc, 0xb9, 0xfd, 0xae, 0x7c, 0xc7, 0xde, 0xd3, 0xcb, 0x89, 0x6b, 0x5e, 0x4d, 0x5c, 0xf3, 0xd7, - 0xc4, 0x35, 0x3f, 0x4c, 0x5d, 0xe3, 0x6a, 0xea, 0x1a, 0x3f, 0xa6, 0xae, 0xf1, 0xe6, 0x21, 0x8f, - 0xd4, 0x59, 0x16, 0xe0, 0x21, 0xc4, 0x64, 0x9c, 0x8a, 0x11, 0xcb, 0x63, 0x92, 0x40, 0xc8, 0x48, - 0x7e, 0x44, 0xc6, 0xa4, 0xfa, 0x50, 0x0b, 0xc1, 0x64, 0xb0, 0x5a, 0x5d, 0x80, 0xc7, 0xbf, 0x03, - 0x00, 0x00, 0xff, 0xff, 0x78, 0x18, 0xa3, 0x73, 0xbc, 0x03, 0x00, 0x00, + 0x3d, 0x42, 0x6d, 0x9a, 0xa9, 0x53, 0x48, 0x23, 0x55, 0xd8, 0xe6, 0xae, 0xb9, 0xd7, 0xf6, 0xec, + 0xef, 0x5f, 0x1e, 0x74, 0x9a, 0x29, 0xfb, 0x61, 0x98, 0x32, 0x29, 0x5f, 0xa9, 0x34, 0x4a, 0xb8, + 0x3f, 0x6b, 0xb5, 0x5e, 0xa2, 0xcd, 0x5c, 0x9b, 0x9c, 0xd0, 0xba, 0xcb, 0x5e, 0xa9, 0xf4, 0x77, + 0x96, 0xe9, 0x3f, 0x5f, 0x9d, 0xef, 0x1b, 0xfe, 0xed, 0x3f, 0xba, 0x06, 0x5a, 0xc7, 0x68, 0x2d, + 0x64, 0x72, 0x98, 0x46, 0x42, 0x45, 0x90, 0xd8, 0xad, 0x5d, 0x73, 0x6f, 0xed, 0xf0, 0x2e, 0x6e, + 0x2c, 0xf4, 0xc6, 0x4d, 0x02, 0xf8, 0xd9, 0xac, 0xd5, 0x6b, 0x5f, 0xfc, 0xdc, 0x31, 0x4a, 0x5b, + 0xd3, 0xff, 0xdb, 0xc2, 0x7a, 0x81, 0x56, 0x45, 0x16, 0x9c, 0xb1, 0xc2, 0xbe, 0x51, 0x99, 0x75, + 0x70, 0x1d, 0x14, 0xd6, 0x41, 0xe1, 0x7e, 0x52, 0x78, 0xf6, 0xb7, 0xd9, 0xa0, 0xc3, 0xb4, 0x10, + 0x0a, 0xf0, 0x71, 0x16, 0x1c, 0xb1, 0xc2, 0x6f, 0xd4, 0x4f, 0x6e, 0xbd, 0xbf, 0x3a, 0xdf, 0x9f, + 0x6d, 0xdd, 0xdb, 0x42, 0xdd, 0xb9, 0x00, 0x7d, 0x26, 0x05, 0x24, 0x92, 0xf5, 0x3e, 0x99, 0xc8, + 0x1a, 0x48, 0xee, 0xb3, 0x18, 0x72, 0x76, 0xfd, 0x7c, 0x9f, 0x2f, 0xcf, 0x77, 0xb9, 0x7e, 0x21, + 0xda, 0x85, 0x05, 0xb6, 0x91, 0xb3, 0x38, 0xa4, 0xde, 0xe1, 0xf0, 0xa3, 0x89, 0x5a, 0x03, 0xc9, + 0x2d, 0x0f, 0xad, 0xff, 0x73, 0x49, 0x3a, 0x58, 0x00, 0xc5, 0x73, 0x9b, 0x3b, 0xdb, 0xff, 0x3b, + 0xd5, 0x5e, 0xd6, 0x11, 0xda, 0x98, 0xcf, 0xa2, 0xab, 0x05, 0x73, 0xc0, 0xd9, 0x59, 0x02, 0xb4, + 0x99, 0x73, 0xf3, 0x5d, 0xf9, 0x8e, 0xbd, 0xa7, 0x17, 0x13, 0xd7, 0xbc, 0x9c, 0xb8, 0xe6, 0xaf, + 0x89, 0x6b, 0x7e, 0x98, 0xba, 0xc6, 0xe5, 0xd4, 0x35, 0x7e, 0x4c, 0x5d, 0xe3, 0xcd, 0x7d, 0x1e, + 0xa9, 0xd3, 0x2c, 0xc0, 0x43, 0x88, 0xc9, 0x38, 0x15, 0x23, 0x96, 0xc7, 0x24, 0x81, 0x90, 0x91, + 0xfc, 0x31, 0x19, 0x93, 0xea, 0x43, 0x2d, 0x04, 0x93, 0xc1, 0x6a, 0x75, 0x01, 0x1e, 0xfe, 0x0e, + 0x00, 0x00, 0xff, 0xff, 0x56, 0x97, 0xb6, 0x3f, 0xbc, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 2c58ffd498bae81fe0cdeb022a8f34fb5f3be4b3 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 19 Sep 2025 15:29:23 +0200 Subject: [PATCH 63/66] fix(app): remove exported interface implementations registration --- app/encoding.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/encoding.go b/app/encoding.go index 1e4b52f..814797b 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,10 +3,6 @@ package app import ( "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec/address" - v7 "github.com/cosmos/ibc-go/v10/modules/core/02-client/migrations/v7" - "github.com/cosmos/ibc-go/v10/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v10/modules/light-clients/06-solomachine" - tendermint "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" legacytypes "github.com/xrplevm/node/v9/types/legacy/ethermint/types" amino "github.com/cosmos/cosmos-sdk/codec" @@ -49,18 +45,6 @@ func MakeEncodingConfig(evmChainID uint64) sdktestutil.TestEncodingConfig { SigningOptions: signingOptions, }) - interfaceRegistry.RegisterImplementations((*exported.ClientState)(nil), - &solomachine.ClientState{}, - &tendermint.ClientState{}, - &v7.ClientState{}, - ) - - interfaceRegistry.RegisterImplementations((*exported.ConsensusState)(nil), - &solomachine.ConsensusState{}, - &tendermint.ConsensusState{}, - &v7.ConsensusState{}, - ) - interfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), &poalegacytypes.MsgAddValidator{}, &poalegacytypes.MsgRemoveValidator{}, From 945ea1eb2048946f0f187c4a8123ded514f003eb Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 19 Sep 2025 15:33:13 +0200 Subject: [PATCH 64/66] feat(types): add legacy evmos types --- types/legacy/ethermint/evm/events.pb.go | 1266 ++++ types/legacy/ethermint/evm/evm.pb.go | 4586 +++++++++++++ types/legacy/ethermint/evm/genesis.pb.go | 683 ++ types/legacy/ethermint/evm/query.pb.go | 6103 +++++++++++++++++ types/legacy/ethermint/evm/query.pb.gw.go | 1178 ++++ types/legacy/ethermint/evm/tx.pb.go | 3270 +++++++++ types/legacy/ethermint/evm/tx.pb.gw.go | 171 + types/legacy/ethermint/feemarket/events.pb.go | 547 ++ .../ethermint/feemarket/feemarket.pb.go | 585 ++ .../legacy/ethermint/feemarket/genesis.pb.go | 367 + types/legacy/ethermint/feemarket/query.pb.go | 1199 ++++ .../legacy/ethermint/feemarket/query.pb.gw.go | 283 + types/legacy/ethermint/feemarket/tx.pb.go | 599 ++ types/legacy/ethermint/types/account.pb.go | 377 + .../legacy/ethermint/types/dynamic_fee.pb.go | 324 + types/legacy/ethermint/types/indexer.pb.go | 487 ++ types/legacy/ethermint/types/web3.pb.go | 400 ++ types/legacy/evmos/erc20/erc20.pb.go | 1660 +++++ types/legacy/evmos/erc20/events.pb.go | 1363 ++++ types/legacy/evmos/erc20/genesis.pb.go | 671 ++ types/legacy/evmos/erc20/query.pb.go | 1788 +++++ types/legacy/evmos/erc20/query.pb.gw.go | 438 ++ types/legacy/evmos/erc20/tx.pb.go | 3643 ++++++++++ types/legacy/evmos/erc20/tx.pb.gw.go | 337 + x/poa/types/legacy/genesis.pb.go | 324 + x/poa/types/legacy/params.pb.go | 266 + x/poa/types/legacy/query.pb.go | 538 ++ x/poa/types/legacy/query.pb.gw.go | 153 + x/poa/types/legacy/tx.pb.go | 1096 +++ 29 files changed, 34702 insertions(+) create mode 100644 types/legacy/ethermint/evm/events.pb.go create mode 100644 types/legacy/ethermint/evm/evm.pb.go create mode 100644 types/legacy/ethermint/evm/genesis.pb.go create mode 100644 types/legacy/ethermint/evm/query.pb.go create mode 100644 types/legacy/ethermint/evm/query.pb.gw.go create mode 100644 types/legacy/ethermint/evm/tx.pb.go create mode 100644 types/legacy/ethermint/evm/tx.pb.gw.go create mode 100644 types/legacy/ethermint/feemarket/events.pb.go create mode 100644 types/legacy/ethermint/feemarket/feemarket.pb.go create mode 100644 types/legacy/ethermint/feemarket/genesis.pb.go create mode 100644 types/legacy/ethermint/feemarket/query.pb.go create mode 100644 types/legacy/ethermint/feemarket/query.pb.gw.go create mode 100644 types/legacy/ethermint/feemarket/tx.pb.go create mode 100644 types/legacy/ethermint/types/account.pb.go create mode 100644 types/legacy/ethermint/types/dynamic_fee.pb.go create mode 100644 types/legacy/ethermint/types/indexer.pb.go create mode 100644 types/legacy/ethermint/types/web3.pb.go create mode 100644 types/legacy/evmos/erc20/erc20.pb.go create mode 100644 types/legacy/evmos/erc20/events.pb.go create mode 100644 types/legacy/evmos/erc20/genesis.pb.go create mode 100644 types/legacy/evmos/erc20/query.pb.go create mode 100644 types/legacy/evmos/erc20/query.pb.gw.go create mode 100644 types/legacy/evmos/erc20/tx.pb.go create mode 100644 types/legacy/evmos/erc20/tx.pb.gw.go create mode 100644 x/poa/types/legacy/genesis.pb.go create mode 100644 x/poa/types/legacy/params.pb.go create mode 100644 x/poa/types/legacy/query.pb.go create mode 100644 x/poa/types/legacy/query.pb.gw.go create mode 100644 x/poa/types/legacy/tx.pb.go diff --git a/types/legacy/ethermint/evm/events.pb.go b/types/legacy/ethermint/evm/events.pb.go new file mode 100644 index 0000000..bee5357 --- /dev/null +++ b/types/legacy/ethermint/evm/events.pb.go @@ -0,0 +1,1266 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/events.proto + +package evm + +import ( + fmt "fmt" + 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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventEthereumTx defines the event for an Ethereum transaction +type EventEthereumTx struct { + // amount + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // eth_hash is the Ethereum hash of the transaction + EthHash string `protobuf:"bytes,2,opt,name=eth_hash,json=ethHash,proto3" json:"eth_hash,omitempty"` + // index of the transaction in the block + Index string `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"` + // gas_used is the amount of gas used by the transaction + GasUsed string `protobuf:"bytes,4,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + // hash is the Tendermint hash of the transaction + Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` + // recipient of the transaction + Recipient string `protobuf:"bytes,6,opt,name=recipient,proto3" json:"recipient,omitempty"` + // eth_tx_failed contains a VM error should it occur + EthTxFailed string `protobuf:"bytes,7,opt,name=eth_tx_failed,json=ethTxFailed,proto3" json:"eth_tx_failed,omitempty"` +} + +func (m *EventEthereumTx) Reset() { *m = EventEthereumTx{} } +func (m *EventEthereumTx) String() string { return proto.CompactTextString(m) } +func (*EventEthereumTx) ProtoMessage() {} +func (*EventEthereumTx) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{0} +} +func (m *EventEthereumTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventEthereumTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventEthereumTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventEthereumTx.Merge(m, src) +} +func (m *EventEthereumTx) XXX_Size() int { + return m.Size() +} +func (m *EventEthereumTx) XXX_DiscardUnknown() { + xxx_messageInfo_EventEthereumTx.DiscardUnknown(m) +} + +var xxx_messageInfo_EventEthereumTx proto.InternalMessageInfo + +func (m *EventEthereumTx) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func (m *EventEthereumTx) GetEthHash() string { + if m != nil { + return m.EthHash + } + return "" +} + +func (m *EventEthereumTx) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +func (m *EventEthereumTx) GetGasUsed() string { + if m != nil { + return m.GasUsed + } + return "" +} + +func (m *EventEthereumTx) GetHash() string { + if m != nil { + return m.Hash + } + return "" +} + +func (m *EventEthereumTx) GetRecipient() string { + if m != nil { + return m.Recipient + } + return "" +} + +func (m *EventEthereumTx) GetEthTxFailed() string { + if m != nil { + return m.EthTxFailed + } + return "" +} + +// EventTxLog defines the event for an Ethereum transaction log +type EventTxLog struct { + // tx_logs is an array of transaction logs + TxLogs []string `protobuf:"bytes,1,rep,name=tx_logs,json=txLogs,proto3" json:"tx_logs,omitempty"` +} + +func (m *EventTxLog) Reset() { *m = EventTxLog{} } +func (m *EventTxLog) String() string { return proto.CompactTextString(m) } +func (*EventTxLog) ProtoMessage() {} +func (*EventTxLog) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{1} +} +func (m *EventTxLog) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTxLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTxLog.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventTxLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTxLog.Merge(m, src) +} +func (m *EventTxLog) XXX_Size() int { + return m.Size() +} +func (m *EventTxLog) XXX_DiscardUnknown() { + xxx_messageInfo_EventTxLog.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTxLog proto.InternalMessageInfo + +func (m *EventTxLog) GetTxLogs() []string { + if m != nil { + return m.TxLogs + } + return nil +} + +// EventMessage +type EventMessage struct { + // module which emits the event + Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` + // sender of the message + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // tx_type is the type of the message + TxType string `protobuf:"bytes,3,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty"` +} + +func (m *EventMessage) Reset() { *m = EventMessage{} } +func (m *EventMessage) String() string { return proto.CompactTextString(m) } +func (*EventMessage) ProtoMessage() {} +func (*EventMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{2} +} +func (m *EventMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventMessage.Merge(m, src) +} +func (m *EventMessage) XXX_Size() int { + return m.Size() +} +func (m *EventMessage) XXX_DiscardUnknown() { + xxx_messageInfo_EventMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_EventMessage proto.InternalMessageInfo + +func (m *EventMessage) GetModule() string { + if m != nil { + return m.Module + } + return "" +} + +func (m *EventMessage) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventMessage) GetTxType() string { + if m != nil { + return m.TxType + } + return "" +} + +// EventBlockBloom defines an Ethereum block bloom filter event +type EventBlockBloom struct { + // bloom is the bloom filter of the block + Bloom string `protobuf:"bytes,1,opt,name=bloom,proto3" json:"bloom,omitempty"` +} + +func (m *EventBlockBloom) Reset() { *m = EventBlockBloom{} } +func (m *EventBlockBloom) String() string { return proto.CompactTextString(m) } +func (*EventBlockBloom) ProtoMessage() {} +func (*EventBlockBloom) Descriptor() ([]byte, []int) { + return fileDescriptor_432e0d592184bde3, []int{3} +} +func (m *EventBlockBloom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlockBloom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlockBloom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlockBloom) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlockBloom.Merge(m, src) +} +func (m *EventBlockBloom) XXX_Size() int { + return m.Size() +} +func (m *EventBlockBloom) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlockBloom.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlockBloom proto.InternalMessageInfo + +func (m *EventBlockBloom) GetBloom() string { + if m != nil { + return m.Bloom + } + return "" +} + +func init() { + proto.RegisterType((*EventEthereumTx)(nil), "ethermint.evm.v1.EventEthereumTx") + proto.RegisterType((*EventTxLog)(nil), "ethermint.evm.v1.EventTxLog") + proto.RegisterType((*EventMessage)(nil), "ethermint.evm.v1.EventMessage") + proto.RegisterType((*EventBlockBloom)(nil), "ethermint.evm.v1.EventBlockBloom") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/events.proto", fileDescriptor_432e0d592184bde3) } + +var fileDescriptor_432e0d592184bde3 = []byte{ + // 374 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x51, 0xcf, 0x4b, 0xe3, 0x40, + 0x18, 0x6d, 0xb6, 0x6d, 0xba, 0x9d, 0xdd, 0x65, 0x97, 0x61, 0xd9, 0xcd, 0xc2, 0x1a, 0x4a, 0x40, + 0xf4, 0x94, 0xa1, 0x88, 0x07, 0xaf, 0x85, 0x8a, 0x07, 0x45, 0x90, 0x88, 0xe0, 0x25, 0x4c, 0x93, + 0xcf, 0x4c, 0x30, 0x93, 0x09, 0x99, 0x49, 0x98, 0xfe, 0x17, 0xfe, 0x59, 0x82, 0x97, 0x1e, 0x3d, + 0x4a, 0xfb, 0x8f, 0xc8, 0x4c, 0xa2, 0xe2, 0xed, 0x7b, 0xef, 0x7d, 0x3f, 0x78, 0xdf, 0x43, 0x7b, + 0xa0, 0x18, 0xd4, 0x3c, 0x2f, 0x15, 0x81, 0x96, 0x93, 0x76, 0x4e, 0xa0, 0x85, 0x52, 0xc9, 0xb0, + 0xaa, 0x85, 0x12, 0xf8, 0xd7, 0xbb, 0x1c, 0x42, 0xcb, 0xc3, 0x76, 0x1e, 0x3c, 0x39, 0xe8, 0xe7, + 0xd2, 0xb4, 0x2c, 0x8d, 0x02, 0x0d, 0x8f, 0x34, 0xfe, 0x83, 0x5c, 0xca, 0x45, 0x53, 0x2a, 0xcf, + 0x99, 0x39, 0x87, 0xd3, 0xab, 0x1e, 0xe1, 0x7f, 0xe8, 0x2b, 0x28, 0x16, 0x33, 0x2a, 0x99, 0xf7, + 0xc5, 0x2a, 0x13, 0x50, 0xec, 0x8c, 0x4a, 0x86, 0x7f, 0xa3, 0x71, 0x5e, 0xa6, 0xa0, 0xbd, 0xa1, + 0xe5, 0x3b, 0x60, 0x06, 0x32, 0x2a, 0xe3, 0x46, 0x42, 0xea, 0x8d, 0xba, 0x81, 0x8c, 0xca, 0x6b, + 0x09, 0x29, 0xc6, 0x68, 0x64, 0xf7, 0x8c, 0x2d, 0x6d, 0x6b, 0xfc, 0x1f, 0x4d, 0x6b, 0x48, 0xf2, + 0x2a, 0x87, 0x52, 0x79, 0xae, 0x15, 0x3e, 0x08, 0x1c, 0xa0, 0x1f, 0xe6, 0xba, 0xd2, 0xf1, 0x1d, + 0xcd, 0x0b, 0x48, 0xbd, 0x89, 0xed, 0xf8, 0x06, 0x8a, 0x45, 0xfa, 0xd4, 0x52, 0xc1, 0x3e, 0x42, + 0xd6, 0x4c, 0xa4, 0xcf, 0x45, 0x86, 0xff, 0xa2, 0x89, 0xd2, 0x71, 0x21, 0x32, 0xe9, 0x39, 0xb3, + 0xa1, 0x31, 0xa2, 0x0c, 0x2f, 0x83, 0x1b, 0xf4, 0xdd, 0xb6, 0x5d, 0x80, 0x94, 0x34, 0x03, 0x63, + 0x98, 0x8b, 0xb4, 0x29, 0xe0, 0xcd, 0x70, 0x87, 0x0c, 0x2f, 0xa1, 0x4c, 0xa1, 0xee, 0xed, 0xf6, + 0xa8, 0x5f, 0xac, 0xd6, 0x15, 0xf4, 0x7e, 0x5d, 0xa5, 0xa3, 0x75, 0x05, 0xc1, 0x41, 0xff, 0xcc, + 0x45, 0x21, 0x92, 0xfb, 0x45, 0x21, 0x04, 0x37, 0x9f, 0x59, 0x99, 0xa2, 0x5f, 0xdd, 0x81, 0xc5, + 0xe5, 0xe3, 0xd6, 0x77, 0x36, 0x5b, 0xdf, 0x79, 0xd9, 0xfa, 0xce, 0xc3, 0xce, 0x1f, 0x6c, 0x76, + 0xfe, 0xe0, 0x79, 0xe7, 0x0f, 0x6e, 0x8f, 0xb3, 0x5c, 0xb1, 0x66, 0x15, 0x26, 0x82, 0x13, 0x5d, + 0x57, 0x85, 0x89, 0xb1, 0x14, 0x29, 0x90, 0xf6, 0x84, 0x98, 0x8b, 0x92, 0x14, 0x90, 0xd1, 0x64, + 0x4d, 0x3e, 0x25, 0xbd, 0x72, 0x6d, 0xc0, 0x47, 0xaf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xee, + 0xe9, 0xd6, 0x01, 0x02, 0x00, 0x00, +} + +func (m *EventEthereumTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventEthereumTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EthTxFailed) > 0 { + i -= len(m.EthTxFailed) + copy(dAtA[i:], m.EthTxFailed) + i = encodeVarintEvents(dAtA, i, uint64(len(m.EthTxFailed))) + i-- + dAtA[i] = 0x3a + } + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x32 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x2a + } + if len(m.GasUsed) > 0 { + i -= len(m.GasUsed) + copy(dAtA[i:], m.GasUsed) + i = encodeVarintEvents(dAtA, i, uint64(len(m.GasUsed))) + i-- + dAtA[i] = 0x22 + } + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0x1a + } + if len(m.EthHash) > 0 { + i -= len(m.EthHash) + copy(dAtA[i:], m.EthHash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.EthHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTxLog) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTxLog) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTxLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxLogs) > 0 { + for iNdEx := len(m.TxLogs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TxLogs[iNdEx]) + copy(dAtA[i:], m.TxLogs[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TxLogs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EventMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxType) > 0 { + i -= len(m.TxType) + copy(dAtA[i:], m.TxType) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TxType))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if len(m.Module) > 0 { + i -= len(m.Module) + copy(dAtA[i:], m.Module) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Module))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBlockBloom) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlockBloom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlockBloom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Bloom) > 0 { + i -= len(m.Bloom) + copy(dAtA[i:], m.Bloom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Bloom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventEthereumTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.EthHash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Index) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.GasUsed) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.EthTxFailed) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventTxLog) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TxLogs) > 0 { + for _, s := range m.TxLogs { + l = len(s) + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Module) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.TxType) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBlockBloom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bloom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventEthereumTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventEthereumTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GasUsed = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthTxFailed", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EthTxFailed = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTxLog) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTxLog: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTxLog: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxLogs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxLogs = append(m.TxLogs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Module = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlockBloom) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBlockBloom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBlockBloom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bloom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bloom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/evm/evm.pb.go b/types/legacy/ethermint/evm/evm.pb.go new file mode 100644 index 0000000..4f41002 --- /dev/null +++ b/types/legacy/ethermint/evm/evm.pb.go @@ -0,0 +1,4586 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/evm.proto + +package evm + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// AccessType defines the types of permissions for the operations +type AccessType int32 + +const ( + // ACCESS_TYPE_PERMISSIONLESS does not restrict the operation to anyone + AccessTypePermissionless AccessType = 0 + // ACCESS_TYPE_RESTRICTED restrict the operation to anyone + AccessTypeRestricted AccessType = 1 + // ACCESS_TYPE_PERMISSIONED only allows the operation for specific addresses + AccessTypePermissioned AccessType = 2 +) + +var AccessType_name = map[int32]string{ + 0: "ACCESS_TYPE_PERMISSIONLESS", + 1: "ACCESS_TYPE_RESTRICTED", + 2: "ACCESS_TYPE_PERMISSIONED", +} + +var AccessType_value = map[string]int32{ + "ACCESS_TYPE_PERMISSIONLESS": 0, + "ACCESS_TYPE_RESTRICTED": 1, + "ACCESS_TYPE_PERMISSIONED": 2, +} + +func (x AccessType) String() string { + return proto.EnumName(AccessType_name, int32(x)) +} + +func (AccessType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{0} +} + +// Params defines the EVM module parameters +type Params struct { + // evm_denom represents the token denomination used to run the EVM state + // transitions. + EvmDenom string `protobuf:"bytes,1,opt,name=evm_denom,json=evmDenom,proto3" json:"evm_denom,omitempty" yaml:"evm_denom"` + // extra_eips defines the additional EIPs for the vm.Config + ExtraEIPs []string `protobuf:"bytes,4,rep,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` + // chain_config defines the EVM chain configuration parameters + ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` + // allow_unprotected_txs defines if replay-protected (i.e non EIP155 + // signed) transactions can be executed on the state machine. + AllowUnprotectedTxs bool `protobuf:"varint,6,opt,name=allow_unprotected_txs,json=allowUnprotectedTxs,proto3" json:"allow_unprotected_txs,omitempty"` + // evm_channels is the list of channel identifiers from EVM compatible chains + EVMChannels []string `protobuf:"bytes,8,rep,name=evm_channels,json=evmChannels,proto3" json:"evm_channels,omitempty"` + // access_control defines the permission policy of the EVM + AccessControl AccessControl `protobuf:"bytes,9,opt,name=access_control,json=accessControl,proto3" json:"access_control"` + // active_static_precompiles defines the slice of hex addresses of the precompiled + // contracts that are active + ActiveStaticPrecompiles []string `protobuf:"bytes,10,rep,name=active_static_precompiles,json=activeStaticPrecompiles,proto3" json:"active_static_precompiles,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetEvmDenom() string { + if m != nil { + return m.EvmDenom + } + return "" +} + +func (m *Params) GetExtraEIPs() []string { + if m != nil { + return m.ExtraEIPs + } + return nil +} + +func (m *Params) GetChainConfig() ChainConfig { + if m != nil { + return m.ChainConfig + } + return ChainConfig{} +} + +func (m *Params) GetAllowUnprotectedTxs() bool { + if m != nil { + return m.AllowUnprotectedTxs + } + return false +} + +func (m *Params) GetEVMChannels() []string { + if m != nil { + return m.EVMChannels + } + return nil +} + +func (m *Params) GetAccessControl() AccessControl { + if m != nil { + return m.AccessControl + } + return AccessControl{} +} + +func (m *Params) GetActiveStaticPrecompiles() []string { + if m != nil { + return m.ActiveStaticPrecompiles + } + return nil +} + +// AccessControl defines the permission policy of the EVM +// for creating and calling contracts +type AccessControl struct { + // create defines the permission policy for creating contracts + Create AccessControlType `protobuf:"bytes,1,opt,name=create,proto3" json:"create"` + // call defines the permission policy for calling contracts + Call AccessControlType `protobuf:"bytes,2,opt,name=call,proto3" json:"call"` +} + +func (m *AccessControl) Reset() { *m = AccessControl{} } +func (m *AccessControl) String() string { return proto.CompactTextString(m) } +func (*AccessControl) ProtoMessage() {} +func (*AccessControl) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{1} +} +func (m *AccessControl) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessControl.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessControl) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessControl.Merge(m, src) +} +func (m *AccessControl) XXX_Size() int { + return m.Size() +} +func (m *AccessControl) XXX_DiscardUnknown() { + xxx_messageInfo_AccessControl.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessControl proto.InternalMessageInfo + +func (m *AccessControl) GetCreate() AccessControlType { + if m != nil { + return m.Create + } + return AccessControlType{} +} + +func (m *AccessControl) GetCall() AccessControlType { + if m != nil { + return m.Call + } + return AccessControlType{} +} + +// AccessControlType defines the permission type for policies +type AccessControlType struct { + // access_type defines which type of permission is required for the operation + AccessType AccessType `protobuf:"varint,1,opt,name=access_type,json=accessType,proto3,enum=ethermint.evm.v1.AccessType" json:"access_type,omitempty" yaml:"access_type"` + // access_control_list defines defines different things depending on the AccessType: + // - ACCESS_TYPE_PERMISSIONLESS: list of addresses that are blocked from performing the operation + // - ACCESS_TYPE_RESTRICTED: ignored + // - ACCESS_TYPE_PERMISSIONED: list of addresses that are allowed to perform the operation + AccessControlList []string `protobuf:"bytes,2,rep,name=access_control_list,json=accessControlList,proto3" json:"access_control_list,omitempty" yaml:"access_control_list"` +} + +func (m *AccessControlType) Reset() { *m = AccessControlType{} } +func (m *AccessControlType) String() string { return proto.CompactTextString(m) } +func (*AccessControlType) ProtoMessage() {} +func (*AccessControlType) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{2} +} +func (m *AccessControlType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessControlType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessControlType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessControlType) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessControlType.Merge(m, src) +} +func (m *AccessControlType) XXX_Size() int { + return m.Size() +} +func (m *AccessControlType) XXX_DiscardUnknown() { + xxx_messageInfo_AccessControlType.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessControlType proto.InternalMessageInfo + +func (m *AccessControlType) GetAccessType() AccessType { + if m != nil { + return m.AccessType + } + return AccessTypePermissionless +} + +func (m *AccessControlType) GetAccessControlList() []string { + if m != nil { + return m.AccessControlList + } + return nil +} + +// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// instead of *big.Int. +type ChainConfig struct { + // homestead_block switch (nil no fork, 0 = already homestead) + HomesteadBlock *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=cosmossdk.io/math.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` + // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) + DAOForkBlock *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=cosmossdk.io/math.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` + // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork + DAOForkSupport bool `protobuf:"varint,3,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"` + // eip150_block: EIP150 implements the Gas price changes + // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) + EIP150Block *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` + // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) + EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"` + // eip155_block: EIP155Block HF block + EIP155Block *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` + // eip158_block: EIP158 HF block + EIP158Block *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` + // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) + ByzantiumBlock *cosmossdk_io_math.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=cosmossdk.io/math.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` + // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) + ConstantinopleBlock *cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=cosmossdk.io/math.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` + // petersburg_block: Petersburg switch block (nil same as Constantinople) + PetersburgBlock *cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=cosmossdk.io/math.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` + // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) + IstanbulBlock *cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=cosmossdk.io/math.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` + // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) + MuirGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` + // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) + BerlinBlock *cosmossdk_io_math.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=cosmossdk.io/math.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` + // london_block: London switch block (nil = no fork, 0 = already on london) + LondonBlock *cosmossdk_io_math.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=cosmossdk.io/math.Int" json:"london_block,omitempty" yaml:"london_block"` + // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) + ArrowGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` + // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) + GrayGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"` + // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter + MergeNetsplitBlock *cosmossdk_io_math.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=cosmossdk.io/math.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` + // shanghai_block switch block (nil = no fork, 0 = already on shanghai) + ShanghaiBlock *cosmossdk_io_math.Int `protobuf:"bytes,22,opt,name=shanghai_block,json=shanghaiBlock,proto3,customtype=cosmossdk.io/math.Int" json:"shanghai_block,omitempty" yaml:"shanghai_block"` + // cancun_block switch block (nil = no fork, 0 = already on cancun) + CancunBlock *cosmossdk_io_math.Int `protobuf:"bytes,23,opt,name=cancun_block,json=cancunBlock,proto3,customtype=cosmossdk.io/math.Int" json:"cancun_block,omitempty" yaml:"cancun_block"` +} + +func (m *ChainConfig) Reset() { *m = ChainConfig{} } +func (m *ChainConfig) String() string { return proto.CompactTextString(m) } +func (*ChainConfig) ProtoMessage() {} +func (*ChainConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{3} +} +func (m *ChainConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChainConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainConfig.Merge(m, src) +} +func (m *ChainConfig) XXX_Size() int { + return m.Size() +} +func (m *ChainConfig) XXX_DiscardUnknown() { + xxx_messageInfo_ChainConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainConfig proto.InternalMessageInfo + +func (m *ChainConfig) GetDAOForkSupport() bool { + if m != nil { + return m.DAOForkSupport + } + return false +} + +func (m *ChainConfig) GetEIP150Hash() string { + if m != nil { + return m.EIP150Hash + } + return "" +} + +// State represents a single Storage key value pair item. +type State struct { + // key is the stored key + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // value is the stored value for the given key + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *State) Reset() { *m = State{} } +func (m *State) String() string { return proto.CompactTextString(m) } +func (*State) ProtoMessage() {} +func (*State) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{4} +} +func (m *State) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_State.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *State) XXX_Merge(src proto.Message) { + xxx_messageInfo_State.Merge(m, src) +} +func (m *State) XXX_Size() int { + return m.Size() +} +func (m *State) XXX_DiscardUnknown() { + xxx_messageInfo_State.DiscardUnknown(m) +} + +var xxx_messageInfo_State proto.InternalMessageInfo + +func (m *State) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *State) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// TransactionLogs define the logs generated from a transaction execution +// with a given hash. It it used for import/export data as transactions are not +// persisted on blockchain state after an upgrade. +type TransactionLogs struct { + // hash of the transaction + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // logs is an array of Logs for the given transaction hash + Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` +} + +func (m *TransactionLogs) Reset() { *m = TransactionLogs{} } +func (m *TransactionLogs) String() string { return proto.CompactTextString(m) } +func (*TransactionLogs) ProtoMessage() {} +func (*TransactionLogs) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{5} +} +func (m *TransactionLogs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TransactionLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TransactionLogs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TransactionLogs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransactionLogs.Merge(m, src) +} +func (m *TransactionLogs) XXX_Size() int { + return m.Size() +} +func (m *TransactionLogs) XXX_DiscardUnknown() { + xxx_messageInfo_TransactionLogs.DiscardUnknown(m) +} + +var xxx_messageInfo_TransactionLogs proto.InternalMessageInfo + +func (m *TransactionLogs) GetHash() string { + if m != nil { + return m.Hash + } + return "" +} + +func (m *TransactionLogs) GetLogs() []*Log { + if m != nil { + return m.Logs + } + return nil +} + +// Log represents an protobuf compatible Ethereum Log that defines a contract +// log event. These events are generated by the LOG opcode and stored/indexed by +// the node. +// +// NOTE: address, topics and data are consensus fields. The rest of the fields +// are derived, i.e. filled in by the nodes, but not secured by consensus. +type Log struct { + // address of the contract that generated the event + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // topics is a list of topics provided by the contract. + Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"` + // data which is supplied by the contract, usually ABI-encoded + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // block_number of the block in which the transaction was included + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"blockNumber"` + // tx_hash is the transaction hash + TxHash string `protobuf:"bytes,5,opt,name=tx_hash,json=txHash,proto3" json:"transactionHash"` + // tx_index of the transaction in the block + TxIndex uint64 `protobuf:"varint,6,opt,name=tx_index,json=txIndex,proto3" json:"transactionIndex"` + // block_hash of the block in which the transaction was included + BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"blockHash"` + // index of the log in the block + Index uint64 `protobuf:"varint,8,opt,name=index,proto3" json:"logIndex"` + // removed is true if this log was reverted due to a chain + // reorganisation. You must pay attention to this field if you receive logs + // through a filter query. + Removed bool `protobuf:"varint,9,opt,name=removed,proto3" json:"removed,omitempty"` +} + +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{6} +} +func (m *Log) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Log.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_Log.Merge(m, src) +} +func (m *Log) XXX_Size() int { + return m.Size() +} +func (m *Log) XXX_DiscardUnknown() { + xxx_messageInfo_Log.DiscardUnknown(m) +} + +var xxx_messageInfo_Log proto.InternalMessageInfo + +func (m *Log) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Log) GetTopics() []string { + if m != nil { + return m.Topics + } + return nil +} + +func (m *Log) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *Log) GetBlockNumber() uint64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *Log) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *Log) GetTxIndex() uint64 { + if m != nil { + return m.TxIndex + } + return 0 +} + +func (m *Log) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *Log) GetIndex() uint64 { + if m != nil { + return m.Index + } + return 0 +} + +func (m *Log) GetRemoved() bool { + if m != nil { + return m.Removed + } + return false +} + +// TxResult stores results of Tx execution. +type TxResult struct { + // contract_address contains the ethereum address of the created contract (if + // any). If the state transition is an evm.Call, the contract address will be + // empty. + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" yaml:"contract_address"` + // bloom represents the bloom filter bytes + Bloom []byte `protobuf:"bytes,2,opt,name=bloom,proto3" json:"bloom,omitempty"` + // tx_logs contains the transaction hash and the proto-compatible ethereum + // logs. + TxLogs TransactionLogs `protobuf:"bytes,3,opt,name=tx_logs,json=txLogs,proto3" json:"tx_logs" yaml:"tx_logs"` + // ret defines the bytes from the execution. + Ret []byte `protobuf:"bytes,4,opt,name=ret,proto3" json:"ret,omitempty"` + // reverted flag is set to true when the call has been reverted + Reverted bool `protobuf:"varint,5,opt,name=reverted,proto3" json:"reverted,omitempty"` + // gas_used notes the amount of gas consumed while execution + GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` +} + +func (m *TxResult) Reset() { *m = TxResult{} } +func (m *TxResult) String() string { return proto.CompactTextString(m) } +func (*TxResult) ProtoMessage() {} +func (*TxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{7} +} +func (m *TxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxResult.Merge(m, src) +} +func (m *TxResult) XXX_Size() int { + return m.Size() +} +func (m *TxResult) XXX_DiscardUnknown() { + xxx_messageInfo_TxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_TxResult proto.InternalMessageInfo + +// AccessTuple is the element type of an access list. +type AccessTuple struct { + // address is a hex formatted ethereum address + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // storage_keys are hex formatted hashes of the storage keys + StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storageKeys"` +} + +func (m *AccessTuple) Reset() { *m = AccessTuple{} } +func (m *AccessTuple) String() string { return proto.CompactTextString(m) } +func (*AccessTuple) ProtoMessage() {} +func (*AccessTuple) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{8} +} +func (m *AccessTuple) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessTuple.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessTuple) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessTuple.Merge(m, src) +} +func (m *AccessTuple) XXX_Size() int { + return m.Size() +} +func (m *AccessTuple) XXX_DiscardUnknown() { + xxx_messageInfo_AccessTuple.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessTuple proto.InternalMessageInfo + +// TraceConfig holds extra parameters to trace functions. +type TraceConfig struct { + // tracer is a custom javascript tracer + Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` + // timeout overrides the default timeout of 5 seconds for JavaScript-based tracing + // calls + Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + // reexec defines the number of blocks the tracer is willing to go back + Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"` + // disable_stack switches stack capture + DisableStack bool `protobuf:"varint,5,opt,name=disable_stack,json=disableStack,proto3" json:"disableStack"` + // disable_storage switches storage capture + DisableStorage bool `protobuf:"varint,6,opt,name=disable_storage,json=disableStorage,proto3" json:"disableStorage"` + // debug can be used to print output during capture end + Debug bool `protobuf:"varint,8,opt,name=debug,proto3" json:"debug,omitempty"` + // limit defines the maximum length of output, but zero means unlimited + Limit int32 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit,omitempty"` + // overrides can be used to execute a trace using future fork rules + Overrides *ChainConfig `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"` + // enable_memory switches memory capture + EnableMemory bool `protobuf:"varint,11,opt,name=enable_memory,json=enableMemory,proto3" json:"enableMemory"` + // enable_return_data switches the capture of return data + EnableReturnData bool `protobuf:"varint,12,opt,name=enable_return_data,json=enableReturnData,proto3" json:"enableReturnData"` + // tracer_json_config configures the tracer using a JSON string + TracerJsonConfig string `protobuf:"bytes,13,opt,name=tracer_json_config,json=tracerJsonConfig,proto3" json:"tracerConfig"` +} + +func (m *TraceConfig) Reset() { *m = TraceConfig{} } +func (m *TraceConfig) String() string { return proto.CompactTextString(m) } +func (*TraceConfig) ProtoMessage() {} +func (*TraceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_d21ecc92c8c8583e, []int{9} +} +func (m *TraceConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TraceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceConfig.Merge(m, src) +} +func (m *TraceConfig) XXX_Size() int { + return m.Size() +} +func (m *TraceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TraceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_TraceConfig proto.InternalMessageInfo + +func (m *TraceConfig) GetTracer() string { + if m != nil { + return m.Tracer + } + return "" +} + +func (m *TraceConfig) GetTimeout() string { + if m != nil { + return m.Timeout + } + return "" +} + +func (m *TraceConfig) GetReexec() uint64 { + if m != nil { + return m.Reexec + } + return 0 +} + +func (m *TraceConfig) GetDisableStack() bool { + if m != nil { + return m.DisableStack + } + return false +} + +func (m *TraceConfig) GetDisableStorage() bool { + if m != nil { + return m.DisableStorage + } + return false +} + +func (m *TraceConfig) GetDebug() bool { + if m != nil { + return m.Debug + } + return false +} + +func (m *TraceConfig) GetLimit() int32 { + if m != nil { + return m.Limit + } + return 0 +} + +func (m *TraceConfig) GetOverrides() *ChainConfig { + if m != nil { + return m.Overrides + } + return nil +} + +func (m *TraceConfig) GetEnableMemory() bool { + if m != nil { + return m.EnableMemory + } + return false +} + +func (m *TraceConfig) GetEnableReturnData() bool { + if m != nil { + return m.EnableReturnData + } + return false +} + +func (m *TraceConfig) GetTracerJsonConfig() string { + if m != nil { + return m.TracerJsonConfig + } + return "" +} + +func init() { + proto.RegisterEnum("ethermint.evm.v1.AccessType", AccessType_name, AccessType_value) + proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params") + proto.RegisterType((*AccessControl)(nil), "ethermint.evm.v1.AccessControl") + proto.RegisterType((*AccessControlType)(nil), "ethermint.evm.v1.AccessControlType") + proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig") + proto.RegisterType((*State)(nil), "ethermint.evm.v1.State") + proto.RegisterType((*TransactionLogs)(nil), "ethermint.evm.v1.TransactionLogs") + proto.RegisterType((*Log)(nil), "ethermint.evm.v1.Log") + proto.RegisterType((*TxResult)(nil), "ethermint.evm.v1.TxResult") + proto.RegisterType((*AccessTuple)(nil), "ethermint.evm.v1.AccessTuple") + proto.RegisterType((*TraceConfig)(nil), "ethermint.evm.v1.TraceConfig") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) } + +var fileDescriptor_d21ecc92c8c8583e = []byte{ + // 1941 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0x4b, 0x6f, 0x23, 0xc7, + 0xf1, 0x17, 0xa5, 0x91, 0x34, 0x6c, 0x52, 0xd4, 0xa8, 0x45, 0xed, 0x72, 0xb9, 0xfe, 0x6b, 0xf4, + 0x9f, 0xe4, 0xb0, 0x59, 0x38, 0xe2, 0xae, 0xd6, 0x4a, 0x36, 0xeb, 0x3c, 0x20, 0x6a, 0xe9, 0x44, + 0xca, 0x3e, 0x84, 0xa6, 0x1c, 0xc3, 0x41, 0x82, 0x41, 0x73, 0xa6, 0x3d, 0x1c, 0x6b, 0x66, 0x9a, + 0x98, 0x6e, 0x72, 0xc9, 0x7c, 0x02, 0x63, 0x4f, 0x9b, 0x0f, 0xb0, 0x80, 0x81, 0x5c, 0x72, 0xf4, + 0x47, 0xc8, 0xd1, 0xc8, 0xc9, 0xc7, 0x20, 0x40, 0x06, 0x01, 0xf7, 0x60, 0x40, 0x47, 0xdd, 0x03, + 0x04, 0xfd, 0xe0, 0x53, 0xb2, 0xac, 0x5c, 0xa4, 0xae, 0xea, 0xaa, 0xdf, 0xaf, 0xaa, 0xba, 0xa6, + 0x1f, 0x04, 0x55, 0xc2, 0xdb, 0x24, 0x8d, 0xc3, 0x84, 0xd7, 0x48, 0x2f, 0xae, 0xf5, 0x1e, 0x8a, + 0x7f, 0xbb, 0x9d, 0x94, 0x72, 0x0a, 0xad, 0xf1, 0xdc, 0xae, 0x50, 0xf6, 0x1e, 0x56, 0x37, 0x70, + 0x1c, 0x26, 0xb4, 0x26, 0xff, 0x2a, 0xa3, 0x6a, 0x39, 0xa0, 0x01, 0x95, 0xc3, 0x9a, 0x18, 0x29, + 0xad, 0xf3, 0xc6, 0x00, 0x2b, 0x27, 0x38, 0xc5, 0x31, 0x83, 0x0f, 0x41, 0x9e, 0xf4, 0x62, 0xd7, + 0x27, 0x09, 0x8d, 0x2b, 0xb9, 0x9d, 0xdc, 0xbd, 0x7c, 0xbd, 0x7c, 0x91, 0xd9, 0xd6, 0x00, 0xc7, + 0xd1, 0x13, 0x67, 0x3c, 0xe5, 0x20, 0x93, 0xf4, 0xe2, 0xa7, 0x62, 0x08, 0x0f, 0x00, 0x20, 0x7d, + 0x9e, 0x62, 0x97, 0x84, 0x1d, 0x56, 0x31, 0x76, 0x96, 0xee, 0xe5, 0xeb, 0xce, 0x30, 0xb3, 0xf3, + 0x0d, 0xa1, 0x6d, 0x1c, 0x9d, 0xb0, 0x8b, 0xcc, 0xde, 0xd0, 0x00, 0x63, 0x43, 0x07, 0xe5, 0xa5, + 0xd0, 0x08, 0x3b, 0x0c, 0xb6, 0x40, 0xd1, 0x6b, 0xe3, 0x30, 0x71, 0x3d, 0x9a, 0x7c, 0x16, 0x06, + 0x95, 0xe5, 0x9d, 0xdc, 0xbd, 0xc2, 0xde, 0xff, 0xed, 0xce, 0xa7, 0xb4, 0x7b, 0x28, 0xac, 0x0e, + 0xa5, 0x51, 0x7d, 0xe7, 0xeb, 0xcc, 0x5e, 0xb8, 0xc8, 0xec, 0x4d, 0x05, 0x3d, 0x0d, 0xe0, 0xfc, + 0xf5, 0xdb, 0xaf, 0xee, 0xe7, 0x50, 0xc1, 0x9b, 0x98, 0xc3, 0x3d, 0xb0, 0x85, 0xa3, 0x88, 0xbe, + 0x72, 0xbb, 0x89, 0xc8, 0x9a, 0x78, 0x9c, 0xf8, 0x2e, 0xef, 0xb3, 0xca, 0xca, 0x4e, 0xee, 0x9e, + 0x89, 0x36, 0xe5, 0xe4, 0xc7, 0x93, 0xb9, 0xd3, 0x3e, 0x83, 0x7b, 0xa0, 0x28, 0x52, 0xf6, 0xda, + 0x38, 0x49, 0x48, 0xc4, 0x2a, 0xa6, 0x4c, 0x6e, 0x7d, 0x98, 0xd9, 0x85, 0xc6, 0xef, 0x9e, 0x1f, + 0x6a, 0x35, 0x2a, 0x90, 0x5e, 0x3c, 0x12, 0xe0, 0x1f, 0x41, 0x09, 0x7b, 0x1e, 0x61, 0x4c, 0xc4, + 0xc2, 0x53, 0x1a, 0x55, 0xf2, 0x32, 0x1b, 0xfb, 0x72, 0x36, 0x07, 0xd2, 0xee, 0x50, 0x99, 0xd5, + 0xb7, 0x44, 0x3e, 0xc3, 0xcc, 0x5e, 0x9b, 0x51, 0xa3, 0x35, 0x3c, 0x2d, 0xc2, 0x27, 0xe0, 0x0e, + 0xf6, 0x78, 0xd8, 0x23, 0x2e, 0xe3, 0x98, 0x87, 0x9e, 0xdb, 0x49, 0x89, 0x47, 0xe3, 0x4e, 0x18, + 0x11, 0x56, 0x01, 0x22, 0x3e, 0x74, 0x5b, 0x19, 0x34, 0xe5, 0xfc, 0xc9, 0x64, 0xfa, 0xc9, 0xed, + 0xd7, 0xdf, 0x7e, 0x75, 0x1f, 0x92, 0x5e, 0x4c, 0x59, 0xad, 0x2f, 0x3b, 0x48, 0xad, 0xfa, 0xb1, + 0x61, 0x2e, 0x5a, 0x4b, 0xc7, 0x86, 0xb9, 0x64, 0x19, 0xc7, 0x86, 0xb9, 0x6a, 0x99, 0xce, 0x9f, + 0x73, 0x60, 0x36, 0x0e, 0x78, 0x00, 0x56, 0xbc, 0x94, 0x60, 0x4e, 0x64, 0x5b, 0x14, 0xf6, 0x7e, + 0xf0, 0x3d, 0xf9, 0x9c, 0x0e, 0x3a, 0xa4, 0x6e, 0x88, 0x9c, 0x90, 0x76, 0x84, 0xbf, 0x00, 0x86, + 0x87, 0xa3, 0xa8, 0xb2, 0xf8, 0xbf, 0x02, 0x48, 0x37, 0xe7, 0x5f, 0x39, 0xb0, 0x71, 0xc9, 0x02, + 0x7a, 0xa0, 0xa0, 0xeb, 0xcd, 0x07, 0x1d, 0x15, 0x5c, 0x69, 0xef, 0xbd, 0xef, 0xc2, 0x96, 0xa0, + 0x3f, 0x1c, 0x66, 0x36, 0x98, 0xc8, 0x17, 0x99, 0x0d, 0x55, 0x0f, 0x4d, 0x01, 0x39, 0x08, 0xe0, + 0xb1, 0x05, 0xf4, 0xc0, 0xe6, 0xec, 0xa2, 0xba, 0x51, 0xc8, 0x78, 0x65, 0x51, 0xf6, 0xc3, 0xa3, + 0x61, 0x66, 0xcf, 0x06, 0xf6, 0x2c, 0x64, 0xfc, 0x22, 0xb3, 0xab, 0x33, 0xa8, 0xd3, 0x9e, 0x0e, + 0xda, 0xc0, 0xf3, 0x0e, 0xce, 0x7f, 0x4a, 0xa0, 0x30, 0xd5, 0xe0, 0xf0, 0x0f, 0x60, 0xbd, 0x4d, + 0x63, 0xc2, 0x38, 0xc1, 0xbe, 0xdb, 0x8a, 0xa8, 0x77, 0xa6, 0xbf, 0xc8, 0x47, 0xff, 0xcc, 0xec, + 0x2d, 0x8f, 0xb2, 0x98, 0x32, 0xe6, 0x9f, 0xed, 0x86, 0xb4, 0x16, 0x63, 0xde, 0xde, 0x3d, 0x4a, + 0x04, 0xe9, 0x2d, 0x45, 0x3a, 0xe7, 0xe9, 0xa0, 0xd2, 0x58, 0x53, 0x17, 0x0a, 0xd8, 0x06, 0x25, + 0x1f, 0x53, 0xf7, 0x33, 0x9a, 0x9e, 0x69, 0xf0, 0x45, 0x09, 0x5e, 0xff, 0x4e, 0xf0, 0x61, 0x66, + 0x17, 0x9f, 0x1e, 0xbc, 0xfc, 0x88, 0xa6, 0x67, 0x12, 0xe2, 0x22, 0xb3, 0xb7, 0x14, 0xd9, 0x2c, + 0x90, 0x83, 0x8a, 0x3e, 0xa6, 0x63, 0x33, 0xf8, 0x09, 0xb0, 0xc6, 0x06, 0xac, 0xdb, 0xe9, 0xd0, + 0x94, 0x57, 0x96, 0xc4, 0x47, 0x57, 0xff, 0xf1, 0x30, 0xb3, 0x4b, 0x1a, 0xb2, 0xa9, 0x66, 0x2e, + 0x32, 0xfb, 0xf6, 0x1c, 0xa8, 0xf6, 0x71, 0x50, 0x49, 0xc3, 0x6a, 0x53, 0xb1, 0x6d, 0x90, 0xb0, + 0xf3, 0x70, 0xff, 0x81, 0x4e, 0xc0, 0x90, 0x09, 0xfc, 0xea, 0xba, 0x04, 0x0a, 0x8d, 0xa3, 0x93, + 0x87, 0xfb, 0x0f, 0x46, 0xf1, 0xeb, 0xbd, 0x63, 0x1a, 0xc5, 0x41, 0x05, 0x25, 0xaa, 0xe0, 0x8f, + 0x80, 0x16, 0xdd, 0x36, 0x66, 0x6d, 0xb9, 0x33, 0xe5, 0xeb, 0xf7, 0x44, 0x03, 0x29, 0xa4, 0xdf, + 0x60, 0xd6, 0x9e, 0x54, 0xbd, 0x35, 0xf8, 0x13, 0x4e, 0x78, 0xd8, 0x8d, 0x47, 0x58, 0x40, 0x39, + 0x0b, 0xab, 0x71, 0xb8, 0xfb, 0x3a, 0xdc, 0x95, 0x9b, 0x86, 0xbb, 0x7f, 0x55, 0xb8, 0xfb, 0xb3, + 0xe1, 0x2a, 0x9b, 0x31, 0xc7, 0x63, 0xcd, 0xb1, 0x7a, 0x53, 0x8e, 0xc7, 0x57, 0x71, 0x3c, 0x9e, + 0xe5, 0x50, 0x36, 0xa2, 0x2f, 0xe7, 0xf2, 0xac, 0x98, 0x37, 0xee, 0xcb, 0x4b, 0x15, 0x2a, 0x8d, + 0x35, 0x0a, 0xfd, 0x0c, 0x94, 0x3d, 0x9a, 0x30, 0x2e, 0x74, 0x09, 0xed, 0x44, 0x44, 0x53, 0xe4, + 0x25, 0xc5, 0xe3, 0xeb, 0x28, 0xee, 0xea, 0x93, 0xe0, 0x0a, 0x77, 0x07, 0x6d, 0xce, 0xaa, 0x15, + 0x99, 0x0b, 0xac, 0x0e, 0xe1, 0x24, 0x65, 0xad, 0x6e, 0x1a, 0x68, 0x22, 0x20, 0x89, 0x3e, 0xb8, + 0x8e, 0x48, 0x77, 0xe8, 0xbc, 0xab, 0x83, 0xd6, 0x27, 0x2a, 0x45, 0xf0, 0x29, 0x28, 0x85, 0x82, + 0xb5, 0xd5, 0x8d, 0x34, 0x7c, 0x41, 0xc2, 0xef, 0x5d, 0x07, 0xaf, 0xbf, 0xaa, 0x59, 0x47, 0x07, + 0xad, 0x8d, 0x14, 0x0a, 0xda, 0x07, 0x30, 0xee, 0x86, 0xa9, 0x1b, 0x44, 0xd8, 0x0b, 0x49, 0xaa, + 0xe1, 0x8b, 0x12, 0xfe, 0x27, 0xd7, 0xc1, 0xdf, 0x51, 0xf0, 0x97, 0x9d, 0x1d, 0x64, 0x09, 0xe5, + 0xaf, 0x95, 0x4e, 0xb1, 0x34, 0x41, 0xb1, 0x45, 0xd2, 0x28, 0x4c, 0x34, 0xfe, 0x9a, 0xc4, 0x7f, + 0x70, 0x1d, 0xbe, 0xee, 0xa0, 0x69, 0x37, 0x07, 0x15, 0x94, 0x38, 0x06, 0x8d, 0x68, 0xe2, 0xd3, + 0x11, 0xe8, 0xc6, 0x8d, 0x41, 0xa7, 0xdd, 0x1c, 0x54, 0x50, 0xa2, 0x02, 0x0d, 0xc0, 0x26, 0x4e, + 0x53, 0xfa, 0x6a, 0xae, 0x20, 0x50, 0x62, 0xff, 0xf4, 0x3a, 0xec, 0xd1, 0x3e, 0x7d, 0xd9, 0x5b, + 0xec, 0xd3, 0x42, 0x3b, 0x53, 0x12, 0x1f, 0xc0, 0x20, 0xc5, 0x83, 0x39, 0x9e, 0xf2, 0x8d, 0x0b, + 0x7f, 0xd9, 0xd9, 0x41, 0x96, 0x50, 0xce, 0xb0, 0x7c, 0x0e, 0xca, 0x31, 0x49, 0x03, 0xe2, 0x26, + 0x84, 0xb3, 0x4e, 0x14, 0x72, 0xcd, 0xb3, 0x75, 0xe3, 0xef, 0xe0, 0x2a, 0x77, 0x07, 0x41, 0xa9, + 0x7e, 0xa1, 0xb5, 0xe3, 0x2e, 0x65, 0x6d, 0x9c, 0x04, 0x6d, 0x1c, 0x6a, 0x96, 0x5b, 0x37, 0xee, + 0xd2, 0x59, 0x47, 0x07, 0xad, 0x8d, 0x14, 0xe3, 0xa5, 0xf6, 0x70, 0xe2, 0x75, 0x47, 0x4b, 0x7d, + 0xfb, 0xc6, 0x4b, 0x3d, 0xed, 0xe6, 0xa0, 0x82, 0x12, 0x25, 0xe8, 0xb1, 0x61, 0x96, 0xac, 0xf5, + 0x63, 0xc3, 0x5c, 0xb7, 0xac, 0x63, 0xc3, 0xb4, 0xac, 0x8d, 0x63, 0xc3, 0xdc, 0xb4, 0xca, 0x68, + 0x6d, 0x40, 0x23, 0xea, 0xf6, 0x1e, 0x29, 0x27, 0x54, 0x20, 0xaf, 0x30, 0xd3, 0x1b, 0x0d, 0x2a, + 0x79, 0x98, 0xe3, 0x68, 0xc0, 0x74, 0x21, 0x90, 0xa5, 0xca, 0x33, 0x75, 0x6c, 0xd5, 0xc0, 0xb2, + 0xb8, 0x33, 0x11, 0x68, 0x81, 0xa5, 0x33, 0x32, 0x50, 0x87, 0x2d, 0x12, 0x43, 0x58, 0x06, 0xcb, + 0x3d, 0x1c, 0x75, 0x89, 0x3a, 0x23, 0x91, 0x12, 0x9c, 0x13, 0xb0, 0x7e, 0x9a, 0xe2, 0x84, 0x89, + 0xfb, 0x16, 0x4d, 0x9e, 0xd1, 0x80, 0x41, 0x08, 0x0c, 0x79, 0x4e, 0x28, 0x5f, 0x39, 0x86, 0x3f, + 0x02, 0x46, 0x44, 0x03, 0x26, 0x6f, 0x0b, 0x85, 0xbd, 0xad, 0xcb, 0x57, 0x93, 0x67, 0x34, 0x40, + 0xd2, 0xc4, 0xf9, 0xfb, 0x22, 0x58, 0x7a, 0x46, 0x03, 0x58, 0x01, 0xab, 0xd8, 0xf7, 0x53, 0xc2, + 0x98, 0x46, 0x1a, 0x89, 0xf0, 0x16, 0x58, 0xe1, 0xb4, 0x13, 0x7a, 0x0a, 0x2e, 0x8f, 0xb4, 0x24, + 0x88, 0x7d, 0xcc, 0xb1, 0x3c, 0x58, 0x8b, 0x48, 0x8e, 0xc5, 0xf5, 0x55, 0x66, 0xe6, 0x26, 0xdd, + 0xb8, 0x45, 0x52, 0x79, 0x3e, 0x1a, 0xf5, 0xf5, 0xf3, 0xcc, 0x2e, 0x48, 0xfd, 0x0b, 0xa9, 0x46, + 0xd3, 0x02, 0x7c, 0x1f, 0xac, 0xf2, 0xfe, 0xf4, 0x59, 0xb7, 0x79, 0x9e, 0xd9, 0xeb, 0x7c, 0x92, + 0xa6, 0x38, 0xca, 0xd0, 0x0a, 0xef, 0xcb, 0x23, 0xad, 0x06, 0x4c, 0xde, 0x77, 0xc3, 0xc4, 0x27, + 0x7d, 0x79, 0x9c, 0x19, 0xf5, 0xf2, 0x79, 0x66, 0x5b, 0x53, 0xe6, 0x47, 0x62, 0x0e, 0xad, 0xf2, + 0xbe, 0x1c, 0xc0, 0xf7, 0x01, 0x50, 0x21, 0x49, 0x06, 0x75, 0x3a, 0xad, 0x9d, 0x67, 0x76, 0x5e, + 0x6a, 0x25, 0xf6, 0x64, 0x08, 0x1d, 0xb0, 0xac, 0xb0, 0x4d, 0x89, 0x5d, 0x3c, 0xcf, 0x6c, 0x33, + 0xa2, 0x81, 0xc2, 0x54, 0x53, 0xa2, 0x54, 0x29, 0x89, 0x69, 0x8f, 0xf8, 0xf2, 0x88, 0x30, 0xd1, + 0x48, 0x74, 0xde, 0x2c, 0x02, 0xf3, 0xb4, 0x8f, 0x08, 0xeb, 0x46, 0x1c, 0x7e, 0x04, 0x2c, 0x79, + 0x01, 0xc3, 0x1e, 0x77, 0x67, 0x4a, 0x5b, 0xbf, 0x3b, 0xd9, 0xd0, 0xe7, 0x2d, 0x1c, 0xb4, 0x3e, + 0x52, 0x1d, 0xe8, 0xfa, 0x97, 0xc1, 0x72, 0x2b, 0xa2, 0x34, 0x96, 0x9d, 0x50, 0x44, 0x4a, 0x80, + 0x9f, 0xc8, 0xaa, 0xc9, 0x55, 0x5e, 0x92, 0x97, 0xdb, 0xff, 0xbf, 0xbc, 0xca, 0x73, 0xad, 0x52, + 0xbf, 0xab, 0xdf, 0x2f, 0x25, 0xc5, 0xad, 0xfd, 0xf5, 0xd3, 0x65, 0x85, 0xf7, 0x65, 0x3f, 0x59, + 0x60, 0x29, 0x25, 0x5c, 0xae, 0x5c, 0x11, 0x89, 0x21, 0xac, 0x02, 0x33, 0x25, 0x3d, 0x92, 0x72, + 0xe2, 0xcb, 0x15, 0x32, 0xd1, 0x58, 0x86, 0x77, 0x80, 0x19, 0x60, 0xe6, 0x76, 0x19, 0xf1, 0xd5, + 0x72, 0xa0, 0xd5, 0x00, 0xb3, 0x8f, 0x19, 0xf1, 0x9f, 0x18, 0x5f, 0x7c, 0x69, 0x2f, 0x38, 0x18, + 0x14, 0xf4, 0xbd, 0xb7, 0xdb, 0x89, 0xc8, 0x35, 0x6d, 0xb6, 0x07, 0x8a, 0x8c, 0xd3, 0x14, 0x07, + 0xc4, 0x3d, 0x23, 0x03, 0xdd, 0x6c, 0xaa, 0x75, 0xb4, 0xfe, 0xb7, 0x64, 0xc0, 0xd0, 0xb4, 0xa0, + 0x29, 0xbe, 0x34, 0x40, 0xe1, 0x34, 0xc5, 0x1e, 0xd1, 0xb7, 0x58, 0xd1, 0xb0, 0x42, 0x4c, 0x35, + 0x85, 0x96, 0x04, 0x37, 0x0f, 0x63, 0x42, 0xbb, 0x5c, 0x7f, 0x54, 0x23, 0x51, 0x78, 0xa4, 0x84, + 0xf4, 0x89, 0x27, 0x6b, 0x69, 0x20, 0x2d, 0xc1, 0x7d, 0xb0, 0xe6, 0x87, 0x0c, 0xb7, 0x22, 0xf9, + 0xf6, 0xf1, 0xce, 0x54, 0xfa, 0x75, 0xeb, 0x3c, 0xb3, 0x8b, 0x7a, 0xa2, 0x29, 0xf4, 0x68, 0x46, + 0x82, 0x1f, 0x82, 0xf5, 0x89, 0x9b, 0x8c, 0x56, 0x3d, 0xf9, 0xea, 0xf0, 0x3c, 0xb3, 0x4b, 0x63, + 0x53, 0x39, 0x83, 0xe6, 0x64, 0xb1, 0xdc, 0x3e, 0x69, 0x75, 0x03, 0xd9, 0x81, 0x26, 0x52, 0x82, + 0xd0, 0x46, 0x61, 0x1c, 0x72, 0xd9, 0x71, 0xcb, 0x48, 0x09, 0xf0, 0x43, 0x90, 0xa7, 0x3d, 0x92, + 0xa6, 0xa1, 0x2f, 0x9f, 0x62, 0xdf, 0xff, 0x84, 0x45, 0x13, 0x7b, 0x91, 0x1c, 0x49, 0x64, 0x90, + 0x31, 0x89, 0x69, 0x3a, 0x90, 0xf7, 0x04, 0x9d, 0x9c, 0x9a, 0x78, 0x2e, 0xf5, 0x68, 0x46, 0x82, + 0x75, 0x00, 0xb5, 0x5b, 0x4a, 0x78, 0x37, 0x4d, 0x5c, 0xb9, 0x09, 0x14, 0xa5, 0xaf, 0xfc, 0x14, + 0xd5, 0x2c, 0x92, 0x93, 0x4f, 0x31, 0xc7, 0xe8, 0x92, 0x06, 0xfe, 0x12, 0x40, 0xb5, 0x26, 0xee, + 0xe7, 0x8c, 0x8e, 0xdf, 0xe0, 0xea, 0xa0, 0x97, 0xfc, 0x6a, 0x56, 0xc7, 0x6c, 0x29, 0xe9, 0x98, + 0x51, 0x9d, 0xc5, 0xb1, 0x61, 0x1a, 0xd6, 0xb2, 0x7a, 0x37, 0x8e, 0xeb, 0xa7, 0xb3, 0x40, 0x9b, + 0x23, 0x79, 0x2a, 0xbc, 0xfb, 0x7f, 0xcb, 0x81, 0xa9, 0xe7, 0x17, 0xfc, 0x39, 0xa8, 0x1e, 0x1c, + 0x1e, 0x36, 0x9a, 0x4d, 0xf7, 0xf4, 0xd3, 0x93, 0x86, 0x7b, 0xd2, 0x40, 0xcf, 0x8f, 0x9a, 0xcd, + 0xa3, 0x97, 0x2f, 0x9e, 0x35, 0x9a, 0x4d, 0x6b, 0xa1, 0xfa, 0xde, 0xeb, 0xb7, 0x3b, 0x95, 0x89, + 0xfd, 0x89, 0xa8, 0x27, 0x63, 0x21, 0x4d, 0x22, 0xd1, 0xa9, 0x1f, 0x80, 0x5b, 0xd3, 0xde, 0xa8, + 0xd1, 0x3c, 0x45, 0x47, 0x87, 0xa7, 0x8d, 0xa7, 0x56, 0xae, 0x5a, 0x79, 0xfd, 0x76, 0xa7, 0x3c, + 0xf1, 0x44, 0x84, 0xf1, 0x34, 0x14, 0x8f, 0x7b, 0xf8, 0x18, 0x54, 0xae, 0xe6, 0x6c, 0x3c, 0xb5, + 0x16, 0xab, 0xd5, 0xd7, 0x6f, 0x77, 0x6e, 0x5d, 0xc5, 0x48, 0xfc, 0xaa, 0xf1, 0xc5, 0x5f, 0xb6, + 0x17, 0xea, 0x2f, 0xbf, 0x1e, 0x6e, 0xe7, 0xbe, 0x19, 0x6e, 0xe7, 0xfe, 0x3d, 0xdc, 0xce, 0xbd, + 0x79, 0xb7, 0xbd, 0xf0, 0xcd, 0xbb, 0xed, 0x85, 0x7f, 0xbc, 0xdb, 0x5e, 0xf8, 0xfd, 0x7e, 0x10, + 0xf2, 0x76, 0xb7, 0xb5, 0xeb, 0xd1, 0xb8, 0xd6, 0x4f, 0x3b, 0x91, 0x78, 0x66, 0x27, 0xd4, 0x27, + 0xb5, 0xde, 0xcf, 0x6a, 0xe2, 0x61, 0xc9, 0x6a, 0x11, 0x09, 0xb0, 0x37, 0xa8, 0xcd, 0xfc, 0x96, + 0xd3, 0x5a, 0x91, 0x3f, 0xc5, 0x3c, 0xfa, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x14, 0x71, 0x7d, + 0xa7, 0xe3, 0x11, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ActiveStaticPrecompiles) > 0 { + for iNdEx := len(m.ActiveStaticPrecompiles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ActiveStaticPrecompiles[iNdEx]) + copy(dAtA[i:], m.ActiveStaticPrecompiles[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ActiveStaticPrecompiles[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + { + size, err := m.AccessControl.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + if len(m.EVMChannels) > 0 { + for iNdEx := len(m.EVMChannels) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EVMChannels[iNdEx]) + copy(dAtA[i:], m.EVMChannels[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.EVMChannels[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if m.AllowUnprotectedTxs { + i-- + if m.AllowUnprotectedTxs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + { + size, err := m.ChainConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.ExtraEIPs) > 0 { + for iNdEx := len(m.ExtraEIPs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ExtraEIPs[iNdEx]) + copy(dAtA[i:], m.ExtraEIPs[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ExtraEIPs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.EvmDenom) > 0 { + i -= len(m.EvmDenom) + copy(dAtA[i:], m.EvmDenom) + i = encodeVarintEvm(dAtA, i, uint64(len(m.EvmDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccessControl) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessControl) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessControl) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Call.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Create.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *AccessControlType) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessControlType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessControlType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccessControlList) > 0 { + for iNdEx := len(m.AccessControlList) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccessControlList[iNdEx]) + copy(dAtA[i:], m.AccessControlList[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.AccessControlList[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.AccessType != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.AccessType)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ChainConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChainConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CancunBlock != nil { + { + size := m.CancunBlock.Size() + i -= size + if _, err := m.CancunBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + if m.ShanghaiBlock != nil { + { + size := m.ShanghaiBlock.Size() + i -= size + if _, err := m.ShanghaiBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if m.MergeNetsplitBlock != nil { + { + size := m.MergeNetsplitBlock.Size() + i -= size + if _, err := m.MergeNetsplitBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + if m.GrayGlacierBlock != nil { + { + size := m.GrayGlacierBlock.Size() + i -= size + if _, err := m.GrayGlacierBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if m.ArrowGlacierBlock != nil { + { + size := m.ArrowGlacierBlock.Size() + i -= size + if _, err := m.ArrowGlacierBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if m.LondonBlock != nil { + { + size := m.LondonBlock.Size() + i -= size + if _, err := m.LondonBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if m.BerlinBlock != nil { + { + size := m.BerlinBlock.Size() + i -= size + if _, err := m.BerlinBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + if m.MuirGlacierBlock != nil { + { + size := m.MuirGlacierBlock.Size() + i -= size + if _, err := m.MuirGlacierBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.IstanbulBlock != nil { + { + size := m.IstanbulBlock.Size() + i -= size + if _, err := m.IstanbulBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.PetersburgBlock != nil { + { + size := m.PetersburgBlock.Size() + i -= size + if _, err := m.PetersburgBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.ConstantinopleBlock != nil { + { + size := m.ConstantinopleBlock.Size() + i -= size + if _, err := m.ConstantinopleBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if m.ByzantiumBlock != nil { + { + size := m.ByzantiumBlock.Size() + i -= size + if _, err := m.ByzantiumBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.EIP158Block != nil { + { + size := m.EIP158Block.Size() + i -= size + if _, err := m.EIP158Block.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.EIP155Block != nil { + { + size := m.EIP155Block.Size() + i -= size + if _, err := m.EIP155Block.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.EIP150Hash) > 0 { + i -= len(m.EIP150Hash) + copy(dAtA[i:], m.EIP150Hash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.EIP150Hash))) + i-- + dAtA[i] = 0x2a + } + if m.EIP150Block != nil { + { + size := m.EIP150Block.Size() + i -= size + if _, err := m.EIP150Block.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.DAOForkSupport { + i-- + if m.DAOForkSupport { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.DAOForkBlock != nil { + { + size := m.DAOForkBlock.Size() + i -= size + if _, err := m.DAOForkBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.HomesteadBlock != nil { + { + size := m.HomesteadBlock.Size() + i -= size + if _, err := m.HomesteadBlock.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *State) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *State) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TransactionLogs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransactionLogs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransactionLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Logs) > 0 { + for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Log) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Log) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Removed { + i-- + if m.Removed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.Index != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x40 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x3a + } + if m.TxIndex != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x30 + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintEvm(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x2a + } + if m.BlockNumber != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x20 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x1a + } + if len(m.Topics) > 0 { + for iNdEx := len(m.Topics) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Topics[iNdEx]) + copy(dAtA[i:], m.Topics[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Topics[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TxResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasUsed != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if m.Reverted { + i-- + if m.Reverted { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.Ret) > 0 { + i -= len(m.Ret) + copy(dAtA[i:], m.Ret) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Ret))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.TxLogs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Bloom) > 0 { + i -= len(m.Bloom) + copy(dAtA[i:], m.Bloom) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Bloom))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccessTuple) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessTuple) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StorageKeys) > 0 { + for iNdEx := len(m.StorageKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.StorageKeys[iNdEx]) + copy(dAtA[i:], m.StorageKeys[iNdEx]) + i = encodeVarintEvm(dAtA, i, uint64(len(m.StorageKeys[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TraceConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TraceConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TracerJsonConfig) > 0 { + i -= len(m.TracerJsonConfig) + copy(dAtA[i:], m.TracerJsonConfig) + i = encodeVarintEvm(dAtA, i, uint64(len(m.TracerJsonConfig))) + i-- + dAtA[i] = 0x6a + } + if m.EnableReturnData { + i-- + if m.EnableReturnData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.EnableMemory { + i-- + if m.EnableMemory { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.Overrides != nil { + { + size, err := m.Overrides.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.Limit != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x48 + } + if m.Debug { + i-- + if m.Debug { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.DisableStorage { + i-- + if m.DisableStorage { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.DisableStack { + i-- + if m.DisableStack { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Reexec != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Reexec)) + i-- + dAtA[i] = 0x18 + } + if len(m.Timeout) > 0 { + i -= len(m.Timeout) + copy(dAtA[i:], m.Timeout) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Timeout))) + i-- + dAtA[i] = 0x12 + } + if len(m.Tracer) > 0 { + i -= len(m.Tracer) + copy(dAtA[i:], m.Tracer) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Tracer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { + offset -= sovEvm(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EvmDenom) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.ExtraEIPs) > 0 { + for _, s := range m.ExtraEIPs { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + l = m.ChainConfig.Size() + n += 1 + l + sovEvm(uint64(l)) + if m.AllowUnprotectedTxs { + n += 2 + } + if len(m.EVMChannels) > 0 { + for _, s := range m.EVMChannels { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + l = m.AccessControl.Size() + n += 1 + l + sovEvm(uint64(l)) + if len(m.ActiveStaticPrecompiles) > 0 { + for _, s := range m.ActiveStaticPrecompiles { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *AccessControl) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Create.Size() + n += 1 + l + sovEvm(uint64(l)) + l = m.Call.Size() + n += 1 + l + sovEvm(uint64(l)) + return n +} + +func (m *AccessControlType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AccessType != 0 { + n += 1 + sovEvm(uint64(m.AccessType)) + } + if len(m.AccessControlList) > 0 { + for _, s := range m.AccessControlList { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *ChainConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HomesteadBlock != nil { + l = m.HomesteadBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.DAOForkBlock != nil { + l = m.DAOForkBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.DAOForkSupport { + n += 2 + } + if m.EIP150Block != nil { + l = m.EIP150Block.Size() + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.EIP150Hash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.EIP155Block != nil { + l = m.EIP155Block.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.EIP158Block != nil { + l = m.EIP158Block.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.ByzantiumBlock != nil { + l = m.ByzantiumBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.ConstantinopleBlock != nil { + l = m.ConstantinopleBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.PetersburgBlock != nil { + l = m.PetersburgBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.IstanbulBlock != nil { + l = m.IstanbulBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.MuirGlacierBlock != nil { + l = m.MuirGlacierBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.BerlinBlock != nil { + l = m.BerlinBlock.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.LondonBlock != nil { + l = m.LondonBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.ArrowGlacierBlock != nil { + l = m.ArrowGlacierBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.GrayGlacierBlock != nil { + l = m.GrayGlacierBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.MergeNetsplitBlock != nil { + l = m.MergeNetsplitBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.ShanghaiBlock != nil { + l = m.ShanghaiBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + if m.CancunBlock != nil { + l = m.CancunBlock.Size() + n += 2 + l + sovEvm(uint64(l)) + } + return n +} + +func (m *State) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + return n +} + +func (m *TransactionLogs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.Logs) > 0 { + for _, e := range m.Logs { + l = e.Size() + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *Log) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.Topics) > 0 { + for _, s := range m.Topics { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.BlockNumber != 0 { + n += 1 + sovEvm(uint64(m.BlockNumber)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.TxIndex != 0 { + n += 1 + sovEvm(uint64(m.TxIndex)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.Index != 0 { + n += 1 + sovEvm(uint64(m.Index)) + } + if m.Removed { + n += 2 + } + return n +} + +func (m *TxResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Bloom) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = m.TxLogs.Size() + n += 1 + l + sovEvm(uint64(l)) + l = len(m.Ret) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.Reverted { + n += 2 + } + if m.GasUsed != 0 { + n += 1 + sovEvm(uint64(m.GasUsed)) + } + return n +} + +func (m *AccessTuple) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.StorageKeys) > 0 { + for _, s := range m.StorageKeys { + l = len(s) + n += 1 + l + sovEvm(uint64(l)) + } + } + return n +} + +func (m *TraceConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Tracer) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Timeout) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if m.Reexec != 0 { + n += 1 + sovEvm(uint64(m.Reexec)) + } + if m.DisableStack { + n += 2 + } + if m.DisableStorage { + n += 2 + } + if m.Debug { + n += 2 + } + if m.Limit != 0 { + n += 1 + sovEvm(uint64(m.Limit)) + } + if m.Overrides != nil { + l = m.Overrides.Size() + n += 1 + l + sovEvm(uint64(l)) + } + if m.EnableMemory { + n += 2 + } + if m.EnableReturnData { + n += 2 + } + l = len(m.TracerJsonConfig) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + return n +} + +func sovEvm(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvm(x uint64) (n int) { + return sovEvm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvmDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvmDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtraEIPs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExtraEIPs = append(m.ExtraEIPs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ChainConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowUnprotectedTxs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowUnprotectedTxs = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EVMChannels", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EVMChannels = append(m.EVMChannels, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessControl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AccessControl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveStaticPrecompiles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ActiveStaticPrecompiles = append(m.ActiveStaticPrecompiles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessControl) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessControl: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessControl: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Create", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Create.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Call", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Call.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessControlType) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessControlType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessControlType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessType", wireType) + } + m.AccessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccessType |= AccessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessControlList", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccessControlList = append(m.AccessControlList, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChainConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HomesteadBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.HomesteadBlock = &v + if err := m.HomesteadBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DAOForkBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.DAOForkBlock = &v + if err := m.DAOForkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DAOForkSupport", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DAOForkSupport = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP150Block", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.EIP150Block = &v + if err := m.EIP150Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP150Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EIP150Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP155Block", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.EIP155Block = &v + if err := m.EIP155Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EIP158Block", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.EIP158Block = &v + if err := m.EIP158Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByzantiumBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ByzantiumBlock = &v + if err := m.ByzantiumBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConstantinopleBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ConstantinopleBlock = &v + if err := m.ConstantinopleBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PetersburgBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.PetersburgBlock = &v + if err := m.PetersburgBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IstanbulBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.IstanbulBlock = &v + if err := m.IstanbulBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MuirGlacierBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.MuirGlacierBlock = &v + if err := m.MuirGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BerlinBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.BerlinBlock = &v + if err := m.BerlinBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LondonBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.LondonBlock = &v + if err := m.LondonBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ArrowGlacierBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ArrowGlacierBlock = &v + if err := m.ArrowGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrayGlacierBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GrayGlacierBlock = &v + if err := m.GrayGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MergeNetsplitBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.MergeNetsplitBlock = &v + if err := m.MergeNetsplitBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShanghaiBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ShanghaiBlock = &v + if err := m.ShanghaiBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CancunBlock", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.CancunBlock = &v + if err := m.CancunBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *State) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: State: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransactionLogs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransactionLogs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransactionLogs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = append(m.Logs, &Log{}) + if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Log) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Log: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Topics = append(m.Topics, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Removed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Removed = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TxResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bloom", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bloom = append(m.Bloom[:0], dAtA[iNdEx:postIndex]...) + if m.Bloom == nil { + m.Bloom = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxLogs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TxLogs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) + if m.Ret == nil { + m.Ret = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reverted", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Reverted = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessTuple) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessTuple: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessTuple: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageKeys = append(m.StorageKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tracer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tracer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timeout = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reexec", wireType) + } + m.Reexec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Reexec |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableStack", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableStack = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableStorage", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableStorage = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Debug = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Overrides == nil { + m.Overrides = &ChainConfig{} + } + if err := m.Overrides.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableMemory", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableMemory = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableReturnData", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableReturnData = bool(v != 0) + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TracerJsonConfig", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TracerJsonConfig = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvm(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvm + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvm + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvm + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvm = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvm = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvm = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/evm/genesis.pb.go b/types/legacy/ethermint/evm/genesis.pb.go new file mode 100644 index 0000000..2e8491a --- /dev/null +++ b/types/legacy/ethermint/evm/genesis.pb.go @@ -0,0 +1,683 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/genesis.proto + +package evm + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the evm module's genesis state. +type GenesisState struct { + // accounts is an array containing the ethereum genesis accounts. + Accounts []GenesisAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_9bcdec50cc9d156d, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetAccounts() []GenesisAccount { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// GenesisAccount defines an account to be initialized in the genesis state. +// Its main difference between with Geth's GenesisAccount is that it uses a +// custom storage type and that it doesn't contain the private key field. +type GenesisAccount struct { + // address defines an ethereum hex formated address of an account + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // code defines the hex bytes of the account code. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // storage defines the set of state key values for the account. + Storage Storage `protobuf:"bytes,3,rep,name=storage,proto3,castrepeated=Storage" json:"storage"` +} + +func (m *GenesisAccount) Reset() { *m = GenesisAccount{} } +func (m *GenesisAccount) String() string { return proto.CompactTextString(m) } +func (*GenesisAccount) ProtoMessage() {} +func (*GenesisAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_9bcdec50cc9d156d, []int{1} +} +func (m *GenesisAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisAccount.Merge(m, src) +} +func (m *GenesisAccount) XXX_Size() int { + return m.Size() +} +func (m *GenesisAccount) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisAccount proto.InternalMessageInfo + +func (m *GenesisAccount) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *GenesisAccount) GetCode() string { + if m != nil { + return m.Code + } + return "" +} + +func (m *GenesisAccount) GetStorage() Storage { + if m != nil { + return m.Storage + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "ethermint.evm.v1.GenesisState") + proto.RegisterType((*GenesisAccount)(nil), "ethermint.evm.v1.GenesisAccount") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/genesis.proto", fileDescriptor_9bcdec50cc9d156d) } + +var fileDescriptor_9bcdec50cc9d156d = []byte{ + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x31, 0x4f, 0x02, 0x31, + 0x14, 0xc7, 0xaf, 0x62, 0x40, 0x8a, 0x31, 0xda, 0x90, 0x78, 0x61, 0x28, 0x84, 0x89, 0x38, 0x5c, + 0x03, 0xc6, 0xc1, 0x38, 0xc9, 0xc2, 0xa8, 0x81, 0xcd, 0xad, 0xdc, 0xbd, 0x1c, 0x97, 0x70, 0xd7, + 0x4b, 0x5b, 0x2e, 0xf2, 0x09, 0x5c, 0x1d, 0xfc, 0x10, 0xc6, 0xc9, 0x8f, 0xc1, 0xc8, 0xe8, 0xa4, + 0x06, 0x06, 0xbf, 0x86, 0xb9, 0x16, 0x88, 0x78, 0x4b, 0xf3, 0xda, 0xf7, 0xff, 0xbf, 0xdf, 0x7b, + 0xaf, 0x98, 0x82, 0x9e, 0x80, 0x8c, 0xa3, 0x44, 0x33, 0xc8, 0x62, 0x96, 0x75, 0x59, 0x08, 0x09, + 0xa8, 0x48, 0x79, 0xa9, 0x14, 0x5a, 0x90, 0xd3, 0x5d, 0xde, 0x83, 0x2c, 0xf6, 0xb2, 0x6e, 0xe3, + 0x8c, 0xc7, 0x51, 0x22, 0x98, 0x39, 0xad, 0xa8, 0xd1, 0x28, 0x14, 0xc9, 0xb5, 0x36, 0x57, 0x0f, + 0x45, 0x28, 0x4c, 0xc8, 0xf2, 0xc8, 0xbe, 0xb6, 0x5f, 0x10, 0x3e, 0x1e, 0x58, 0xd0, 0x48, 0x73, + 0x0d, 0x64, 0x80, 0x8f, 0xb8, 0xef, 0x8b, 0x59, 0xa2, 0x95, 0x8b, 0x5a, 0xa5, 0x4e, 0xad, 0xd7, + 0xf2, 0xfe, 0xa3, 0xbd, 0x8d, 0xe3, 0xd6, 0x0a, 0xfb, 0xd5, 0xc5, 0x67, 0xd3, 0x79, 0xfd, 0x79, + 0xbf, 0x40, 0xc3, 0x9d, 0x99, 0xdc, 0xe0, 0x72, 0xca, 0x25, 0x8f, 0x95, 0x7b, 0xd0, 0x42, 0x9d, + 0x5a, 0xcf, 0x2d, 0x96, 0xb9, 0x37, 0xf9, 0xbf, 0xf6, 0x8d, 0xa5, 0xfd, 0x84, 0xf0, 0xc9, 0x3e, + 0x84, 0xb8, 0xb8, 0xc2, 0x83, 0x40, 0x82, 0xca, 0xfb, 0x42, 0x9d, 0xea, 0x70, 0x7b, 0x25, 0x04, + 0x1f, 0xfa, 0x22, 0x00, 0xc3, 0xa9, 0x0e, 0x4d, 0x4c, 0x06, 0xb8, 0xa2, 0xb4, 0x90, 0x3c, 0x04, + 0xb7, 0x64, 0xa6, 0x38, 0x2f, 0xe2, 0xcd, 0xc0, 0xfd, 0x7a, 0x4e, 0x7f, 0xfb, 0x6a, 0x56, 0x46, + 0x56, 0x6f, 0x1b, 0xd9, 0xba, 0xfb, 0x77, 0x8b, 0x15, 0x45, 0xcb, 0x15, 0x45, 0xdf, 0x2b, 0x8a, + 0x9e, 0xd7, 0xd4, 0x59, 0xae, 0xa9, 0xf3, 0xb1, 0xa6, 0xce, 0xc3, 0x55, 0x18, 0xe9, 0xc9, 0x6c, + 0xec, 0xf9, 0x22, 0x66, 0x8f, 0x32, 0x9d, 0xe6, 0x1b, 0x4f, 0x44, 0x00, 0x2c, 0xbb, 0x66, 0x7a, + 0x9e, 0x82, 0x62, 0x53, 0x08, 0xb9, 0x3f, 0x67, 0x7b, 0x9f, 0x32, 0x2e, 0x9b, 0xc5, 0x5f, 0xfe, + 0x06, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xd9, 0x7d, 0xe3, 0xf1, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GenesisAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Storage) > 0 { + for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *GenesisAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.Storage) > 0 { + for _, e := range m.Storage { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, GenesisAccount{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Storage = append(m.Storage, State{}) + if err := m.Storage[len(m.Storage)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/evm/query.pb.go b/types/legacy/ethermint/evm/query.pb.go new file mode 100644 index 0000000..31f7768 --- /dev/null +++ b/types/legacy/ethermint/evm/query.pb.go @@ -0,0 +1,6103 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/query.proto + +package evm + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryAccountRequest is the request type for the Query/Account RPC method. +type QueryAccountRequest struct { + // address is the ethereum hex address to query the account for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryAccountRequest) Reset() { *m = QueryAccountRequest{} } +func (m *QueryAccountRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountRequest) ProtoMessage() {} +func (*QueryAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{0} +} +func (m *QueryAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountRequest.Merge(m, src) +} +func (m *QueryAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo + +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { + // balance is the balance of the EVM denomination. + Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` + // code_hash is the hex-formatted code bytes from the EOA. + CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` + // nonce is the account's sequence number. + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } +func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{1} +} +func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountResponse.Merge(m, src) +} +func (m *QueryAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo + +func (m *QueryAccountResponse) GetBalance() string { + if m != nil { + return m.Balance + } + return "" +} + +func (m *QueryAccountResponse) GetCodeHash() string { + if m != nil { + return m.CodeHash + } + return "" +} + +func (m *QueryAccountResponse) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + +// QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC +// method. +type QueryCosmosAccountRequest struct { + // address is the ethereum hex address to query the account for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryCosmosAccountRequest) Reset() { *m = QueryCosmosAccountRequest{} } +func (m *QueryCosmosAccountRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCosmosAccountRequest) ProtoMessage() {} +func (*QueryCosmosAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{2} +} +func (m *QueryCosmosAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCosmosAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCosmosAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCosmosAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCosmosAccountRequest.Merge(m, src) +} +func (m *QueryCosmosAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCosmosAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCosmosAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCosmosAccountRequest proto.InternalMessageInfo + +// QueryCosmosAccountResponse is the response type for the Query/CosmosAccount +// RPC method. +type QueryCosmosAccountResponse struct { + // cosmos_address is the cosmos address of the account. + CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"` + // sequence is the account's sequence number. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // account_number is the account number + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` +} + +func (m *QueryCosmosAccountResponse) Reset() { *m = QueryCosmosAccountResponse{} } +func (m *QueryCosmosAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCosmosAccountResponse) ProtoMessage() {} +func (*QueryCosmosAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{3} +} +func (m *QueryCosmosAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCosmosAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCosmosAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCosmosAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCosmosAccountResponse.Merge(m, src) +} +func (m *QueryCosmosAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCosmosAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCosmosAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCosmosAccountResponse proto.InternalMessageInfo + +func (m *QueryCosmosAccountResponse) GetCosmosAddress() string { + if m != nil { + return m.CosmosAddress + } + return "" +} + +func (m *QueryCosmosAccountResponse) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *QueryCosmosAccountResponse) GetAccountNumber() uint64 { + if m != nil { + return m.AccountNumber + } + return 0 +} + +// QueryValidatorAccountRequest is the request type for the +// Query/ValidatorAccount RPC method. +type QueryValidatorAccountRequest struct { + // cons_address is the validator cons address to query the account for. + ConsAddress string `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3" json:"cons_address,omitempty"` +} + +func (m *QueryValidatorAccountRequest) Reset() { *m = QueryValidatorAccountRequest{} } +func (m *QueryValidatorAccountRequest) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorAccountRequest) ProtoMessage() {} +func (*QueryValidatorAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{4} +} +func (m *QueryValidatorAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorAccountRequest.Merge(m, src) +} +func (m *QueryValidatorAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorAccountRequest proto.InternalMessageInfo + +// QueryValidatorAccountResponse is the response type for the +// Query/ValidatorAccount RPC method. +type QueryValidatorAccountResponse struct { + // account_address is the cosmos address of the account in bech32 format. + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // sequence is the account's sequence number. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // account_number is the account number + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` +} + +func (m *QueryValidatorAccountResponse) Reset() { *m = QueryValidatorAccountResponse{} } +func (m *QueryValidatorAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorAccountResponse) ProtoMessage() {} +func (*QueryValidatorAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{5} +} +func (m *QueryValidatorAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorAccountResponse.Merge(m, src) +} +func (m *QueryValidatorAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorAccountResponse proto.InternalMessageInfo + +func (m *QueryValidatorAccountResponse) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + +func (m *QueryValidatorAccountResponse) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *QueryValidatorAccountResponse) GetAccountNumber() uint64 { + if m != nil { + return m.AccountNumber + } + return 0 +} + +// QueryBalanceRequest is the request type for the Query/Balance RPC method. +type QueryBalanceRequest struct { + // address is the ethereum hex address to query the balance for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } +func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceRequest) ProtoMessage() {} +func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{6} +} +func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceRequest.Merge(m, src) +} +func (m *QueryBalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo + +// QueryBalanceResponse is the response type for the Query/Balance RPC method. +type QueryBalanceResponse struct { + // balance is the balance of the EVM denomination. + Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } +func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceResponse) ProtoMessage() {} +func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{7} +} +func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceResponse.Merge(m, src) +} +func (m *QueryBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo + +func (m *QueryBalanceResponse) GetBalance() string { + if m != nil { + return m.Balance + } + return "" +} + +// QueryStorageRequest is the request type for the Query/Storage RPC method. +type QueryStorageRequest struct { + // address is the ethereum hex address to query the storage state for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // key defines the key of the storage state + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *QueryStorageRequest) Reset() { *m = QueryStorageRequest{} } +func (m *QueryStorageRequest) String() string { return proto.CompactTextString(m) } +func (*QueryStorageRequest) ProtoMessage() {} +func (*QueryStorageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{8} +} +func (m *QueryStorageRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStorageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStorageRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryStorageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStorageRequest.Merge(m, src) +} +func (m *QueryStorageRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryStorageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStorageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStorageRequest proto.InternalMessageInfo + +// QueryStorageResponse is the response type for the Query/Storage RPC +// method. +type QueryStorageResponse struct { + // value defines the storage state value hash associated with the given key. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *QueryStorageResponse) Reset() { *m = QueryStorageResponse{} } +func (m *QueryStorageResponse) String() string { return proto.CompactTextString(m) } +func (*QueryStorageResponse) ProtoMessage() {} +func (*QueryStorageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{9} +} +func (m *QueryStorageResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStorageResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryStorageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStorageResponse.Merge(m, src) +} +func (m *QueryStorageResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryStorageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStorageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStorageResponse proto.InternalMessageInfo + +func (m *QueryStorageResponse) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// QueryCodeRequest is the request type for the Query/Code RPC method. +type QueryCodeRequest struct { + // address is the ethereum hex address to query the code for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryCodeRequest) Reset() { *m = QueryCodeRequest{} } +func (m *QueryCodeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCodeRequest) ProtoMessage() {} +func (*QueryCodeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{10} +} +func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCodeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCodeRequest.Merge(m, src) +} +func (m *QueryCodeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCodeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCodeRequest proto.InternalMessageInfo + +// QueryCodeResponse is the response type for the Query/Code RPC +// method. +type QueryCodeResponse struct { + // code represents the code bytes from an ethereum address. + Code []byte `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` +} + +func (m *QueryCodeResponse) Reset() { *m = QueryCodeResponse{} } +func (m *QueryCodeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCodeResponse) ProtoMessage() {} +func (*QueryCodeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{11} +} +func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCodeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCodeResponse.Merge(m, src) +} +func (m *QueryCodeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCodeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCodeResponse proto.InternalMessageInfo + +func (m *QueryCodeResponse) GetCode() []byte { + if m != nil { + return m.Code + } + return nil +} + +// QueryTxLogsRequest is the request type for the Query/TxLogs RPC method. +type QueryTxLogsRequest struct { + // hash is the ethereum transaction hex hash to query the logs for. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTxLogsRequest) Reset() { *m = QueryTxLogsRequest{} } +func (m *QueryTxLogsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTxLogsRequest) ProtoMessage() {} +func (*QueryTxLogsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{12} +} +func (m *QueryTxLogsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTxLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTxLogsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTxLogsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTxLogsRequest.Merge(m, src) +} +func (m *QueryTxLogsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTxLogsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTxLogsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTxLogsRequest proto.InternalMessageInfo + +// QueryTxLogsResponse is the response type for the Query/TxLogs RPC method. +type QueryTxLogsResponse struct { + // logs represents the ethereum logs generated from the given transaction. + Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTxLogsResponse) Reset() { *m = QueryTxLogsResponse{} } +func (m *QueryTxLogsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTxLogsResponse) ProtoMessage() {} +func (*QueryTxLogsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{13} +} +func (m *QueryTxLogsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTxLogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTxLogsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTxLogsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTxLogsResponse.Merge(m, src) +} +func (m *QueryTxLogsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTxLogsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTxLogsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTxLogsResponse proto.InternalMessageInfo + +func (m *QueryTxLogsResponse) GetLogs() []*Log { + if m != nil { + return m.Logs + } + return nil +} + +func (m *QueryTxLogsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryParamsRequest defines the request type for querying x/evm parameters. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{14} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse defines the response type for querying x/evm parameters. +type QueryParamsResponse struct { + // params define the evm module parameters. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{15} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// EthCallRequest defines EthCall request +type EthCallRequest struct { + // args uses the same json format as the json rpc api. + Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"` + // gas_cap defines the default gas cap to be used + GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"` + // proposer_address of the requested block in hex format + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` + // chain_id is the eip155 chain id parsed from the requested block header + ChainId int64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +} + +func (m *EthCallRequest) Reset() { *m = EthCallRequest{} } +func (m *EthCallRequest) String() string { return proto.CompactTextString(m) } +func (*EthCallRequest) ProtoMessage() {} +func (*EthCallRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{16} +} +func (m *EthCallRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthCallRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EthCallRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthCallRequest.Merge(m, src) +} +func (m *EthCallRequest) XXX_Size() int { + return m.Size() +} +func (m *EthCallRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EthCallRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EthCallRequest proto.InternalMessageInfo + +func (m *EthCallRequest) GetArgs() []byte { + if m != nil { + return m.Args + } + return nil +} + +func (m *EthCallRequest) GetGasCap() uint64 { + if m != nil { + return m.GasCap + } + return 0 +} + +func (m *EthCallRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *EthCallRequest) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +// EstimateGasResponse defines EstimateGas response +type EstimateGasResponse struct { + // gas returns the estimated gas + Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"` + // ret is the returned data from evm function (result or data supplied with revert + // opcode) + Ret []byte `protobuf:"bytes,2,opt,name=ret,proto3" json:"ret,omitempty"` + // vm_error is the error returned by vm execution + VmError string `protobuf:"bytes,3,opt,name=vm_error,json=vmError,proto3" json:"vm_error,omitempty"` +} + +func (m *EstimateGasResponse) Reset() { *m = EstimateGasResponse{} } +func (m *EstimateGasResponse) String() string { return proto.CompactTextString(m) } +func (*EstimateGasResponse) ProtoMessage() {} +func (*EstimateGasResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{17} +} +func (m *EstimateGasResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EstimateGasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EstimateGasResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EstimateGasResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EstimateGasResponse.Merge(m, src) +} +func (m *EstimateGasResponse) XXX_Size() int { + return m.Size() +} +func (m *EstimateGasResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EstimateGasResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EstimateGasResponse proto.InternalMessageInfo + +func (m *EstimateGasResponse) GetGas() uint64 { + if m != nil { + return m.Gas + } + return 0 +} + +func (m *EstimateGasResponse) GetRet() []byte { + if m != nil { + return m.Ret + } + return nil +} + +func (m *EstimateGasResponse) GetVmError() string { + if m != nil { + return m.VmError + } + return "" +} + +// QueryTraceTxRequest defines TraceTx request +type QueryTraceTxRequest struct { + // msg is the MsgEthereumTx for the requested transaction + Msg *MsgEthereumTx `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + // trace_config holds extra parameters to trace functions. + TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + // predecessors is an array of transactions included in the same block + // need to be replayed first to get correct context for tracing. + Predecessors []*MsgEthereumTx `protobuf:"bytes,4,rep,name=predecessors,proto3" json:"predecessors,omitempty"` + // block_number of requested transaction + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // block_hash of requested transaction + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // block_time of requested transaction + BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` + // proposer_address is the proposer of the requested block + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` + // chain_id is the eip155 chain id parsed from the requested block header + ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // block_max_gas of the block of the requested transaction + BlockMaxGas int64 `protobuf:"varint,10,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` +} + +func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } +func (m *QueryTraceTxRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTraceTxRequest) ProtoMessage() {} +func (*QueryTraceTxRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{18} +} +func (m *QueryTraceTxRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceTxRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceTxRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceTxRequest.Merge(m, src) +} +func (m *QueryTraceTxRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceTxRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceTxRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceTxRequest proto.InternalMessageInfo + +func (m *QueryTraceTxRequest) GetMsg() *MsgEthereumTx { + if m != nil { + return m.Msg + } + return nil +} + +func (m *QueryTraceTxRequest) GetTraceConfig() *TraceConfig { + if m != nil { + return m.TraceConfig + } + return nil +} + +func (m *QueryTraceTxRequest) GetPredecessors() []*MsgEthereumTx { + if m != nil { + return m.Predecessors + } + return nil +} + +func (m *QueryTraceTxRequest) GetBlockNumber() int64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *QueryTraceTxRequest) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *QueryTraceTxRequest) GetBlockTime() time.Time { + if m != nil { + return m.BlockTime + } + return time.Time{} +} + +func (m *QueryTraceTxRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *QueryTraceTxRequest) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *QueryTraceTxRequest) GetBlockMaxGas() int64 { + if m != nil { + return m.BlockMaxGas + } + return 0 +} + +// QueryTraceTxResponse defines TraceTx response +type QueryTraceTxResponse struct { + // data is the response serialized in bytes + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *QueryTraceTxResponse) Reset() { *m = QueryTraceTxResponse{} } +func (m *QueryTraceTxResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTraceTxResponse) ProtoMessage() {} +func (*QueryTraceTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{19} +} +func (m *QueryTraceTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceTxResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceTxResponse.Merge(m, src) +} +func (m *QueryTraceTxResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceTxResponse proto.InternalMessageInfo + +func (m *QueryTraceTxResponse) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +// QueryTraceBlockRequest defines TraceTx request +type QueryTraceBlockRequest struct { + // txs is an array of messages in the block + Txs []*MsgEthereumTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + // trace_config holds extra parameters to trace functions. + TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + // block_number of the traced block + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // block_hash (hex) of the traced block + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // block_time of the traced block + BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` + // proposer_address is the address of the requested block + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` + // chain_id is the eip155 chain id parsed from the requested block header + ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // block_max_gas of the traced block + BlockMaxGas int64 `protobuf:"varint,10,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` +} + +func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} } +func (m *QueryTraceBlockRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTraceBlockRequest) ProtoMessage() {} +func (*QueryTraceBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{20} +} +func (m *QueryTraceBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceBlockRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceBlockRequest.Merge(m, src) +} +func (m *QueryTraceBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceBlockRequest proto.InternalMessageInfo + +func (m *QueryTraceBlockRequest) GetTxs() []*MsgEthereumTx { + if m != nil { + return m.Txs + } + return nil +} + +func (m *QueryTraceBlockRequest) GetTraceConfig() *TraceConfig { + if m != nil { + return m.TraceConfig + } + return nil +} + +func (m *QueryTraceBlockRequest) GetBlockNumber() int64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *QueryTraceBlockRequest) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *QueryTraceBlockRequest) GetBlockTime() time.Time { + if m != nil { + return m.BlockTime + } + return time.Time{} +} + +func (m *QueryTraceBlockRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *QueryTraceBlockRequest) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *QueryTraceBlockRequest) GetBlockMaxGas() int64 { + if m != nil { + return m.BlockMaxGas + } + return 0 +} + +// QueryTraceBlockResponse defines TraceBlock response +type QueryTraceBlockResponse struct { + // data is the response serialized in bytes + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *QueryTraceBlockResponse) Reset() { *m = QueryTraceBlockResponse{} } +func (m *QueryTraceBlockResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTraceBlockResponse) ProtoMessage() {} +func (*QueryTraceBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{21} +} +func (m *QueryTraceBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceBlockResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraceBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceBlockResponse.Merge(m, src) +} +func (m *QueryTraceBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceBlockResponse proto.InternalMessageInfo + +func (m *QueryTraceBlockResponse) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +// QueryBaseFeeRequest defines the request type for querying the EIP1559 base +// fee. +type QueryBaseFeeRequest struct { +} + +func (m *QueryBaseFeeRequest) Reset() { *m = QueryBaseFeeRequest{} } +func (m *QueryBaseFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBaseFeeRequest) ProtoMessage() {} +func (*QueryBaseFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{22} +} +func (m *QueryBaseFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBaseFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBaseFeeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBaseFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBaseFeeRequest.Merge(m, src) +} +func (m *QueryBaseFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBaseFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBaseFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo + +// QueryBaseFeeResponse returns the EIP1559 base fee. +type QueryBaseFeeResponse struct { + // base_fee is the EIP1559 base fee + BaseFee *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee,omitempty"` +} + +func (m *QueryBaseFeeResponse) Reset() { *m = QueryBaseFeeResponse{} } +func (m *QueryBaseFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBaseFeeResponse) ProtoMessage() {} +func (*QueryBaseFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{23} +} +func (m *QueryBaseFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBaseFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBaseFeeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBaseFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBaseFeeResponse.Merge(m, src) +} +func (m *QueryBaseFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBaseFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBaseFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBaseFeeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryAccountRequest)(nil), "ethermint.evm.v1.QueryAccountRequest") + proto.RegisterType((*QueryAccountResponse)(nil), "ethermint.evm.v1.QueryAccountResponse") + proto.RegisterType((*QueryCosmosAccountRequest)(nil), "ethermint.evm.v1.QueryCosmosAccountRequest") + proto.RegisterType((*QueryCosmosAccountResponse)(nil), "ethermint.evm.v1.QueryCosmosAccountResponse") + proto.RegisterType((*QueryValidatorAccountRequest)(nil), "ethermint.evm.v1.QueryValidatorAccountRequest") + proto.RegisterType((*QueryValidatorAccountResponse)(nil), "ethermint.evm.v1.QueryValidatorAccountResponse") + proto.RegisterType((*QueryBalanceRequest)(nil), "ethermint.evm.v1.QueryBalanceRequest") + proto.RegisterType((*QueryBalanceResponse)(nil), "ethermint.evm.v1.QueryBalanceResponse") + proto.RegisterType((*QueryStorageRequest)(nil), "ethermint.evm.v1.QueryStorageRequest") + proto.RegisterType((*QueryStorageResponse)(nil), "ethermint.evm.v1.QueryStorageResponse") + proto.RegisterType((*QueryCodeRequest)(nil), "ethermint.evm.v1.QueryCodeRequest") + proto.RegisterType((*QueryCodeResponse)(nil), "ethermint.evm.v1.QueryCodeResponse") + proto.RegisterType((*QueryTxLogsRequest)(nil), "ethermint.evm.v1.QueryTxLogsRequest") + proto.RegisterType((*QueryTxLogsResponse)(nil), "ethermint.evm.v1.QueryTxLogsResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "ethermint.evm.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "ethermint.evm.v1.QueryParamsResponse") + proto.RegisterType((*EthCallRequest)(nil), "ethermint.evm.v1.EthCallRequest") + proto.RegisterType((*EstimateGasResponse)(nil), "ethermint.evm.v1.EstimateGasResponse") + proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest") + proto.RegisterType((*QueryTraceTxResponse)(nil), "ethermint.evm.v1.QueryTraceTxResponse") + proto.RegisterType((*QueryTraceBlockRequest)(nil), "ethermint.evm.v1.QueryTraceBlockRequest") + proto.RegisterType((*QueryTraceBlockResponse)(nil), "ethermint.evm.v1.QueryTraceBlockResponse") + proto.RegisterType((*QueryBaseFeeRequest)(nil), "ethermint.evm.v1.QueryBaseFeeRequest") + proto.RegisterType((*QueryBaseFeeResponse)(nil), "ethermint.evm.v1.QueryBaseFeeResponse") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } + +var fileDescriptor_e15a877459347994 = []byte{ + // 1523 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0x4e, 0xec, 0x8c, 0x93, 0x36, 0x9d, 0xa6, 0xad, 0xe3, 0x26, 0x71, 0xba, 0xdf, + 0x6f, 0x9a, 0xb4, 0xb4, 0xbb, 0x4d, 0x80, 0x4a, 0x85, 0x03, 0xd4, 0x51, 0xfa, 0x83, 0xb6, 0x50, + 0x96, 0x88, 0x03, 0x12, 0xb2, 0xc6, 0xbb, 0xd3, 0xf5, 0x2a, 0xde, 0x1d, 0x77, 0x67, 0x6c, 0x39, + 0xad, 0x7a, 0xa0, 0x42, 0x40, 0xc5, 0xa5, 0x12, 0x37, 0x4e, 0x3d, 0x22, 0x71, 0xe1, 0xd6, 0x23, + 0xd7, 0x1e, 0x2b, 0x71, 0x41, 0x1c, 0x0a, 0x6a, 0x91, 0xe0, 0x6f, 0xe0, 0x84, 0xe6, 0xc7, 0xda, + 0xbb, 0xb6, 0x37, 0x4e, 0x51, 0xb9, 0x71, 0x49, 0x76, 0x66, 0xde, 0x7b, 0x9f, 0xcf, 0xbc, 0x79, + 0x33, 0xef, 0x23, 0x83, 0x05, 0xcc, 0xea, 0x38, 0xf4, 0xbd, 0x80, 0x99, 0xb8, 0xed, 0x9b, 0xed, + 0x75, 0xf3, 0x76, 0x0b, 0x87, 0xbb, 0x46, 0x33, 0x24, 0x8c, 0xc0, 0xd9, 0xee, 0xaa, 0x81, 0xdb, + 0xbe, 0xd1, 0x5e, 0x2f, 0x1d, 0x42, 0xbe, 0x17, 0x10, 0x53, 0xfc, 0x95, 0x46, 0xa5, 0xd3, 0x36, + 0xa1, 0x3e, 0xa1, 0x66, 0x0d, 0x51, 0x2c, 0xbd, 0xcd, 0xf6, 0x7a, 0x0d, 0x33, 0xb4, 0x6e, 0x36, + 0x91, 0xeb, 0x05, 0x88, 0x79, 0x24, 0x50, 0xb6, 0xa5, 0x01, 0x38, 0x1e, 0x57, 0xae, 0xcd, 0x0f, + 0xac, 0xb1, 0x8e, 0x5a, 0x9a, 0x73, 0x89, 0x4b, 0xc4, 0xa7, 0xc9, 0xbf, 0xd4, 0xec, 0x82, 0x4b, + 0x88, 0xdb, 0xc0, 0x26, 0x6a, 0x7a, 0x26, 0x0a, 0x02, 0xc2, 0x04, 0x12, 0x55, 0xab, 0x65, 0xb5, + 0x2a, 0x46, 0xb5, 0xd6, 0x2d, 0x93, 0x79, 0x3e, 0xa6, 0x0c, 0xf9, 0x4d, 0x69, 0xa0, 0x5f, 0x00, + 0x87, 0x3f, 0xe4, 0x6c, 0x2f, 0xda, 0x36, 0x69, 0x05, 0xcc, 0xc2, 0xb7, 0x5b, 0x98, 0x32, 0x58, + 0x04, 0x39, 0xe4, 0x38, 0x21, 0xa6, 0xb4, 0xa8, 0x2d, 0x6b, 0x6b, 0x53, 0x56, 0x34, 0x7c, 0x2b, + 0xff, 0xd5, 0xa3, 0xf2, 0xd8, 0x9f, 0x8f, 0xca, 0x63, 0xba, 0x0d, 0xe6, 0x92, 0xae, 0xb4, 0x49, + 0x02, 0x8a, 0xb9, 0x6f, 0x0d, 0x35, 0x50, 0x60, 0xe3, 0xc8, 0x57, 0x0d, 0xe1, 0x71, 0x30, 0x65, + 0x13, 0x07, 0x57, 0xeb, 0x88, 0xd6, 0x8b, 0xe3, 0x62, 0x2d, 0xcf, 0x27, 0xae, 0x20, 0x5a, 0x87, + 0x73, 0x60, 0x22, 0x20, 0xdc, 0x29, 0xb3, 0xac, 0xad, 0x65, 0x2d, 0x39, 0xd0, 0xdf, 0x01, 0xf3, + 0x02, 0x64, 0x53, 0xa4, 0xf7, 0x1f, 0xb0, 0xfc, 0x42, 0x03, 0xa5, 0x61, 0x11, 0x14, 0xd9, 0x15, + 0x70, 0x40, 0x9e, 0x5c, 0x35, 0x19, 0x69, 0x46, 0xce, 0x5e, 0x94, 0x93, 0xb0, 0x04, 0xf2, 0x94, + 0x83, 0x72, 0x7e, 0xe3, 0x82, 0x5f, 0x77, 0xcc, 0x43, 0x20, 0x19, 0xb5, 0x1a, 0xb4, 0xfc, 0x1a, + 0x0e, 0xd5, 0x0e, 0x66, 0xd4, 0xec, 0xfb, 0x62, 0x52, 0xbf, 0x06, 0x16, 0x04, 0x8f, 0x8f, 0x51, + 0xc3, 0x73, 0x10, 0x23, 0x61, 0xdf, 0x66, 0x4e, 0x80, 0x69, 0x9b, 0x04, 0xfd, 0x3c, 0x0a, 0x7c, + 0xee, 0xe2, 0xc0, 0xae, 0xbe, 0xd6, 0xc0, 0x62, 0x4a, 0x34, 0xb5, 0xb1, 0x55, 0x70, 0x30, 0x62, + 0x95, 0x8c, 0x18, 0x91, 0x7d, 0x85, 0x5b, 0x8b, 0x8a, 0xa8, 0x22, 0xcf, 0xf9, 0x65, 0x8e, 0xe7, + 0x9c, 0x2a, 0xa2, 0xae, 0xeb, 0xa8, 0x22, 0xd2, 0xaf, 0x29, 0xb0, 0x8f, 0x18, 0x09, 0x91, 0x3b, + 0x1a, 0x0c, 0xce, 0x82, 0xcc, 0x0e, 0xde, 0x55, 0xf5, 0xc6, 0x3f, 0x63, 0xf0, 0x67, 0x14, 0x7c, + 0x37, 0x98, 0x82, 0x9f, 0x03, 0x13, 0x6d, 0xd4, 0x68, 0x45, 0xe0, 0x72, 0xa0, 0x9f, 0x07, 0xb3, + 0xaa, 0x94, 0x9c, 0x97, 0xda, 0xe4, 0x2a, 0x38, 0x14, 0xf3, 0x53, 0x10, 0x10, 0x64, 0x79, 0xed, + 0x0b, 0xaf, 0x69, 0x4b, 0x7c, 0xeb, 0x77, 0x00, 0x14, 0x86, 0xdb, 0x9d, 0xeb, 0xc4, 0xa5, 0x11, + 0x04, 0x04, 0x59, 0x71, 0x63, 0x64, 0x7c, 0xf1, 0x0d, 0x2f, 0x01, 0xd0, 0x7b, 0x57, 0xc4, 0xde, + 0x0a, 0x1b, 0x27, 0x0d, 0x59, 0xb4, 0x06, 0x7f, 0x84, 0x0c, 0xf9, 0x84, 0xa9, 0x47, 0xc8, 0xb8, + 0xd9, 0x4b, 0x95, 0x15, 0xf3, 0x8c, 0x91, 0x7c, 0xa0, 0xa9, 0xc4, 0x46, 0xe0, 0x8a, 0xe7, 0x29, + 0x90, 0x6d, 0x10, 0x97, 0xef, 0x2e, 0xb3, 0x56, 0xd8, 0x38, 0x62, 0xf4, 0xbf, 0x86, 0xc6, 0x75, + 0xe2, 0x5a, 0xc2, 0x04, 0x5e, 0x1e, 0x42, 0x6a, 0x75, 0x24, 0x29, 0x89, 0x13, 0x67, 0xa5, 0xcf, + 0xa9, 0x3c, 0xdc, 0x44, 0x21, 0xf2, 0xa3, 0x3c, 0xe8, 0x96, 0x22, 0x18, 0xcd, 0x2a, 0x82, 0x6f, + 0x83, 0xc9, 0xa6, 0x98, 0x11, 0x09, 0x2a, 0x6c, 0x14, 0x07, 0x29, 0x4a, 0x8f, 0xca, 0xd4, 0x93, + 0x67, 0xe5, 0xb1, 0xef, 0xfe, 0xf8, 0xe1, 0xb4, 0x66, 0x29, 0x17, 0xfd, 0xb1, 0x06, 0x0e, 0x6c, + 0xb1, 0xfa, 0x26, 0x6a, 0x34, 0x62, 0xe9, 0x46, 0xa1, 0x4b, 0xa3, 0x83, 0xe1, 0xdf, 0xf0, 0x18, + 0xc8, 0xb9, 0x88, 0x56, 0x6d, 0xd4, 0x54, 0x77, 0x64, 0xd2, 0x45, 0x74, 0x13, 0x35, 0xe1, 0xa7, + 0x60, 0xb6, 0x19, 0x92, 0x26, 0xa1, 0x38, 0xec, 0xde, 0x33, 0x7e, 0x47, 0xa6, 0x2b, 0x1b, 0x7f, + 0x3d, 0x2b, 0x1b, 0xae, 0xc7, 0xea, 0xad, 0x9a, 0x61, 0x13, 0xdf, 0x54, 0x0d, 0x42, 0xfe, 0x3b, + 0x4b, 0x9d, 0x1d, 0x93, 0xed, 0x36, 0x31, 0x35, 0x36, 0x7b, 0x17, 0xdc, 0x3a, 0x18, 0xc5, 0x8a, + 0x2e, 0xe7, 0x3c, 0xc8, 0xdb, 0x75, 0xe4, 0x05, 0x55, 0xcf, 0x29, 0x66, 0x97, 0xb5, 0xb5, 0x8c, + 0x95, 0x13, 0xe3, 0xab, 0x8e, 0xbe, 0x0d, 0x0e, 0x6f, 0x51, 0xe6, 0xf9, 0x88, 0xe1, 0xcb, 0xa8, + 0x97, 0x8d, 0x59, 0x90, 0x71, 0x91, 0x24, 0x9f, 0xb5, 0xf8, 0x27, 0x9f, 0x09, 0x31, 0x13, 0xbc, + 0xa7, 0x2d, 0xfe, 0xc9, 0xa3, 0xb6, 0xfd, 0x2a, 0x0e, 0x43, 0x22, 0x2f, 0xf4, 0x94, 0x95, 0x6b, + 0xfb, 0x5b, 0x7c, 0xa8, 0x3f, 0xc8, 0x46, 0x55, 0x10, 0x22, 0x1b, 0x6f, 0x77, 0xa2, 0xa4, 0xac, + 0x83, 0x8c, 0x4f, 0x5d, 0x95, 0xe1, 0xf2, 0x60, 0x86, 0x6f, 0x50, 0x77, 0x8b, 0xcf, 0xe1, 0x96, + 0xbf, 0xdd, 0xb1, 0xb8, 0x2d, 0x7c, 0x17, 0x4c, 0x33, 0x1e, 0xa4, 0x6a, 0x93, 0xe0, 0x96, 0xe7, + 0x0a, 0xa4, 0xc2, 0xc6, 0xe2, 0xa0, 0xaf, 0x80, 0xda, 0x14, 0x46, 0x56, 0x81, 0xf5, 0x06, 0x70, + 0x13, 0x4c, 0x37, 0x43, 0xec, 0x60, 0x1b, 0x53, 0x4a, 0x42, 0x5a, 0xcc, 0x8a, 0x12, 0x1c, 0x89, + 0x9e, 0x70, 0xe2, 0xef, 0x6a, 0xad, 0x41, 0xec, 0x9d, 0xe8, 0x05, 0x9b, 0x10, 0x69, 0x2c, 0x88, + 0x39, 0xf9, 0x7e, 0xc1, 0x45, 0x00, 0xa4, 0x89, 0xb8, 0x66, 0x93, 0x22, 0x23, 0x53, 0x62, 0x46, + 0x74, 0xa6, 0x2b, 0xd1, 0x32, 0x6f, 0x9e, 0xc5, 0x9c, 0xd8, 0x46, 0xc9, 0x90, 0x9d, 0xd5, 0x88, + 0x3a, 0xab, 0xb1, 0x1d, 0x75, 0xd6, 0xca, 0x0c, 0x2f, 0xb3, 0x87, 0xbf, 0x96, 0x35, 0x59, 0x6a, + 0x32, 0x12, 0x5f, 0x1e, 0x5a, 0x2d, 0xf9, 0x7f, 0xa7, 0x5a, 0xa6, 0x12, 0xd5, 0x02, 0x75, 0x30, + 0x23, 0xf7, 0xe0, 0xa3, 0x4e, 0x95, 0x17, 0x08, 0x88, 0xa5, 0xe1, 0x06, 0xea, 0x5c, 0x46, 0xf4, + 0xbd, 0x6c, 0x7e, 0x7c, 0x36, 0x63, 0xe5, 0x59, 0xa7, 0xea, 0x05, 0x0e, 0xee, 0xe8, 0xa7, 0xd5, + 0xe3, 0xd8, 0x2d, 0x85, 0xde, 0xcb, 0xe5, 0x20, 0x86, 0xa2, 0x0b, 0xc2, 0xbf, 0xf5, 0xc7, 0x19, + 0x70, 0xb4, 0x67, 0x5c, 0xe1, 0x51, 0x63, 0xa5, 0xc3, 0x3a, 0xd1, 0xfb, 0x31, 0xba, 0x74, 0x58, + 0x87, 0xbe, 0x82, 0xd2, 0xf9, 0xef, 0xd4, 0xf7, 0x79, 0xea, 0xfa, 0x59, 0x70, 0x6c, 0xe0, 0xe0, + 0xf6, 0x38, 0xe8, 0x23, 0xdd, 0x5e, 0x4f, 0xf1, 0x25, 0x1c, 0xf5, 0x14, 0xfd, 0x7a, 0xb7, 0x8f, + 0xab, 0x69, 0x15, 0xe2, 0x0d, 0x90, 0xe7, 0x0f, 0x7f, 0xf5, 0x16, 0x56, 0xbd, 0xb4, 0x32, 0xff, + 0xcb, 0xb3, 0xf2, 0x11, 0xb9, 0x43, 0xea, 0xec, 0x18, 0x1e, 0x31, 0x7d, 0xc4, 0xea, 0xc6, 0xd5, + 0x80, 0xf1, 0x1e, 0x2f, 0xbc, 0x37, 0x7e, 0x9c, 0x06, 0x13, 0x22, 0x1c, 0xfc, 0x4c, 0x03, 0x39, + 0x25, 0x6d, 0xe0, 0xca, 0xe0, 0xf9, 0x0f, 0xd1, 0xae, 0xa5, 0x93, 0xa3, 0xcc, 0x24, 0x35, 0x7d, + 0xf5, 0xfe, 0x4f, 0xbf, 0x7f, 0x33, 0x7e, 0x02, 0x96, 0xb9, 0xd2, 0x26, 0x34, 0xd2, 0xdb, 0x4a, + 0xda, 0x98, 0x77, 0xd5, 0x51, 0xdd, 0x83, 0xdf, 0x6a, 0x60, 0x26, 0xa1, 0x1e, 0xe1, 0x6b, 0x29, + 0x10, 0xc3, 0x54, 0x6a, 0xe9, 0xcc, 0xfe, 0x8c, 0x15, 0x2b, 0x43, 0xb0, 0x5a, 0x83, 0x27, 0x93, + 0xac, 0x22, 0x91, 0x3a, 0x40, 0xee, 0x7b, 0x0d, 0xcc, 0xf6, 0x8b, 0x40, 0x68, 0xa4, 0x40, 0xa6, + 0x68, 0xcf, 0x92, 0xb9, 0x6f, 0x7b, 0xc5, 0xf2, 0xbc, 0x60, 0x79, 0x0e, 0x1a, 0x49, 0x96, 0xed, + 0xc8, 0xbe, 0x47, 0x34, 0xae, 0x69, 0xef, 0xc1, 0xfb, 0x1a, 0xc8, 0x29, 0xa9, 0x97, 0x7a, 0x9c, + 0x49, 0x15, 0x99, 0x7a, 0x9c, 0x7d, 0x8a, 0x51, 0x5f, 0x13, 0x94, 0x74, 0xb8, 0x9c, 0xa4, 0xa4, + 0x64, 0x23, 0x8d, 0xa5, 0xec, 0x4b, 0x0d, 0xe4, 0x94, 0xe0, 0x4b, 0x25, 0x91, 0x54, 0x97, 0xa9, + 0x24, 0xfa, 0x74, 0xa3, 0x7e, 0x56, 0x90, 0x58, 0x85, 0x2b, 0x49, 0x12, 0x54, 0x9a, 0xf5, 0x38, + 0x98, 0x77, 0x77, 0xf0, 0xee, 0x3d, 0xd8, 0x06, 0x59, 0xae, 0x09, 0xa1, 0x9e, 0x5a, 0x22, 0x5d, + 0xa1, 0x59, 0xfa, 0xdf, 0x9e, 0x36, 0x0a, 0x7f, 0x45, 0xe0, 0x97, 0xe1, 0x62, 0x7f, 0xf5, 0x38, + 0x89, 0x0c, 0x50, 0x30, 0x29, 0x25, 0x11, 0xfc, 0x7f, 0x4a, 0xd4, 0x84, 0xf2, 0x2a, 0xad, 0x8c, + 0xb0, 0x52, 0xe8, 0x0b, 0x02, 0xfd, 0x28, 0x9c, 0x4b, 0xa2, 0x4b, 0xa9, 0x05, 0x19, 0xc8, 0x29, + 0xa5, 0x05, 0x97, 0x07, 0xe3, 0x25, 0x45, 0x58, 0x69, 0x75, 0x54, 0x9f, 0x88, 0x30, 0x97, 0x04, + 0x66, 0x11, 0x1e, 0x4d, 0x62, 0x62, 0x56, 0xaf, 0xda, 0x1c, 0xea, 0x0e, 0x28, 0xc4, 0x64, 0xd2, + 0x3e, 0x90, 0x87, 0xec, 0x75, 0x88, 0xce, 0xd2, 0x75, 0x81, 0xbb, 0x00, 0x4b, 0x7d, 0xb8, 0xca, + 0x94, 0xbf, 0xb6, 0xb0, 0x03, 0x72, 0xaa, 0x77, 0xa6, 0xd6, 0x59, 0x52, 0x66, 0xa5, 0xd6, 0x59, + 0x5f, 0x0b, 0x4e, 0xdb, 0xb5, 0x6c, 0x9a, 0xac, 0x03, 0x3f, 0xd7, 0x00, 0xe8, 0x3d, 0xe8, 0x70, + 0x6d, 0xaf, 0xb0, 0xf1, 0x66, 0x5d, 0x3a, 0xb5, 0x0f, 0x4b, 0xc5, 0xe1, 0x84, 0xe0, 0x70, 0x1c, + 0xce, 0x0f, 0xe3, 0x20, 0x3a, 0x0c, 0x4f, 0x80, 0x6a, 0x08, 0x7b, 0xdc, 0xf6, 0x78, 0x1f, 0xd9, + 0xe3, 0xb6, 0x27, 0xfa, 0x4a, 0x5a, 0x02, 0xa2, 0x5e, 0x53, 0xf9, 0xe0, 0xc9, 0xf3, 0x25, 0xed, + 0xe9, 0xf3, 0x25, 0xed, 0xb7, 0xe7, 0x4b, 0xda, 0xc3, 0x17, 0x4b, 0x63, 0x4f, 0x5f, 0x2c, 0x8d, + 0xfd, 0xfc, 0x62, 0x69, 0xec, 0x93, 0x37, 0x63, 0xfd, 0xb6, 0x13, 0x36, 0x1b, 0xdc, 0x33, 0x20, + 0x0e, 0x36, 0xdb, 0x17, 0x64, 0xb7, 0x35, 0x1b, 0xd8, 0x45, 0xf6, 0xae, 0x99, 0xf8, 0x25, 0xa6, + 0x36, 0x29, 0x5a, 0xfe, 0xeb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x23, 0x7a, 0x85, 0x2c, + 0x12, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Account queries an Ethereum account. + Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) + // CosmosAccount queries an Ethereum account's Cosmos Address. + CosmosAccount(ctx context.Context, in *QueryCosmosAccountRequest, opts ...grpc.CallOption) (*QueryCosmosAccountResponse, error) + // ValidatorAccount queries an Ethereum account's from a validator consensus + // Address. + ValidatorAccount(ctx context.Context, in *QueryValidatorAccountRequest, opts ...grpc.CallOption) (*QueryValidatorAccountResponse, error) + // Balance queries the balance of a the EVM denomination for a single + // EthAccount. + Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) + // Storage queries the balance of all coins for a single account. + Storage(ctx context.Context, in *QueryStorageRequest, opts ...grpc.CallOption) (*QueryStorageResponse, error) + // Code queries the balance of all coins for a single account. + Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) + // Params queries the parameters of x/evm module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // EthCall implements the `eth_call` rpc api + EthCall(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) + // EstimateGas implements the `eth_estimateGas` rpc api + EstimateGas(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) + // TraceTx implements the `debug_traceTransaction` rpc api + TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error) + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) + // BaseFee queries the base fee of the parent block of the current block, + // it's similar to feemarket module's method, but also checks london hardfork status. + BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { + out := new(QueryAccountResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Account", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CosmosAccount(ctx context.Context, in *QueryCosmosAccountRequest, opts ...grpc.CallOption) (*QueryCosmosAccountResponse, error) { + out := new(QueryCosmosAccountResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/CosmosAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorAccount(ctx context.Context, in *QueryValidatorAccountRequest, opts ...grpc.CallOption) (*QueryValidatorAccountResponse, error) { + out := new(QueryValidatorAccountResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/ValidatorAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { + out := new(QueryBalanceResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Balance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Storage(ctx context.Context, in *QueryStorageRequest, opts ...grpc.CallOption) (*QueryStorageResponse, error) { + out := new(QueryStorageResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Storage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) { + out := new(QueryCodeResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Code", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EthCall(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) { + out := new(MsgEthereumTxResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/EthCall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EstimateGas(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) { + out := new(EstimateGasResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/EstimateGas", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error) { + out := new(QueryTraceTxResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) { + out := new(QueryTraceBlockResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) { + out := new(QueryBaseFeeResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/BaseFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Account queries an Ethereum account. + Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) + // CosmosAccount queries an Ethereum account's Cosmos Address. + CosmosAccount(context.Context, *QueryCosmosAccountRequest) (*QueryCosmosAccountResponse, error) + // ValidatorAccount queries an Ethereum account's from a validator consensus + // Address. + ValidatorAccount(context.Context, *QueryValidatorAccountRequest) (*QueryValidatorAccountResponse, error) + // Balance queries the balance of a the EVM denomination for a single + // EthAccount. + Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) + // Storage queries the balance of all coins for a single account. + Storage(context.Context, *QueryStorageRequest) (*QueryStorageResponse, error) + // Code queries the balance of all coins for a single account. + Code(context.Context, *QueryCodeRequest) (*QueryCodeResponse, error) + // Params queries the parameters of x/evm module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // EthCall implements the `eth_call` rpc api + EthCall(context.Context, *EthCallRequest) (*MsgEthereumTxResponse, error) + // EstimateGas implements the `eth_estimateGas` rpc api + EstimateGas(context.Context, *EthCallRequest) (*EstimateGasResponse, error) + // TraceTx implements the `debug_traceTransaction` rpc api + TraceTx(context.Context, *QueryTraceTxRequest) (*QueryTraceTxResponse, error) + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + TraceBlock(context.Context, *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) + // BaseFee queries the base fee of the parent block of the current block, + // it's similar to feemarket module's method, but also checks london hardfork status. + BaseFee(context.Context, *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") +} +func (*UnimplementedQueryServer) CosmosAccount(ctx context.Context, req *QueryCosmosAccountRequest) (*QueryCosmosAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CosmosAccount not implemented") +} +func (*UnimplementedQueryServer) ValidatorAccount(ctx context.Context, req *QueryValidatorAccountRequest) (*QueryValidatorAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorAccount not implemented") +} +func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") +} +func (*UnimplementedQueryServer) Storage(ctx context.Context, req *QueryStorageRequest) (*QueryStorageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Storage not implemented") +} +func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Code not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) EthCall(ctx context.Context, req *EthCallRequest) (*MsgEthereumTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EthCall not implemented") +} +func (*UnimplementedQueryServer) EstimateGas(ctx context.Context, req *EthCallRequest) (*EstimateGasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateGas not implemented") +} +func (*UnimplementedQueryServer) TraceTx(ctx context.Context, req *QueryTraceTxRequest) (*QueryTraceTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraceTx not implemented") +} +func (*UnimplementedQueryServer) TraceBlock(ctx context.Context, req *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraceBlock not implemented") +} +func (*UnimplementedQueryServer) BaseFee(ctx context.Context, req *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BaseFee not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Account(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Account", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CosmosAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCosmosAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CosmosAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/CosmosAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CosmosAccount(ctx, req.(*QueryCosmosAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/ValidatorAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorAccount(ctx, req.(*QueryValidatorAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Balance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Balance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Storage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryStorageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Storage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Storage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Storage(ctx, req.(*QueryStorageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Code_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Code(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Code", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Code(ctx, req.(*QueryCodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EthCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EthCallRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EthCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/EthCall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EthCall(ctx, req.(*EthCallRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EstimateGas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EthCallRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EstimateGas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/EstimateGas", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EstimateGas(ctx, req.(*EthCallRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraceTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraceTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraceTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/TraceTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraceTx(ctx, req.(*QueryTraceTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraceBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraceBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraceBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/TraceBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraceBlock(ctx, req.(*QueryTraceBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BaseFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBaseFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BaseFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/BaseFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BaseFee(ctx, req.(*QueryBaseFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethermint.evm.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Account", + Handler: _Query_Account_Handler, + }, + { + MethodName: "CosmosAccount", + Handler: _Query_CosmosAccount_Handler, + }, + { + MethodName: "ValidatorAccount", + Handler: _Query_ValidatorAccount_Handler, + }, + { + MethodName: "Balance", + Handler: _Query_Balance_Handler, + }, + { + MethodName: "Storage", + Handler: _Query_Storage_Handler, + }, + { + MethodName: "Code", + Handler: _Query_Code_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "EthCall", + Handler: _Query_EthCall_Handler, + }, + { + MethodName: "EstimateGas", + Handler: _Query_EstimateGas_Handler, + }, + { + MethodName: "TraceTx", + Handler: _Query_TraceTx_Handler, + }, + { + MethodName: "TraceBlock", + Handler: _Query_TraceBlock_Handler, + }, + { + MethodName: "BaseFee", + Handler: _Query_BaseFee_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ethermint/evm/v1/query.proto", +} + +func (m *QueryAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x18 + } + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Balance) > 0 { + i -= len(m.Balance) + copy(dAtA[i:], m.Balance) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCosmosAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCosmosAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCosmosAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCosmosAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCosmosAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCosmosAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AccountNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x10 + } + if len(m.CosmosAddress) > 0 { + i -= len(m.CosmosAddress) + copy(dAtA[i:], m.CosmosAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CosmosAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConsAddress) > 0 { + i -= len(m.ConsAddress) + copy(dAtA[i:], m.ConsAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ConsAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AccountNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x10 + } + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balance) > 0 { + i -= len(m.Balance) + copy(dAtA[i:], m.Balance) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryStorageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryStorageRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStorageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryStorageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryStorageResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStorageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCodeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCodeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCodeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCodeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTxLogsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTxLogsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTxLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTxLogsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTxLogsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTxLogsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Logs) > 0 { + for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EthCallRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EthCallRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x20 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x1a + } + if m.GasCap != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.GasCap)) + i-- + dAtA[i] = 0x10 + } + if len(m.Args) > 0 { + i -= len(m.Args) + copy(dAtA[i:], m.Args) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Args))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EstimateGasResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EstimateGasResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EstimateGasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VmError) > 0 { + i -= len(m.VmError) + copy(dAtA[i:], m.VmError) + i = encodeVarintQuery(dAtA, i, uint64(len(m.VmError))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ret) > 0 { + i -= len(m.Ret) + copy(dAtA[i:], m.Ret) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Ret))) + i-- + dAtA[i] = 0x12 + } + if m.Gas != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Gas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceTxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceTxRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockMaxGas != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockMaxGas)) + i-- + dAtA[i] = 0x50 + } + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x48 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintQuery(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x3a + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.BlockNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x28 + } + if len(m.Predecessors) > 0 { + for iNdEx := len(m.Predecessors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Predecessors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.TraceConfig != nil { + { + size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceTxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceBlockRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockMaxGas != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockMaxGas)) + i-- + dAtA[i] = 0x50 + } + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x48 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintQuery(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x3a + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.BlockNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x28 + } + if m.TraceConfig != nil { + { + size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTraceBlockResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraceBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBaseFeeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBaseFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBaseFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryBaseFeeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBaseFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBaseFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BaseFee != nil { + { + size := m.BaseFee.Size() + i -= size + if _, err := m.BaseFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Balance) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + return n +} + +func (m *QueryCosmosAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCosmosAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CosmosAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) + } + if m.AccountNumber != 0 { + n += 1 + sovQuery(uint64(m.AccountNumber)) + } + return n +} + +func (m *QueryValidatorAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConsAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) + } + if m.AccountNumber != 0 { + n += 1 + sovQuery(uint64(m.AccountNumber)) + } + return n +} + +func (m *QueryBalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Balance) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStorageRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStorageResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Code) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTxLogsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTxLogsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Logs) > 0 { + for _, e := range m.Logs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *EthCallRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Args) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.GasCap != 0 { + n += 1 + sovQuery(uint64(m.GasCap)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + return n +} + +func (m *EstimateGasResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Gas != 0 { + n += 1 + sovQuery(uint64(m.Gas)) + } + l = len(m.Ret) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.VmError) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraceTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TraceConfig != nil { + l = m.TraceConfig.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Predecessors) > 0 { + for _, e := range m.Predecessors { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.BlockNumber != 0 { + n += 1 + sovQuery(uint64(m.BlockNumber)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) + n += 1 + l + sovQuery(uint64(l)) + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + if m.BlockMaxGas != 0 { + n += 1 + sovQuery(uint64(m.BlockMaxGas)) + } + return n +} + +func (m *QueryTraceTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraceBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, e := range m.Txs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.TraceConfig != nil { + l = m.TraceConfig.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockNumber != 0 { + n += 1 + sovQuery(uint64(m.BlockNumber)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) + n += 1 + l + sovQuery(uint64(l)) + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + if m.BlockMaxGas != 0 { + n += 1 + sovQuery(uint64(m.BlockMaxGas)) + } + return n +} + +func (m *QueryTraceBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBaseFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryBaseFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseFee != nil { + l = m.BaseFee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balance = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCosmosAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCosmosAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCosmosAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCosmosAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCosmosAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCosmosAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CosmosAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + m.AccountNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + m.AccountNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balance = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStorageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStorageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStorageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStorageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStorageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStorageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCodeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCodeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = append(m.Code[:0], dAtA[iNdEx:postIndex]...) + if m.Code == nil { + m.Code = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTxLogsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTxLogsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTxLogsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTxLogsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTxLogsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTxLogsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = append(m.Logs, &Log{}) + if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EthCallRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EthCallRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EthCallRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = append(m.Args[:0], dAtA[iNdEx:postIndex]...) + if m.Args == nil { + m.Args = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasCap", wireType) + } + m.GasCap = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasCap |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EstimateGasResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EstimateGasResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EstimateGasResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Gas", wireType) + } + m.Gas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Gas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) + if m.Ret == nil { + m.Ret = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VmError", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VmError = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Msg == nil { + m.Msg = &MsgEthereumTx{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TraceConfig == nil { + m.TraceConfig = &TraceConfig{} + } + if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Predecessors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Predecessors = append(m.Predecessors, &MsgEthereumTx{}) + if err := m.Predecessors[len(m.Predecessors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) + } + m.BlockMaxGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockMaxGas |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, &MsgEthereumTx{}) + if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TraceConfig == nil { + m.TraceConfig = &TraceConfig{} + } + if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) + } + m.BlockMaxGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockMaxGas |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceBlockResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraceBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBaseFeeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBaseFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBaseFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBaseFeeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBaseFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBaseFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.BaseFee = &v + if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/evm/query.pb.gw.go b/types/legacy/ethermint/evm/query.pb.gw.go new file mode 100644 index 0000000..adf1aaf --- /dev/null +++ b/types/legacy/ethermint/evm/query.pb.gw.go @@ -0,0 +1,1178 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ethermint/evm/v1/query.proto + +/* +Package evm is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package evm + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Account(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Account(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_CosmosAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCosmosAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.CosmosAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CosmosAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCosmosAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.CosmosAccount(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ValidatorAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["cons_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") + } + + protoReq.ConsAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) + } + + msg, err := client.ValidatorAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValidatorAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["cons_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cons_address") + } + + protoReq.ConsAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cons_address", err) + } + + msg, err := server.ValidatorAccount(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Balance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Balance(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Storage_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStorageRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := client.Storage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Storage_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStorageRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := server.Storage(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCodeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Code(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCodeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Code(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_EthCall_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_EthCall_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EthCall_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EthCall(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EthCall_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EthCall_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EthCall(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_EstimateGas_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateGas_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EstimateGas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EthCallRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateGas_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EstimateGas(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_TraceTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceTxRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TraceTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceTxRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TraceTx(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_TraceBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceBlockRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TraceBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceBlockRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TraceBlock(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBaseFeeRequest + var metadata runtime.ServerMetadata + + msg, err := client.BaseFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBaseFeeRequest + var metadata runtime.ServerMetadata + + msg, err := server.BaseFee(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Account_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CosmosAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Storage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EthCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EstimateGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TraceBlock_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Account_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Account_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CosmosAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CosmosAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValidatorAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Balance_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Balance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Storage_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Storage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Code_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_EthCall_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EthCall_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_EstimateGas_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EstimateGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TraceTx_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TraceBlock_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BaseFee_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "account", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CosmosAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "cosmos_account", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ValidatorAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "validator_account", "cons_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Storage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"evmos", "evm", "v1", "storage", "address", "key"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "evm", "v1", "codes", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Account_0 = runtime.ForwardResponseMessage + + forward_Query_CosmosAccount_0 = runtime.ForwardResponseMessage + + forward_Query_ValidatorAccount_0 = runtime.ForwardResponseMessage + + forward_Query_Balance_0 = runtime.ForwardResponseMessage + + forward_Query_Storage_0 = runtime.ForwardResponseMessage + + forward_Query_Code_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_EthCall_0 = runtime.ForwardResponseMessage + + forward_Query_EstimateGas_0 = runtime.ForwardResponseMessage + + forward_Query_TraceTx_0 = runtime.ForwardResponseMessage + + forward_Query_TraceBlock_0 = runtime.ForwardResponseMessage + + forward_Query_BaseFee_0 = runtime.ForwardResponseMessage +) diff --git a/types/legacy/ethermint/evm/tx.pb.go b/types/legacy/ethermint/evm/tx.pb.go new file mode 100644 index 0000000..4d9b561 --- /dev/null +++ b/types/legacy/ethermint/evm/tx.pb.go @@ -0,0 +1,3270 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/tx.proto + +package evm + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. +type MsgEthereumTx struct { + // data is inner transaction data of the Ethereum transaction + Data *types.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // size is the encoded storage size of the transaction (DEPRECATED) + Size_ float64 `protobuf:"fixed64,2,opt,name=size,proto3" json:"-"` + // hash of the transaction in hex format + Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty" rlp:"-"` + // from is the ethereum signer address in hex format. This address value is checked + // against the address derived from the signature (V, R, S) using the + // secp256k1 elliptic curve + From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` +} + +func (m *MsgEthereumTx) Reset() { *m = MsgEthereumTx{} } +func (m *MsgEthereumTx) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumTx) ProtoMessage() {} +func (*MsgEthereumTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{0} +} +func (m *MsgEthereumTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEthereumTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEthereumTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumTx.Merge(m, src) +} +func (m *MsgEthereumTx) XXX_Size() int { + return m.Size() +} +func (m *MsgEthereumTx) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumTx.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEthereumTx proto.InternalMessageInfo + +// LegacyTx is the transaction data of regular Ethereum transactions. +// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the +// AllowUnprotectedTxs parameter is disabled. +type LegacyTx struct { + // nonce corresponds to the account nonce (transaction sequence). + Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + // gas_price defines the value for each gas unit + GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` + // gas defines the gas limit defined for the transaction. + GasLimit uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"` + // to is the hex formatted address of the recipient + To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` + // value defines the unsigned integer value of the transaction amount. + Amount *cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` + // data is the data payload bytes of the transaction. + Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` + // v defines the signature value + V []byte `protobuf:"bytes,7,opt,name=v,proto3" json:"v,omitempty"` + // r defines the signature value + R []byte `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"` + // s define the signature value + S []byte `protobuf:"bytes,9,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *LegacyTx) Reset() { *m = LegacyTx{} } +func (m *LegacyTx) String() string { return proto.CompactTextString(m) } +func (*LegacyTx) ProtoMessage() {} +func (*LegacyTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{1} +} +func (m *LegacyTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LegacyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LegacyTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LegacyTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_LegacyTx.Merge(m, src) +} +func (m *LegacyTx) XXX_Size() int { + return m.Size() +} +func (m *LegacyTx) XXX_DiscardUnknown() { + xxx_messageInfo_LegacyTx.DiscardUnknown(m) +} + +var xxx_messageInfo_LegacyTx proto.InternalMessageInfo + +// AccessListTx is the data of EIP-2930 access list transactions. +type AccessListTx struct { + // chain_id of the destination EVM chain + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` + // nonce corresponds to the account nonce (transaction sequence). + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // gas_price defines the value for each gas unit + GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` + // gas defines the gas limit defined for the transaction. + GasLimit uint64 `protobuf:"varint,4,opt,name=gas,proto3" json:"gas,omitempty"` + // to is the recipient address in hex format + To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` + // value defines the unsigned integer value of the transaction amount. + Amount *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` + // data is the data payload bytes of the transaction. + Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` + // accesses is an array of access tuples + Accesses AccessList `protobuf:"bytes,8,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"` + // v defines the signature value + V []byte `protobuf:"bytes,9,opt,name=v,proto3" json:"v,omitempty"` + // r defines the signature value + R []byte `protobuf:"bytes,10,opt,name=r,proto3" json:"r,omitempty"` + // s define the signature value + S []byte `protobuf:"bytes,11,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *AccessListTx) Reset() { *m = AccessListTx{} } +func (m *AccessListTx) String() string { return proto.CompactTextString(m) } +func (*AccessListTx) ProtoMessage() {} +func (*AccessListTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{2} +} +func (m *AccessListTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessListTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessListTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessListTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessListTx.Merge(m, src) +} +func (m *AccessListTx) XXX_Size() int { + return m.Size() +} +func (m *AccessListTx) XXX_DiscardUnknown() { + xxx_messageInfo_AccessListTx.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessListTx proto.InternalMessageInfo + +// DynamicFeeTx is the data of EIP-1559 dynamic fee transactions. +type DynamicFeeTx struct { + // chain_id of the destination EVM chain + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` + // nonce corresponds to the account nonce (transaction sequence). + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // gas_tip_cap defines the max value for the gas tip + GasTipCap *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_tip_cap,json=gasTipCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_tip_cap,omitempty"` + // gas_fee_cap defines the max value for the gas fee + GasFeeCap *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=gas_fee_cap,json=gasFeeCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_fee_cap,omitempty"` + // gas defines the gas limit defined for the transaction. + GasLimit uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"` + // to is the hex formatted address of the recipient + To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` + // value defines the transaction amount. + Amount *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` + // data is the data payload bytes of the transaction. + Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` + // accesses is an array of access tuples + Accesses AccessList `protobuf:"bytes,9,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"` + // v defines the signature value + V []byte `protobuf:"bytes,10,opt,name=v,proto3" json:"v,omitempty"` + // r defines the signature value + R []byte `protobuf:"bytes,11,opt,name=r,proto3" json:"r,omitempty"` + // s define the signature value + S []byte `protobuf:"bytes,12,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *DynamicFeeTx) Reset() { *m = DynamicFeeTx{} } +func (m *DynamicFeeTx) String() string { return proto.CompactTextString(m) } +func (*DynamicFeeTx) ProtoMessage() {} +func (*DynamicFeeTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{3} +} +func (m *DynamicFeeTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DynamicFeeTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DynamicFeeTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_DynamicFeeTx.Merge(m, src) +} +func (m *DynamicFeeTx) XXX_Size() int { + return m.Size() +} +func (m *DynamicFeeTx) XXX_DiscardUnknown() { + xxx_messageInfo_DynamicFeeTx.DiscardUnknown(m) +} + +var xxx_messageInfo_DynamicFeeTx proto.InternalMessageInfo + +// ExtensionOptionsEthereumTx is an extension option for ethereum transactions +type ExtensionOptionsEthereumTx struct { +} + +func (m *ExtensionOptionsEthereumTx) Reset() { *m = ExtensionOptionsEthereumTx{} } +func (m *ExtensionOptionsEthereumTx) String() string { return proto.CompactTextString(m) } +func (*ExtensionOptionsEthereumTx) ProtoMessage() {} +func (*ExtensionOptionsEthereumTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{4} +} +func (m *ExtensionOptionsEthereumTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtensionOptionsEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtensionOptionsEthereumTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExtensionOptionsEthereumTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionOptionsEthereumTx.Merge(m, src) +} +func (m *ExtensionOptionsEthereumTx) XXX_Size() int { + return m.Size() +} +func (m *ExtensionOptionsEthereumTx) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionOptionsEthereumTx.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionOptionsEthereumTx proto.InternalMessageInfo + +// MsgEthereumTxResponse defines the Msg/EthereumTx response type. +type MsgEthereumTxResponse struct { + // hash of the ethereum transaction in hex format. This hash differs from the + // Tendermint sha256 hash of the transaction bytes. See + // https://github.com/tendermint/tendermint/issues/6539 for reference + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // logs contains the transaction hash and the proto-compatible ethereum + // logs. + Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` + // ret is the returned data from evm function (result or data supplied with revert + // opcode) + Ret []byte `protobuf:"bytes,3,opt,name=ret,proto3" json:"ret,omitempty"` + // vm_error is the error returned by vm execution + VmError string `protobuf:"bytes,4,opt,name=vm_error,json=vmError,proto3" json:"vm_error,omitempty"` + // gas_used specifies how much gas was consumed by the transaction + GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` +} + +func (m *MsgEthereumTxResponse) Reset() { *m = MsgEthereumTxResponse{} } +func (m *MsgEthereumTxResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumTxResponse) ProtoMessage() {} +func (*MsgEthereumTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{5} +} +func (m *MsgEthereumTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEthereumTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEthereumTxResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEthereumTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumTxResponse.Merge(m, src) +} +func (m *MsgEthereumTxResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEthereumTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEthereumTxResponse proto.InternalMessageInfo + +// MsgUpdateParams defines a Msg for updating the x/evm module parameters. +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/evm parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{6} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{7} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgEthereumTx)(nil), "ethermint.evm.v1.MsgEthereumTx") + proto.RegisterType((*LegacyTx)(nil), "ethermint.evm.v1.LegacyTx") + proto.RegisterType((*AccessListTx)(nil), "ethermint.evm.v1.AccessListTx") + proto.RegisterType((*DynamicFeeTx)(nil), "ethermint.evm.v1.DynamicFeeTx") + proto.RegisterType((*ExtensionOptionsEthereumTx)(nil), "ethermint.evm.v1.ExtensionOptionsEthereumTx") + proto.RegisterType((*MsgEthereumTxResponse)(nil), "ethermint.evm.v1.MsgEthereumTxResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "ethermint.evm.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "ethermint.evm.v1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } + +var fileDescriptor_f75ac0a12d075f21 = []byte{ + // 1046 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0xe3, 0xc4, 0xf9, 0x35, 0x09, 0x50, 0xac, 0x96, 0x3a, 0x59, 0x88, 0xb3, 0x86, 0x15, + 0x69, 0xa5, 0xda, 0xda, 0x22, 0x90, 0x1a, 0x4e, 0xcd, 0xb6, 0x8b, 0x16, 0xb5, 0xda, 0x95, 0xc9, + 0x5e, 0x10, 0x52, 0x98, 0xda, 0x53, 0xc7, 0x22, 0xf6, 0x58, 0x9e, 0x89, 0x95, 0x70, 0x42, 0x7b, + 0x42, 0x9c, 0x90, 0xb8, 0x72, 0xe0, 0xc0, 0x61, 0xc5, 0xa9, 0x87, 0x85, 0xbf, 0x61, 0xc5, 0x69, + 0x05, 0x17, 0xc4, 0x21, 0xa0, 0x14, 0x54, 0xa9, 0x47, 0xfe, 0x02, 0x34, 0x33, 0x4e, 0x93, 0x34, + 0xb4, 0x5d, 0x2a, 0xc1, 0xa5, 0x9a, 0x37, 0xef, 0xc7, 0xbc, 0x7c, 0xde, 0xb7, 0x33, 0x06, 0x15, + 0x44, 0xbb, 0x28, 0xf2, 0xbd, 0x80, 0x9a, 0x28, 0xf6, 0xcd, 0xf8, 0xb6, 0x49, 0x07, 0x46, 0x18, + 0x61, 0x8a, 0x95, 0xa5, 0x33, 0x97, 0x81, 0x62, 0xdf, 0x88, 0x6f, 0x57, 0x5f, 0x86, 0xbe, 0x17, + 0x60, 0x93, 0xff, 0x15, 0x41, 0xd5, 0x55, 0x1b, 0x13, 0x1f, 0x13, 0xd3, 0x27, 0x2e, 0x4b, 0xf6, + 0x89, 0x9b, 0x38, 0x2a, 0xc2, 0xd1, 0xe1, 0x96, 0x29, 0x8c, 0xc4, 0x55, 0x5d, 0x38, 0x93, 0xd5, + 0x17, 0xbe, 0x65, 0x17, 0xbb, 0x58, 0xe4, 0xb0, 0x55, 0xb2, 0xfb, 0xaa, 0x8b, 0xb1, 0xdb, 0x43, + 0x26, 0x0c, 0x3d, 0x13, 0x06, 0x01, 0xa6, 0x90, 0x7a, 0x38, 0x98, 0xd4, 0xab, 0x24, 0x5e, 0x6e, + 0x1d, 0xf4, 0x0f, 0x4d, 0x18, 0x0c, 0x85, 0x4b, 0xff, 0x5e, 0x02, 0x2f, 0xec, 0x13, 0x77, 0x97, + 0x1d, 0x88, 0xfa, 0x7e, 0x7b, 0xa0, 0x34, 0x80, 0xec, 0x40, 0x0a, 0x55, 0xa9, 0x2e, 0x35, 0x4a, + 0x9b, 0xcb, 0x86, 0xc8, 0x35, 0x26, 0xb9, 0xc6, 0x76, 0x30, 0xb4, 0x78, 0x84, 0x52, 0x03, 0x32, + 0xf1, 0x3e, 0x45, 0x6a, 0xba, 0x2e, 0x35, 0xa4, 0x16, 0x38, 0x1d, 0x69, 0xd2, 0xc6, 0xe3, 0x93, + 0xa3, 0x75, 0xc9, 0xe2, 0xfb, 0xca, 0x1b, 0x40, 0xee, 0x42, 0xd2, 0x55, 0x33, 0x75, 0xa9, 0x51, + 0x6c, 0x2d, 0xfd, 0x35, 0xd2, 0xf2, 0x51, 0x2f, 0x6c, 0xea, 0x1b, 0x7a, 0x12, 0xc5, 0xbc, 0x8a, + 0x02, 0xe4, 0xc3, 0x08, 0xfb, 0xaa, 0xcc, 0xa2, 0x2c, 0xbe, 0x6e, 0xd6, 0x3f, 0xff, 0x46, 0x4b, + 0x7d, 0x71, 0x72, 0xb4, 0xbe, 0x3a, 0x25, 0x31, 0xd7, 0xa5, 0xfe, 0x38, 0x0d, 0x0a, 0x7b, 0xc8, + 0x85, 0xf6, 0xb0, 0x3d, 0x50, 0x96, 0x41, 0x36, 0xc0, 0x81, 0x8d, 0x78, 0xcf, 0xb2, 0x25, 0x0c, + 0xe5, 0x1d, 0x50, 0x74, 0x21, 0xe3, 0xeb, 0xd9, 0xa2, 0xc7, 0x62, 0xab, 0xf2, 0xeb, 0x48, 0x5b, + 0x11, 0xa8, 0x89, 0xf3, 0x89, 0xe1, 0x61, 0xd3, 0x87, 0xb4, 0x6b, 0xdc, 0x0b, 0xa8, 0x55, 0x70, + 0x21, 0x79, 0xc0, 0x42, 0x95, 0x1a, 0xc8, 0xb8, 0x90, 0xf0, 0xae, 0xe5, 0x56, 0x79, 0x3c, 0xd2, + 0x0a, 0xef, 0x41, 0xb2, 0xe7, 0xf9, 0x1e, 0xb5, 0x98, 0x43, 0x79, 0x11, 0xa4, 0x29, 0x4e, 0xda, + 0x4d, 0x53, 0xac, 0x6c, 0x81, 0x6c, 0x0c, 0x7b, 0x7d, 0xa4, 0x66, 0xf9, 0x19, 0xaf, 0x5f, 0x78, + 0xc6, 0x78, 0xa4, 0xe5, 0xb6, 0x7d, 0xdc, 0x0f, 0xa8, 0x25, 0x32, 0xd8, 0x6f, 0xe7, 0xac, 0x73, + 0x75, 0xa9, 0x51, 0x4e, 0xa8, 0x96, 0x81, 0x14, 0xab, 0x79, 0xbe, 0x21, 0xc5, 0xcc, 0x8a, 0xd4, + 0x82, 0xb0, 0x22, 0x66, 0x11, 0xb5, 0x28, 0x2c, 0xd2, 0xbc, 0xc5, 0x28, 0xfd, 0xf8, 0x64, 0x23, + 0xd7, 0x1e, 0xec, 0x40, 0x0a, 0x19, 0x2f, 0x65, 0xca, 0x6b, 0x42, 0x47, 0x1f, 0x65, 0x40, 0x79, + 0xdb, 0xb6, 0x11, 0x21, 0x7b, 0x1e, 0xa1, 0xed, 0x81, 0xf2, 0x3e, 0x28, 0xd8, 0x5d, 0xe8, 0x05, + 0x1d, 0xcf, 0xe1, 0xc4, 0x8a, 0x2d, 0xf3, 0xb2, 0x9e, 0xf3, 0x77, 0x58, 0xf0, 0xbd, 0x9d, 0xd3, + 0x91, 0x96, 0xb7, 0xc5, 0xd2, 0x4a, 0x16, 0xce, 0x14, 0x7d, 0xfa, 0x42, 0xf4, 0x99, 0x7f, 0x8d, + 0x5e, 0xbe, 0x1c, 0x7d, 0x76, 0x11, 0x7d, 0xee, 0xda, 0xe8, 0xf3, 0x33, 0xe8, 0x3f, 0x06, 0x05, + 0xc8, 0x41, 0x21, 0xa2, 0x16, 0xea, 0x99, 0x46, 0x69, 0xf3, 0x35, 0xe3, 0xfc, 0xff, 0xb8, 0x21, + 0x50, 0xb6, 0xfb, 0x61, 0x0f, 0xb5, 0x6e, 0x3d, 0x1d, 0x69, 0xa9, 0xd3, 0x91, 0x06, 0xe0, 0x19, + 0xdf, 0xef, 0x7e, 0xd3, 0xc0, 0x94, 0xb6, 0x10, 0xfa, 0x59, 0x55, 0x31, 0xdc, 0xe2, 0xdc, 0x70, + 0xc1, 0xdc, 0x70, 0x4b, 0x93, 0xe1, 0xae, 0x2d, 0x0e, 0xf7, 0x95, 0xe9, 0x70, 0x67, 0xe7, 0xa9, + 0x7f, 0x2d, 0x83, 0xf2, 0xce, 0x30, 0x80, 0xbe, 0x67, 0xdf, 0x45, 0xe8, 0x7f, 0x19, 0xf0, 0x16, + 0x28, 0xb1, 0x01, 0x53, 0x2f, 0xec, 0xd8, 0x30, 0xbc, 0x7a, 0xc4, 0x4c, 0x0e, 0x6d, 0x2f, 0xbc, + 0x03, 0xc3, 0x49, 0xea, 0x21, 0x42, 0x3c, 0x55, 0x7e, 0x9e, 0xd4, 0xbb, 0x08, 0xb1, 0xd4, 0x44, + 0x1e, 0xd9, 0xcb, 0xe5, 0x91, 0x5b, 0x94, 0x47, 0xfe, 0xda, 0xf2, 0x28, 0x5c, 0x20, 0x8f, 0xe2, + 0x7f, 0x27, 0x0f, 0x30, 0x27, 0x8f, 0xd2, 0x9c, 0x3c, 0xca, 0xcf, 0x27, 0x8f, 0x59, 0x35, 0xe8, + 0x3a, 0xa8, 0xee, 0x0e, 0x28, 0x0a, 0x88, 0x87, 0x83, 0xfb, 0x21, 0x7f, 0x17, 0xa6, 0x17, 0x69, + 0x53, 0x66, 0x85, 0xf4, 0x6f, 0x25, 0xb0, 0x32, 0x77, 0xc1, 0x5a, 0x88, 0x84, 0x38, 0x20, 0x1c, + 0x04, 0xbf, 0xc4, 0x25, 0x71, 0x3d, 0xf3, 0x2b, 0x7b, 0x0d, 0xc8, 0x3d, 0xec, 0x12, 0x35, 0xcd, + 0x21, 0xac, 0x2c, 0x42, 0xd8, 0xc3, 0xae, 0xc5, 0x43, 0x94, 0x25, 0x90, 0x89, 0x10, 0xe5, 0x02, + 0x29, 0x5b, 0x6c, 0xa9, 0x54, 0x40, 0x21, 0xf6, 0x3b, 0x28, 0x8a, 0x70, 0x94, 0x5c, 0xa2, 0xf9, + 0xd8, 0xdf, 0x65, 0x26, 0x73, 0x31, 0x69, 0xf4, 0x09, 0x72, 0xc4, 0x90, 0xad, 0xbc, 0x0b, 0xc9, + 0x43, 0x82, 0x9c, 0xa4, 0xcd, 0x1f, 0x24, 0xf0, 0xd2, 0x3e, 0x71, 0x1f, 0x86, 0x0e, 0xa4, 0xe8, + 0x01, 0x8c, 0xa0, 0x4f, 0xd8, 0x5d, 0x03, 0xfb, 0xb4, 0x8b, 0x23, 0x8f, 0x0e, 0x13, 0xb5, 0xab, + 0x3f, 0x3d, 0xd9, 0x58, 0x4e, 0x5e, 0xd4, 0x6d, 0xc7, 0x89, 0x10, 0x21, 0x1f, 0xd0, 0xc8, 0x0b, + 0x5c, 0x6b, 0x1a, 0xaa, 0xbc, 0x0b, 0x72, 0x21, 0xaf, 0xc0, 0x95, 0x5d, 0xda, 0x54, 0x17, 0x7f, + 0x86, 0x38, 0xa1, 0x55, 0x64, 0x63, 0x14, 0xa3, 0x4a, 0x52, 0x9a, 0xc6, 0xa3, 0x93, 0xa3, 0xf5, + 0x69, 0x31, 0x86, 0xff, 0x06, 0x8a, 0xd9, 0x3b, 0x3f, 0xe0, 0x4f, 0xf6, 0xb9, 0x26, 0xf5, 0x0a, + 0x58, 0x3d, 0xb7, 0x35, 0x01, 0xbc, 0xf9, 0xa7, 0x04, 0x32, 0xfb, 0xc4, 0x55, 0x86, 0x00, 0xcc, + 0xbc, 0xc2, 0xda, 0x62, 0x37, 0x73, 0xf3, 0xa9, 0xbe, 0x79, 0x45, 0xc0, 0xa4, 0xbe, 0x7e, 0xf3, + 0xd1, 0xcf, 0x7f, 0x7c, 0x95, 0xbe, 0xa1, 0x57, 0x4c, 0xd1, 0xe0, 0xe4, 0x8b, 0x22, 0x89, 0xec, + 0xd0, 0x81, 0xf2, 0x11, 0x28, 0xcf, 0x21, 0xbd, 0xf9, 0x8f, 0xb5, 0x67, 0x43, 0xaa, 0x6b, 0x57, + 0x86, 0x4c, 0x1a, 0xa8, 0x66, 0x3f, 0x63, 0xe8, 0x5a, 0xf7, 0x9f, 0x8e, 0x6b, 0xd2, 0xb3, 0x71, + 0x4d, 0xfa, 0x7d, 0x5c, 0x93, 0xbe, 0x3c, 0xae, 0xa5, 0x9e, 0x1d, 0xd7, 0x52, 0xbf, 0x1c, 0xd7, + 0x52, 0x1f, 0xbe, 0xed, 0x7a, 0xb4, 0xdb, 0x3f, 0x30, 0x6c, 0xec, 0x9b, 0x83, 0x28, 0xec, 0xb1, + 0x0e, 0x03, 0xec, 0x20, 0x33, 0xde, 0x32, 0xe9, 0x30, 0x44, 0xc4, 0xec, 0xf1, 0xb7, 0xcc, 0x9c, + 0xfb, 0x2c, 0x3a, 0xc8, 0xf1, 0x4f, 0x92, 0xb7, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x61, 0x68, + 0xbf, 0x71, 0xa2, 0x09, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // EthereumTx defines a method submitting Ethereum transactions. + EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) + // UpdateParams defined a governance operation for updating the x/evm module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) { + out := new(MsgEthereumTxResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Msg/EthereumTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // EthereumTx defines a method submitting Ethereum transactions. + EthereumTx(context.Context, *MsgEthereumTx) (*MsgEthereumTxResponse, error) + // UpdateParams defined a governance operation for updating the x/evm module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) EthereumTx(ctx context.Context, req *MsgEthereumTx) (*MsgEthereumTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EthereumTx not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_EthereumTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEthereumTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EthereumTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Msg/EthereumTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EthereumTx(ctx, req.(*MsgEthereumTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethermint.evm.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "EthereumTx", + Handler: _Msg_EthereumTx_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ethermint/evm/v1/tx.proto", +} + +func (m *MsgEthereumTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEthereumTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0x22 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x1a + } + if m.Size_ != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Size_)))) + i-- + dAtA[i] = 0x11 + } + if m.Data != nil { + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LegacyTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LegacyTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LegacyTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTx(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x4a + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintTx(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x42 + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintTx(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x3a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x32 + } + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x22 + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x18 + } + if m.GasPrice != nil { + { + size := m.GasPrice.Size() + i -= size + if _, err := m.GasPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Nonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccessListTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessListTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessListTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTx(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x5a + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintTx(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x52 + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintTx(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x4a + } + if len(m.Accesses) > 0 { + for iNdEx := len(m.Accesses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accesses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x3a + } + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x2a + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x20 + } + if m.GasPrice != nil { + { + size := m.GasPrice.Size() + i -= size + if _, err := m.GasPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Nonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 + } + if m.ChainID != nil { + { + size := m.ChainID.Size() + i -= size + if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DynamicFeeTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DynamicFeeTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTx(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x62 + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintTx(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x5a + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintTx(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x52 + } + if len(m.Accesses) > 0 { + for iNdEx := len(m.Accesses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accesses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x42 + } + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x32 + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x28 + } + if m.GasFeeCap != nil { + { + size := m.GasFeeCap.Size() + i -= size + if _, err := m.GasFeeCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.GasTipCap != nil { + { + size := m.GasTipCap.Size() + i -= size + if _, err := m.GasTipCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Nonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 + } + if m.ChainID != nil { + { + size := m.ChainID.Size() + i -= size + if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExtensionOptionsEthereumTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtensionOptionsEthereumTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtensionOptionsEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEthereumTxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEthereumTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEthereumTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasUsed != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x28 + } + if len(m.VmError) > 0 { + i -= len(m.VmError) + copy(dAtA[i:], m.VmError) + i = encodeVarintTx(dAtA, i, uint64(len(m.VmError))) + i-- + dAtA[i] = 0x22 + } + if len(m.Ret) > 0 { + i -= len(m.Ret) + copy(dAtA[i:], m.Ret) + i = encodeVarintTx(dAtA, i, uint64(len(m.Ret))) + i-- + dAtA[i] = 0x1a + } + if len(m.Logs) > 0 { + for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgEthereumTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Data != nil { + l = m.Data.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Size_ != 0 { + n += 9 + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *LegacyTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovTx(uint64(m.Nonce)) + } + if m.GasPrice != nil { + l = m.GasPrice.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *AccessListTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainID != nil { + l = m.ChainID.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovTx(uint64(m.Nonce)) + } + if m.GasPrice != nil { + l = m.GasPrice.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Accesses) > 0 { + for _, e := range m.Accesses { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *DynamicFeeTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainID != nil { + l = m.ChainID.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovTx(uint64(m.Nonce)) + } + if m.GasTipCap != nil { + l = m.GasTipCap.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasFeeCap != nil { + l = m.GasFeeCap.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Accesses) > 0 { + for _, e := range m.Accesses { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *ExtensionOptionsEthereumTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEthereumTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Logs) > 0 { + for _, e := range m.Logs { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Ret) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.VmError) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GasUsed != 0 { + n += 1 + sovTx(uint64(m.GasUsed)) + } + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgEthereumTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEthereumTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Data == nil { + m.Data = &types.Any{} + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Size_ = float64(math.Float64frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LegacyTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LegacyTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LegacyTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasPrice = &v + if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessListTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessListTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessListTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ChainID = &v + if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasPrice = &v + if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accesses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accesses = append(m.Accesses, AccessTuple{}) + if err := m.Accesses[len(m.Accesses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DynamicFeeTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DynamicFeeTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ChainID = &v + if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasTipCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasTipCap = &v + if err := m.GasTipCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasFeeCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasFeeCap = &v + if err := m.GasFeeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accesses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accesses = append(m.Accesses, AccessTuple{}) + if err := m.Accesses[len(m.Accesses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExtensionOptionsEthereumTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtensionOptionsEthereumTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtensionOptionsEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEthereumTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEthereumTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEthereumTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Logs = append(m.Logs, &Log{}) + if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ret = append(m.Ret[:0], dAtA[iNdEx:postIndex]...) + if m.Ret == nil { + m.Ret = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VmError", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VmError = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/evm/tx.pb.gw.go b/types/legacy/ethermint/evm/tx.pb.gw.go new file mode 100644 index 0000000..dd898ca --- /dev/null +++ b/types/legacy/ethermint/evm/tx.pb.gw.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ethermint/evm/v1/tx.proto + +/* +Package evm is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package evm + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Msg_EthereumTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgEthereumTx + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_EthereumTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EthereumTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgEthereumTx + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_EthereumTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EthereumTx(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". +// UnaryRPC :call MsgServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. +func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { + + mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_EthereumTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMsgHandler(ctx, mux, conn) +} + +// RegisterMsgHandler registers the http handlers for service Msg to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) +} + +// RegisterMsgHandlerClient registers the http handlers for service Msg +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MsgClient" to call the correct interceptors. +func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { + + mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_EthereumTx_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Msg_EthereumTx_0 = runtime.ForwardResponseMessage +) diff --git a/types/legacy/ethermint/feemarket/events.pb.go b/types/legacy/ethermint/feemarket/events.pb.go new file mode 100644 index 0000000..eeadd2b --- /dev/null +++ b/types/legacy/ethermint/feemarket/events.pb.go @@ -0,0 +1,547 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/feemarket/v1/events.proto + +package feemarket + +import ( + fmt "fmt" + 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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventFeeMarket is the event type for the fee market module +type EventFeeMarket struct { + // base_fee for EIP-1559 blocks + BaseFee string `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3" json:"base_fee,omitempty"` +} + +func (m *EventFeeMarket) Reset() { *m = EventFeeMarket{} } +func (m *EventFeeMarket) String() string { return proto.CompactTextString(m) } +func (*EventFeeMarket) ProtoMessage() {} +func (*EventFeeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_c6edce8d670faff7, []int{0} +} +func (m *EventFeeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventFeeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventFeeMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventFeeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventFeeMarket.Merge(m, src) +} +func (m *EventFeeMarket) XXX_Size() int { + return m.Size() +} +func (m *EventFeeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_EventFeeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_EventFeeMarket proto.InternalMessageInfo + +func (m *EventFeeMarket) GetBaseFee() string { + if m != nil { + return m.BaseFee + } + return "" +} + +// EventBlockGas defines an Ethereum block gas event +type EventBlockGas struct { + // height of the block + Height string `protobuf:"bytes,1,opt,name=height,proto3" json:"height,omitempty"` + // amount of gas wanted by the block + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventBlockGas) Reset() { *m = EventBlockGas{} } +func (m *EventBlockGas) String() string { return proto.CompactTextString(m) } +func (*EventBlockGas) ProtoMessage() {} +func (*EventBlockGas) Descriptor() ([]byte, []int) { + return fileDescriptor_c6edce8d670faff7, []int{1} +} +func (m *EventBlockGas) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBlockGas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBlockGas.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBlockGas) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBlockGas.Merge(m, src) +} +func (m *EventBlockGas) XXX_Size() int { + return m.Size() +} +func (m *EventBlockGas) XXX_DiscardUnknown() { + xxx_messageInfo_EventBlockGas.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBlockGas proto.InternalMessageInfo + +func (m *EventBlockGas) GetHeight() string { + if m != nil { + return m.Height + } + return "" +} + +func (m *EventBlockGas) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func init() { + proto.RegisterType((*EventFeeMarket)(nil), "ethermint.feemarket.v1.EventFeeMarket") + proto.RegisterType((*EventBlockGas)(nil), "ethermint.feemarket.v1.EventBlockGas") +} + +func init() { + proto.RegisterFile("ethermint/feemarket/v1/events.proto", fileDescriptor_c6edce8d670faff7) +} + +var fileDescriptor_c6edce8d670faff7 = []byte{ + // 227 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, + 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x12, 0x83, 0x2b, 0xd2, 0x83, 0x2b, 0xd2, 0x2b, 0x33, 0x54, 0xd2, 0xe6, 0xe2, 0x73, 0x05, 0xa9, + 0x73, 0x4b, 0x4d, 0xf5, 0x05, 0x0b, 0x0a, 0x49, 0x72, 0x71, 0x24, 0x25, 0x16, 0xa7, 0xc6, 0xa7, + 0xa5, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0xb1, 0x83, 0xf8, 0x6e, 0xa9, 0xa9, 0x4a, + 0xf6, 0x5c, 0xbc, 0x60, 0xc5, 0x4e, 0x39, 0xf9, 0xc9, 0xd9, 0xee, 0x89, 0xc5, 0x42, 0x62, 0x5c, + 0x6c, 0x19, 0xa9, 0x99, 0xe9, 0x19, 0x25, 0x50, 0x95, 0x50, 0x1e, 0x48, 0x3c, 0x31, 0x37, 0xbf, + 0x34, 0xaf, 0x44, 0x82, 0x09, 0x22, 0x0e, 0xe1, 0x39, 0x85, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, + 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, + 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x75, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, + 0x7e, 0x45, 0x51, 0x41, 0x4e, 0x6a, 0x59, 0xae, 0x7e, 0x5e, 0x7e, 0x4a, 0xaa, 0x7e, 0x99, 0xa5, + 0x7e, 0x49, 0x65, 0x41, 0x6a, 0xb1, 0x7e, 0x4e, 0x6a, 0x7a, 0x62, 0x72, 0xa5, 0x3e, 0x16, 0xcf, + 0x26, 0xb1, 0x81, 0xfd, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x84, 0x09, 0x8b, 0x0a, + 0x01, 0x00, 0x00, +} + +func (m *EventFeeMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventFeeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventFeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BaseFee) > 0 { + i -= len(m.BaseFee) + copy(dAtA[i:], m.BaseFee) + i = encodeVarintEvents(dAtA, i, uint64(len(m.BaseFee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBlockGas) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBlockGas) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBlockGas) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Height) > 0 { + i -= len(m.Height) + copy(dAtA[i:], m.Height) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Height))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventFeeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseFee) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBlockGas) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Height) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventFeeMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventFeeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventFeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseFee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBlockGas) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBlockGas: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBlockGas: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Height = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/feemarket/feemarket.pb.go b/types/legacy/ethermint/feemarket/feemarket.pb.go new file mode 100644 index 0000000..4e09c33 --- /dev/null +++ b/types/legacy/ethermint/feemarket/feemarket.pb.go @@ -0,0 +1,585 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/feemarket/v1/feemarket.proto + +package feemarket + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the EVM module parameters +type Params struct { + // no_base_fee forces the EIP-1559 base fee to 0 (needed for 0 price calls) + NoBaseFee bool `protobuf:"varint,1,opt,name=no_base_fee,json=noBaseFee,proto3" json:"no_base_fee,omitempty"` + // base_fee_change_denominator bounds the amount the base fee can change + // between blocks. + BaseFeeChangeDenominator uint32 `protobuf:"varint,2,opt,name=base_fee_change_denominator,json=baseFeeChangeDenominator,proto3" json:"base_fee_change_denominator,omitempty"` + // elasticity_multiplier bounds the maximum gas limit an EIP-1559 block may + // have. + ElasticityMultiplier uint32 `protobuf:"varint,3,opt,name=elasticity_multiplier,json=elasticityMultiplier,proto3" json:"elasticity_multiplier,omitempty"` + // enable_height defines at which block height the base fee calculation is enabled. + EnableHeight int64 `protobuf:"varint,5,opt,name=enable_height,json=enableHeight,proto3" json:"enable_height,omitempty"` + // base_fee for EIP-1559 blocks. + BaseFee cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee"` + // min_gas_price defines the minimum gas price value for cosmos and eth transactions + MinGasPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_gas_price,json=minGasPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_gas_price"` + // min_gas_multiplier bounds the minimum gas used to be charged + // to senders based on gas limit + MinGasMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=min_gas_multiplier,json=minGasMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_gas_multiplier"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb8b20cf98e6e1, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetNoBaseFee() bool { + if m != nil { + return m.NoBaseFee + } + return false +} + +func (m *Params) GetBaseFeeChangeDenominator() uint32 { + if m != nil { + return m.BaseFeeChangeDenominator + } + return 0 +} + +func (m *Params) GetElasticityMultiplier() uint32 { + if m != nil { + return m.ElasticityMultiplier + } + return 0 +} + +func (m *Params) GetEnableHeight() int64 { + if m != nil { + return m.EnableHeight + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "ethermint.feemarket.v1.Params") +} + +func init() { + proto.RegisterFile("ethermint/feemarket/v1/feemarket.proto", fileDescriptor_4feb8b20cf98e6e1) +} + +var fileDescriptor_4feb8b20cf98e6e1 = []byte{ + // 449 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x6a, 0xdc, 0x30, + 0x10, 0xc6, 0x57, 0xdd, 0x64, 0xb3, 0x51, 0xba, 0xb0, 0x15, 0x49, 0x31, 0x09, 0x75, 0x96, 0x14, + 0x8a, 0xc9, 0xc1, 0x22, 0xe4, 0xd4, 0x96, 0x5c, 0xb6, 0xa1, 0xff, 0x48, 0x21, 0x18, 0xda, 0x43, + 0x2f, 0x46, 0xf6, 0x4e, 0xec, 0x21, 0x96, 0x64, 0x2c, 0xc5, 0x64, 0x5f, 0xa1, 0xa7, 0x3e, 0x46, + 0x8f, 0x79, 0x8c, 0x1c, 0x73, 0x2c, 0x85, 0x86, 0xb2, 0x7b, 0xc8, 0x6b, 0x94, 0xd8, 0x89, 0xbd, + 0xd0, 0x5e, 0x72, 0x11, 0xa3, 0xf9, 0xbe, 0xf9, 0x31, 0xd2, 0x0c, 0x7d, 0x01, 0x36, 0x85, 0x42, + 0xa2, 0xb2, 0xfc, 0x04, 0x40, 0x8a, 0xe2, 0x14, 0x2c, 0x2f, 0xf7, 0xda, 0x8b, 0x9f, 0x17, 0xda, + 0x6a, 0xf6, 0xb4, 0xf1, 0xf9, 0xad, 0x54, 0xee, 0x6d, 0x3e, 0x11, 0x12, 0x95, 0xe6, 0xd5, 0x59, + 0x5b, 0x37, 0xd7, 0x13, 0x9d, 0xe8, 0x2a, 0xe4, 0xb7, 0x51, 0x9d, 0xdd, 0xf9, 0xdd, 0xa5, 0xbd, + 0x63, 0x51, 0x08, 0x69, 0x98, 0x4b, 0xd7, 0x94, 0x0e, 0x23, 0x61, 0x20, 0x3c, 0x01, 0x70, 0xc8, + 0x88, 0x78, 0xfd, 0x60, 0x55, 0xe9, 0xb1, 0x30, 0xf0, 0x16, 0x80, 0x1d, 0xd0, 0xad, 0x7b, 0x31, + 0x8c, 0x53, 0xa1, 0x12, 0x08, 0x27, 0xa0, 0xb4, 0x44, 0x25, 0xac, 0x2e, 0x9c, 0x47, 0x23, 0xe2, + 0x0d, 0x02, 0x27, 0xaa, 0xdd, 0x6f, 0x2a, 0xc3, 0x61, 0xab, 0xb3, 0x7d, 0xba, 0x01, 0x99, 0x30, + 0x16, 0x63, 0xb4, 0xd3, 0x50, 0x9e, 0x65, 0x16, 0xf3, 0x0c, 0xa1, 0x70, 0xba, 0x55, 0xe1, 0x7a, + 0x2b, 0x7e, 0x6a, 0x34, 0xf6, 0x9c, 0x0e, 0x40, 0x89, 0x28, 0x83, 0x30, 0x05, 0x4c, 0x52, 0xeb, + 0x2c, 0x8f, 0x88, 0xd7, 0x0d, 0x1e, 0xd7, 0xc9, 0xf7, 0x55, 0x8e, 0x1d, 0xd0, 0x7e, 0xd3, 0x75, + 0x6f, 0x44, 0xbc, 0xd5, 0xf1, 0xce, 0xe5, 0xf5, 0x76, 0xe7, 0xd7, 0xf5, 0xf6, 0x46, 0xac, 0x8d, + 0xd4, 0xc6, 0x4c, 0x4e, 0x7d, 0xd4, 0x5c, 0x0a, 0x9b, 0xfa, 0x1f, 0x94, 0xfd, 0x71, 0x73, 0xb1, + 0x4b, 0x82, 0x95, 0xbb, 0x4e, 0xd9, 0x11, 0x1d, 0x48, 0x54, 0x61, 0x22, 0x4c, 0x98, 0x17, 0x18, + 0x83, 0xb3, 0x52, 0x31, 0xbc, 0x3b, 0xc6, 0xd6, 0xbf, 0x8c, 0x23, 0x48, 0x44, 0x3c, 0x3d, 0x84, + 0xb8, 0x26, 0xad, 0x49, 0x54, 0xef, 0x84, 0x39, 0xbe, 0x2d, 0x66, 0x5f, 0x28, 0xbb, 0xa7, 0x2d, + 0xbc, 0xb1, 0xff, 0x40, 0xe4, 0xb0, 0x46, 0xb6, 0x3f, 0xf1, 0xea, 0xd9, 0xb7, 0x9b, 0x8b, 0x5d, + 0x07, 0x4a, 0xa9, 0x0d, 0x3f, 0x5f, 0x58, 0x8a, 0x7a, 0x78, 0x1f, 0x97, 0xfa, 0x4b, 0xc3, 0xe5, + 0x60, 0x88, 0x0a, 0x2d, 0x8a, 0xac, 0x99, 0xe2, 0xf8, 0xf3, 0xe5, 0xcc, 0x25, 0x57, 0x33, 0x97, + 0xfc, 0x99, 0xb9, 0xe4, 0xfb, 0xdc, 0xed, 0x5c, 0xcd, 0xdd, 0xce, 0xcf, 0xb9, 0xdb, 0xf9, 0xfa, + 0x3a, 0x41, 0x9b, 0x9e, 0x45, 0x7e, 0xac, 0x25, 0x3f, 0x2f, 0xf2, 0x0c, 0x4a, 0xc9, 0x95, 0x9e, + 0x00, 0x2f, 0x5f, 0x72, 0x3b, 0xcd, 0xc1, 0xf0, 0xac, 0xea, 0x89, 0xff, 0x67, 0x15, 0xa3, 0x5e, + 0xb5, 0x3d, 0xfb, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xbf, 0x60, 0xee, 0xa8, 0x02, 0x00, + 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinGasMultiplier.Size() + i -= size + if _, err := m.MinGasMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFeemarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.MinGasPrice.Size() + i -= size + if _, err := m.MinGasPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFeemarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.BaseFee.Size() + i -= size + if _, err := m.BaseFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFeemarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if m.EnableHeight != 0 { + i = encodeVarintFeemarket(dAtA, i, uint64(m.EnableHeight)) + i-- + dAtA[i] = 0x28 + } + if m.ElasticityMultiplier != 0 { + i = encodeVarintFeemarket(dAtA, i, uint64(m.ElasticityMultiplier)) + i-- + dAtA[i] = 0x18 + } + if m.BaseFeeChangeDenominator != 0 { + i = encodeVarintFeemarket(dAtA, i, uint64(m.BaseFeeChangeDenominator)) + i-- + dAtA[i] = 0x10 + } + if m.NoBaseFee { + i-- + if m.NoBaseFee { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintFeemarket(dAtA []byte, offset int, v uint64) int { + offset -= sovFeemarket(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NoBaseFee { + n += 2 + } + if m.BaseFeeChangeDenominator != 0 { + n += 1 + sovFeemarket(uint64(m.BaseFeeChangeDenominator)) + } + if m.ElasticityMultiplier != 0 { + n += 1 + sovFeemarket(uint64(m.ElasticityMultiplier)) + } + if m.EnableHeight != 0 { + n += 1 + sovFeemarket(uint64(m.EnableHeight)) + } + l = m.BaseFee.Size() + n += 1 + l + sovFeemarket(uint64(l)) + l = m.MinGasPrice.Size() + n += 1 + l + sovFeemarket(uint64(l)) + l = m.MinGasMultiplier.Size() + n += 1 + l + sovFeemarket(uint64(l)) + return n +} + +func sovFeemarket(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFeemarket(x uint64) (n int) { + return sovFeemarket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NoBaseFee", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.NoBaseFee = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFeeChangeDenominator", wireType) + } + m.BaseFeeChangeDenominator = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseFeeChangeDenominator |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ElasticityMultiplier", wireType) + } + m.ElasticityMultiplier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ElasticityMultiplier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableHeight", wireType) + } + m.EnableHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EnableHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthFeemarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFeemarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinGasPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthFeemarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFeemarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinGasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinGasMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthFeemarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFeemarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinGasMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFeemarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeemarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFeemarket(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFeemarket + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFeemarket + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFeemarket + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFeemarket + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFeemarket + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFeemarket + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFeemarket = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFeemarket = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFeemarket = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/feemarket/genesis.pb.go b/types/legacy/ethermint/feemarket/genesis.pb.go new file mode 100644 index 0000000..c35fcd0 --- /dev/null +++ b/types/legacy/ethermint/feemarket/genesis.pb.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/feemarket/v1/genesis.proto + +package feemarket + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the feemarket module's genesis state. +type GenesisState struct { + // params defines all the parameters of the feemarket module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // block_gas is the amount of gas wanted on the last block before the upgrade. + // Zero by default. + BlockGas uint64 `protobuf:"varint,3,opt,name=block_gas,json=blockGas,proto3" json:"block_gas,omitempty"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_6241c21661288629, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetBlockGas() uint64 { + if m != nil { + return m.BlockGas + } + return 0 +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "ethermint.feemarket.v1.GenesisState") +} + +func init() { + proto.RegisterFile("ethermint/feemarket/v1/genesis.proto", fileDescriptor_6241c21661288629) +} + +var fileDescriptor_6241c21661288629 = []byte{ + // 275 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, + 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x83, 0xab, 0xd2, 0x83, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, + 0xcb, 0xd7, 0x07, 0x93, 0x10, 0xa5, 0x52, 0x6a, 0x38, 0x0c, 0x44, 0xe8, 0x83, 0xa8, 0x13, 0x49, + 0xcf, 0x4f, 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, 0x88, 0xa8, 0x52, 0x1d, 0x17, 0x8f, 0x3b, 0xc4, + 0xe6, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0x21, 0x47, 0x2e, 0xb6, 0x82, 0xc4, 0xa2, 0xc4, 0xdc, 0x62, + 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x39, 0x3d, 0xec, 0x2e, 0xd1, 0x0b, 0x00, 0xab, 0x72, + 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, 0xf3, 0x0d, 0x5a, 0x8c, 0x41, 0x50, 0x8d, 0x42, 0xd2, + 0x5c, 0x9c, 0x49, 0x39, 0xf9, 0xc9, 0xd9, 0xf1, 0xe9, 0x89, 0xc5, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, + 0x2c, 0x41, 0x1c, 0x60, 0x01, 0xf7, 0xc4, 0x62, 0x2f, 0x16, 0x0e, 0x26, 0x01, 0xe6, 0x20, 0x8e, + 0xa4, 0xc4, 0xe2, 0xd4, 0xf8, 0xb4, 0xd4, 0x54, 0xa7, 0xd0, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, + 0x3c, 0x96, 0x63, 0x88, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0xaf, 0x28, 0x2a, 0xc8, 0x49, 0x2d, 0xcb, 0xd5, 0xcf, 0xcb, 0x4f, 0x49, 0xd5, 0x2f, 0xb3, 0xd4, + 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0xcf, 0x49, 0x4d, 0x4f, 0x4c, 0xae, 0xd4, 0xc7, 0xe2, 0xff, + 0x24, 0x36, 0xb0, 0xef, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x66, 0xc1, 0x38, 0xb0, 0x6e, + 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockGas != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.BlockGas)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.BlockGas != 0 { + n += 1 + sovGenesis(uint64(m.BlockGas)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockGas", wireType) + } + m.BlockGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockGas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/feemarket/query.pb.go b/types/legacy/ethermint/feemarket/query.pb.go new file mode 100644 index 0000000..86b1cc5 --- /dev/null +++ b/types/legacy/ethermint/feemarket/query.pb.go @@ -0,0 +1,1199 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/feemarket/v1/query.proto + +package feemarket + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest defines the request type for querying x/evm parameters. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_71a07c1ffd85fde2, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse defines the response type for querying x/evm parameters. +type QueryParamsResponse struct { + // params define the evm module parameters. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_71a07c1ffd85fde2, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// QueryBaseFeeRequest defines the request type for querying the EIP1559 base +// fee. +type QueryBaseFeeRequest struct { +} + +func (m *QueryBaseFeeRequest) Reset() { *m = QueryBaseFeeRequest{} } +func (m *QueryBaseFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBaseFeeRequest) ProtoMessage() {} +func (*QueryBaseFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_71a07c1ffd85fde2, []int{2} +} +func (m *QueryBaseFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBaseFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBaseFeeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBaseFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBaseFeeRequest.Merge(m, src) +} +func (m *QueryBaseFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBaseFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBaseFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo + +// QueryBaseFeeResponse returns the EIP1559 base fee. +type QueryBaseFeeResponse struct { + // base_fee is the EIP1559 base fee + BaseFee *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee,omitempty"` +} + +func (m *QueryBaseFeeResponse) Reset() { *m = QueryBaseFeeResponse{} } +func (m *QueryBaseFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBaseFeeResponse) ProtoMessage() {} +func (*QueryBaseFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_71a07c1ffd85fde2, []int{3} +} +func (m *QueryBaseFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBaseFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBaseFeeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBaseFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBaseFeeResponse.Merge(m, src) +} +func (m *QueryBaseFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBaseFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBaseFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBaseFeeResponse proto.InternalMessageInfo + +// QueryBlockGasRequest defines the request type for querying the EIP1559 base +// fee. +type QueryBlockGasRequest struct { +} + +func (m *QueryBlockGasRequest) Reset() { *m = QueryBlockGasRequest{} } +func (m *QueryBlockGasRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBlockGasRequest) ProtoMessage() {} +func (*QueryBlockGasRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_71a07c1ffd85fde2, []int{4} +} +func (m *QueryBlockGasRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBlockGasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBlockGasRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBlockGasRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlockGasRequest.Merge(m, src) +} +func (m *QueryBlockGasRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBlockGasRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlockGasRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBlockGasRequest proto.InternalMessageInfo + +// QueryBlockGasResponse returns block gas used for a given height. +type QueryBlockGasResponse struct { + // gas is the returned block gas + Gas int64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"` +} + +func (m *QueryBlockGasResponse) Reset() { *m = QueryBlockGasResponse{} } +func (m *QueryBlockGasResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBlockGasResponse) ProtoMessage() {} +func (*QueryBlockGasResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_71a07c1ffd85fde2, []int{5} +} +func (m *QueryBlockGasResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBlockGasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBlockGasResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBlockGasResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlockGasResponse.Merge(m, src) +} +func (m *QueryBlockGasResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBlockGasResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlockGasResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBlockGasResponse proto.InternalMessageInfo + +func (m *QueryBlockGasResponse) GetGas() int64 { + if m != nil { + return m.Gas + } + return 0 +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "ethermint.feemarket.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "ethermint.feemarket.v1.QueryParamsResponse") + proto.RegisterType((*QueryBaseFeeRequest)(nil), "ethermint.feemarket.v1.QueryBaseFeeRequest") + proto.RegisterType((*QueryBaseFeeResponse)(nil), "ethermint.feemarket.v1.QueryBaseFeeResponse") + proto.RegisterType((*QueryBlockGasRequest)(nil), "ethermint.feemarket.v1.QueryBlockGasRequest") + proto.RegisterType((*QueryBlockGasResponse)(nil), "ethermint.feemarket.v1.QueryBlockGasResponse") +} + +func init() { + proto.RegisterFile("ethermint/feemarket/v1/query.proto", fileDescriptor_71a07c1ffd85fde2) +} + +var fileDescriptor_71a07c1ffd85fde2 = []byte{ + // 473 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4f, 0x6b, 0x13, 0x41, + 0x14, 0xcf, 0x18, 0x4c, 0xdb, 0xf1, 0xa2, 0x63, 0x52, 0x74, 0x89, 0x1b, 0x59, 0x54, 0xb4, 0xea, + 0x0e, 0xad, 0x5e, 0xc4, 0x93, 0x39, 0x28, 0x82, 0x07, 0x0d, 0x08, 0xe2, 0xa5, 0x4c, 0xd2, 0xd7, + 0xcd, 0x92, 0xcc, 0xbc, 0xed, 0xce, 0x64, 0x31, 0x57, 0xc1, 0x8b, 0x07, 0x11, 0xfc, 0x12, 0x5e, + 0x04, 0x3f, 0x46, 0x8f, 0x05, 0x2f, 0xe2, 0xa1, 0x48, 0x22, 0xf8, 0x35, 0x24, 0x33, 0x93, 0xc8, + 0x6a, 0xaa, 0xb9, 0x2c, 0x8f, 0xb7, 0xbf, 0xf7, 0x7e, 0x7f, 0x1e, 0x43, 0x23, 0x30, 0x7d, 0xc8, + 0x65, 0xaa, 0x0c, 0xdf, 0x07, 0x90, 0x22, 0x1f, 0x80, 0xe1, 0xc5, 0x36, 0x3f, 0x18, 0x41, 0x3e, + 0x8e, 0xb3, 0x1c, 0x0d, 0xb2, 0xcd, 0x05, 0x26, 0x5e, 0x60, 0xe2, 0x62, 0x3b, 0x38, 0x27, 0x64, + 0xaa, 0x90, 0xdb, 0xaf, 0x83, 0x06, 0xd7, 0x4e, 0x58, 0xf7, 0x7b, 0xce, 0xe1, 0xea, 0x09, 0x26, + 0x68, 0x4b, 0x3e, 0xab, 0x7c, 0xb7, 0x99, 0x20, 0x26, 0x43, 0xe0, 0x22, 0x4b, 0xb9, 0x50, 0x0a, + 0x8d, 0x30, 0x29, 0x2a, 0xed, 0xfe, 0x46, 0x75, 0xca, 0x9e, 0xcd, 0x54, 0x3d, 0x15, 0xb9, 0x90, + 0xba, 0x03, 0x07, 0x23, 0xd0, 0x26, 0x7a, 0x41, 0xcf, 0x97, 0xba, 0x3a, 0x43, 0xa5, 0x81, 0x3d, + 0xa0, 0xb5, 0xcc, 0x76, 0x2e, 0x90, 0xcb, 0xe4, 0xfa, 0x99, 0x9d, 0x30, 0x5e, 0x6e, 0x22, 0x76, + 0x73, 0xed, 0x8d, 0xc3, 0xe3, 0x56, 0xe5, 0xe3, 0xcf, 0xcf, 0x5b, 0xa4, 0xe3, 0x07, 0xa3, 0x86, + 0xdf, 0xdc, 0x16, 0x1a, 0x1e, 0x02, 0xcc, 0x09, 0x9f, 0xd0, 0x7a, 0xb9, 0xed, 0x19, 0xef, 0xd2, + 0xf5, 0xae, 0xd0, 0xb0, 0xbb, 0x0f, 0x60, 0x39, 0x37, 0xda, 0x17, 0xbf, 0x1d, 0xb7, 0x1a, 0x3d, + 0xd4, 0x12, 0xb5, 0xde, 0x1b, 0xc4, 0x29, 0x72, 0x29, 0x4c, 0x3f, 0x7e, 0xac, 0x4c, 0x67, 0xad, + 0xeb, 0xa6, 0xa3, 0xcd, 0xf9, 0xb6, 0x21, 0xf6, 0x06, 0x8f, 0xc4, 0xc2, 0xd6, 0x0d, 0xda, 0xf8, + 0xa3, 0xef, 0x69, 0xce, 0xd2, 0x6a, 0x22, 0x9c, 0xab, 0x6a, 0x67, 0x56, 0xee, 0x7c, 0xaa, 0xd2, + 0xd3, 0x16, 0xcb, 0xde, 0x10, 0x5a, 0x73, 0x7e, 0xd8, 0xd6, 0x49, 0x7e, 0xff, 0x8e, 0x30, 0xb8, + 0xb9, 0x12, 0xd6, 0xf1, 0x47, 0xd1, 0xeb, 0x2f, 0x3f, 0x3e, 0x9c, 0x6a, 0xb2, 0x80, 0x43, 0x21, + 0x51, 0x97, 0xcf, 0xec, 0x92, 0x63, 0x6f, 0x09, 0x5d, 0xf3, 0xf1, 0xb0, 0x7f, 0x2f, 0x2f, 0x67, + 0x1b, 0xdc, 0x5a, 0x0d, 0xec, 0xa5, 0x5c, 0xb1, 0x52, 0x42, 0xd6, 0x5c, 0x26, 0x65, 0x7e, 0x0b, + 0xf6, 0x8e, 0xd0, 0xf5, 0x79, 0x8a, 0xec, 0x3f, 0x04, 0xe5, 0x23, 0x04, 0xb7, 0x57, 0x44, 0x7b, + 0x3d, 0x57, 0xad, 0x9e, 0x16, 0xbb, 0xb4, 0x54, 0xcf, 0x0c, 0xbd, 0x9b, 0x08, 0xdd, 0x7e, 0x7e, + 0x38, 0x09, 0xc9, 0xd1, 0x24, 0x24, 0xdf, 0x27, 0x21, 0x79, 0x3f, 0x0d, 0x2b, 0x47, 0xd3, 0xb0, + 0xf2, 0x75, 0x1a, 0x56, 0x5e, 0xde, 0x4f, 0x52, 0xd3, 0x1f, 0x75, 0xe3, 0x1e, 0x4a, 0xfe, 0x2a, + 0xcf, 0x86, 0x50, 0x48, 0xae, 0x70, 0x0f, 0x78, 0x71, 0x8f, 0x9b, 0x71, 0x06, 0x9a, 0x0f, 0x21, + 0x11, 0xbd, 0x31, 0x5f, 0xf2, 0xca, 0xba, 0x35, 0xfb, 0x4a, 0xee, 0xfc, 0x0a, 0x00, 0x00, 0xff, + 0xff, 0x80, 0x79, 0xd0, 0xb5, 0xd2, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Params queries the parameters of x/feemarket module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // BaseFee queries the base fee of the parent block of the current block. + BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) + // BlockGas queries the gas used at a given block height + BlockGas(ctx context.Context, in *QueryBlockGasRequest, opts ...grpc.CallOption) (*QueryBlockGasResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/ethermint.feemarket.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) { + out := new(QueryBaseFeeResponse) + err := c.cc.Invoke(ctx, "/ethermint.feemarket.v1.Query/BaseFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BlockGas(ctx context.Context, in *QueryBlockGasRequest, opts ...grpc.CallOption) (*QueryBlockGasResponse, error) { + out := new(QueryBlockGasResponse) + err := c.cc.Invoke(ctx, "/ethermint.feemarket.v1.Query/BlockGas", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries the parameters of x/feemarket module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // BaseFee queries the base fee of the parent block of the current block. + BaseFee(context.Context, *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) + // BlockGas queries the gas used at a given block height + BlockGas(context.Context, *QueryBlockGasRequest) (*QueryBlockGasResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) BaseFee(ctx context.Context, req *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BaseFee not implemented") +} +func (*UnimplementedQueryServer) BlockGas(ctx context.Context, req *QueryBlockGasRequest) (*QueryBlockGasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BlockGas not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.feemarket.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BaseFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBaseFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BaseFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.feemarket.v1.Query/BaseFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BaseFee(ctx, req.(*QueryBaseFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BlockGas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBlockGasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BlockGas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.feemarket.v1.Query/BlockGas", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BlockGas(ctx, req.(*QueryBlockGasRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethermint.feemarket.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "BaseFee", + Handler: _Query_BaseFee_Handler, + }, + { + MethodName: "BlockGas", + Handler: _Query_BlockGas_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ethermint/feemarket/v1/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryBaseFeeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBaseFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBaseFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryBaseFeeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBaseFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBaseFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BaseFee != nil { + { + size := m.BaseFee.Size() + i -= size + if _, err := m.BaseFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBlockGasRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBlockGasRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBlockGasRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryBlockGasResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBlockGasResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBlockGasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Gas != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Gas)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBaseFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryBaseFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseFee != nil { + l = m.BaseFee.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBlockGasRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryBlockGasResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Gas != 0 { + n += 1 + sovQuery(uint64(m.Gas)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBaseFeeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBaseFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBaseFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBaseFeeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBaseFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBaseFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.BaseFee = &v + if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBlockGasRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBlockGasRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBlockGasRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBlockGasResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBlockGasResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBlockGasResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Gas", wireType) + } + m.Gas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Gas |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/feemarket/query.pb.gw.go b/types/legacy/ethermint/feemarket/query.pb.gw.go new file mode 100644 index 0000000..c70e3f5 --- /dev/null +++ b/types/legacy/ethermint/feemarket/query.pb.gw.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ethermint/feemarket/v1/query.proto + +/* +Package feemarket is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package feemarket + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBaseFeeRequest + var metadata runtime.ServerMetadata + + msg, err := client.BaseFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBaseFeeRequest + var metadata runtime.ServerMetadata + + msg, err := server.BaseFee(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_BlockGas_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBlockGasRequest + var metadata runtime.ServerMetadata + + msg, err := client.BlockGas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BlockGas_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBlockGasRequest + var metadata runtime.ServerMetadata + + msg, err := server.BlockGas(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BlockGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BlockGas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BlockGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BaseFee_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BaseFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_BlockGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BlockGas_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BlockGas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "feemarket", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "feemarket", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_BlockGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "feemarket", "v1", "block_gas"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_BaseFee_0 = runtime.ForwardResponseMessage + + forward_Query_BlockGas_0 = runtime.ForwardResponseMessage +) diff --git a/types/legacy/ethermint/feemarket/tx.pb.go b/types/legacy/ethermint/feemarket/tx.pb.go new file mode 100644 index 0000000..3d3159d --- /dev/null +++ b/types/legacy/ethermint/feemarket/tx.pb.go @@ -0,0 +1,599 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/feemarket/v1/tx.proto + +package feemarket + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams defines a Msg for updating the x/feemarket module parameters. +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/feemarket parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_78aff2584dbf2838, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_78aff2584dbf2838, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "ethermint.feemarket.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "ethermint.feemarket.v1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("ethermint/feemarket/v1/tx.proto", fileDescriptor_78aff2584dbf2838) } + +var fileDescriptor_78aff2584dbf2838 = []byte{ + // 372 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, + 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x2b, 0xd0, + 0x83, 0x2b, 0xd0, 0x2b, 0x33, 0x94, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, + 0xa5, 0x52, 0xe2, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xfa, 0xb9, 0xc5, 0xe9, 0x20, 0x23, 0x72, + 0x8b, 0xd3, 0xa1, 0x12, 0x92, 0x10, 0x89, 0x78, 0x30, 0x4f, 0x1f, 0xc2, 0x81, 0x4a, 0xa9, 0xe1, + 0xb0, 0x1f, 0x61, 0x17, 0x44, 0x9d, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x44, 0x3f, 0x88, 0x05, 0x11, + 0x55, 0x3a, 0xc4, 0xc8, 0xc5, 0xef, 0x5b, 0x9c, 0x1e, 0x5a, 0x90, 0x92, 0x58, 0x92, 0x1a, 0x90, + 0x58, 0x94, 0x98, 0x5b, 0x2c, 0x64, 0xc6, 0xc5, 0x99, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, + 0x52, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0x71, 0x69, 0x8b, 0xae, 0x08, 0xd4, 0x5a, + 0xc7, 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0xe2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x84, 0x52, + 0x21, 0x47, 0x2e, 0xb6, 0x02, 0xb0, 0x09, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x72, 0x7a, + 0xd8, 0x7d, 0xae, 0x07, 0xb1, 0xc7, 0x89, 0xf3, 0xc4, 0x3d, 0x79, 0x86, 0x15, 0xcf, 0x37, 0x68, + 0x31, 0x06, 0x41, 0x35, 0x5a, 0x99, 0x34, 0x3d, 0xdf, 0xa0, 0x85, 0x30, 0xb2, 0xeb, 0xf9, 0x06, + 0x2d, 0xc5, 0xd4, 0x32, 0x50, 0x90, 0x54, 0x20, 0xf9, 0x0e, 0xcd, 0xc1, 0x4a, 0x92, 0x5c, 0xe2, + 0x68, 0x42, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, 0x65, 0x5c, 0xcc, 0xbe, 0xc5, + 0xe9, 0x42, 0x19, 0x5c, 0x3c, 0x28, 0x5e, 0x54, 0xc7, 0xe5, 0x34, 0x34, 0x73, 0xa4, 0xf4, 0x89, + 0x54, 0x08, 0xb3, 0x50, 0x8a, 0xb5, 0x01, 0xe4, 0x21, 0xa7, 0xd0, 0x13, 0x8f, 0xe4, 0x18, 0x2f, + 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, + 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0xaf, 0x28, 0x2a, 0xc8, 0x49, 0x2d, 0xcb, 0xd5, 0xcf, 0xcb, 0x4f, 0x49, 0xd5, 0x2f, 0xb3, + 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0xcf, 0x49, 0x4d, 0x4f, 0x4c, 0xae, 0xd4, 0xc7, 0x12, + 0xaf, 0x49, 0x6c, 0xe0, 0x58, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x93, 0xa7, 0x21, 0xd9, + 0x75, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defined a governance operation for updating the x/feemarket module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/ethermint.feemarket.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defined a governance operation for updating the x/feemarket module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.feemarket.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ethermint.feemarket.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ethermint/feemarket/v1/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/types/account.pb.go b/types/legacy/ethermint/types/account.pb.go new file mode 100644 index 0000000..b819b8e --- /dev/null +++ b/types/legacy/ethermint/types/account.pb.go @@ -0,0 +1,377 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/account.proto + +package types + +import ( + fmt "fmt" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EthAccount implements the authtypes.AccountI interface and embeds an +// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. +type EthAccount struct { + // base_account is an authtypes.BaseAccount + *types.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty" yaml:"base_account"` + // code_hash is the hash calculated from the code contents + CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"` +} + +func (m *EthAccount) Reset() { *m = EthAccount{} } +func (*EthAccount) ProtoMessage() {} +func (*EthAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_4edc057d42a619ef, []int{0} +} +func (m *EthAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EthAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthAccount.Merge(m, src) +} +func (m *EthAccount) XXX_Size() int { + return m.Size() +} +func (m *EthAccount) XXX_DiscardUnknown() { + xxx_messageInfo_EthAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_EthAccount proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EthAccount)(nil), "ethermint.types.v1.EthAccount") +} + +func init() { proto.RegisterFile("ethermint/types/v1/account.proto", fileDescriptor_4edc057d42a619ef) } + +var fileDescriptor_4edc057d42a619ef = []byte{ + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x3f, 0x4f, 0x02, 0x31, + 0x1c, 0x6d, 0x1d, 0x8c, 0x1c, 0x0e, 0xe6, 0x64, 0x40, 0x4c, 0xda, 0xcb, 0x4d, 0x2c, 0xb4, 0x39, + 0x1d, 0x8c, 0x6c, 0x5e, 0xa2, 0xd1, 0x51, 0x06, 0x07, 0x17, 0xec, 0x95, 0xe6, 0x4a, 0xe4, 0x28, + 0xa1, 0xe5, 0x02, 0xdf, 0xc0, 0xd1, 0xd1, 0x91, 0x0f, 0xe1, 0x87, 0x30, 0x4e, 0x8c, 0x4e, 0xc4, + 0xc0, 0xe2, 0xcc, 0xe6, 0x66, 0xb8, 0x36, 0x48, 0x8c, 0x53, 0x7f, 0xff, 0xde, 0xef, 0xbd, 0xbe, + 0x9f, 0x17, 0x08, 0x23, 0xc5, 0x30, 0xeb, 0xf6, 0x0d, 0x35, 0x93, 0x81, 0xd0, 0x34, 0x8f, 0x28, + 0xe3, 0x5c, 0x8d, 0xfa, 0x86, 0x0c, 0x86, 0xca, 0x28, 0xdf, 0xdf, 0x4c, 0x90, 0x62, 0x82, 0xe4, + 0x51, 0x0d, 0x71, 0xa5, 0x33, 0xa5, 0x29, 0x1b, 0x19, 0x49, 0xf3, 0x28, 0x11, 0x86, 0x45, 0x45, + 0x62, 0x31, 0xb5, 0x23, 0xdb, 0x6f, 0x17, 0x19, 0xb5, 0x89, 0x6b, 0x55, 0x52, 0x95, 0x2a, 0x5b, + 0x5f, 0x47, 0xb6, 0x1a, 0x7e, 0x43, 0xcf, 0xbb, 0x34, 0xf2, 0xc2, 0x32, 0xfb, 0x0f, 0xde, 0x7e, + 0xc2, 0xb4, 0x68, 0x3b, 0x25, 0x55, 0x18, 0xc0, 0x7a, 0xf9, 0x24, 0x20, 0x6e, 0x53, 0xc1, 0xe4, + 0x68, 0x49, 0xcc, 0xb4, 0x70, 0xb8, 0xf8, 0x78, 0x36, 0xc7, 0x70, 0x35, 0xc7, 0x87, 0x13, 0x96, + 0xf5, 0x9a, 0xe1, 0xf6, 0x8e, 0xb0, 0x55, 0x4e, 0x7e, 0x27, 0xfd, 0xc8, 0x2b, 0x71, 0xd5, 0x11, + 0x6d, 0xc9, 0xb4, 0xac, 0xee, 0x04, 0xb0, 0x5e, 0x8a, 0x2b, 0xab, 0x39, 0x3e, 0xb0, 0xc0, 0x4d, + 0x2b, 0x6c, 0xed, 0xad, 0xe3, 0x6b, 0xa6, 0x65, 0xf3, 0xee, 0x69, 0x8a, 0xc1, 0xcb, 0x14, 0x83, + 0xaf, 0x29, 0x06, 0xef, 0xaf, 0x8d, 0xab, 0xb4, 0x6b, 0xe4, 0x28, 0x21, 0x5c, 0x65, 0xee, 0x8b, + 0xee, 0x69, 0xe8, 0xce, 0x23, 0x1d, 0x5b, 0x73, 0xac, 0x65, 0xff, 0xe9, 0x76, 0x4a, 0x6e, 0xe2, + 0xdb, 0xb7, 0x05, 0x82, 0xb3, 0x05, 0x82, 0x9f, 0x0b, 0x04, 0x9f, 0x97, 0x08, 0xcc, 0x96, 0x08, + 0x7c, 0x2c, 0x11, 0xb8, 0x3f, 0xdb, 0x62, 0x18, 0x0f, 0x07, 0x3d, 0x91, 0x67, 0xb4, 0xaf, 0x3a, + 0x82, 0xe6, 0xe7, 0xee, 0x5a, 0x3d, 0x91, 0x32, 0x3e, 0xa1, 0x7f, 0x8e, 0x98, 0xec, 0x16, 0xae, + 0x9e, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x69, 0xe2, 0x63, 0x2e, 0xde, 0x01, 0x00, 0x00, +} + +func (m *EthAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EthAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintAccount(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0x12 + } + if m.BaseAccount != nil { + { + size, err := m.BaseAccount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAccount(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { + offset -= sovAccount(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EthAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseAccount != nil { + l = m.BaseAccount.Size() + n += 1 + l + sovAccount(uint64(l)) + } + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovAccount(uint64(l)) + } + return n +} + +func sovAccount(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAccount(x uint64) (n int) { + return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EthAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EthAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseAccount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAccount + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BaseAccount == nil { + m.BaseAccount = &types.BaseAccount{} + } + if err := m.BaseAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAccount + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAccount(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAccount + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAccount(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccount + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccount + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccount + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAccount + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAccount + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAccount + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/types/dynamic_fee.pb.go b/types/legacy/ethermint/types/dynamic_fee.pb.go new file mode 100644 index 0000000..824ad83 --- /dev/null +++ b/types/legacy/ethermint/types/dynamic_fee.pb.go @@ -0,0 +1,324 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/dynamic_fee.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ExtensionOptionDynamicFeeTx is an extension option that specifies the maxPrioPrice for cosmos tx +type ExtensionOptionDynamicFeeTx struct { + // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec + MaxPriorityPrice cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=max_priority_price,json=maxPriorityPrice,proto3,customtype=cosmossdk.io/math.Int" json:"max_priority_price"` +} + +func (m *ExtensionOptionDynamicFeeTx) Reset() { *m = ExtensionOptionDynamicFeeTx{} } +func (m *ExtensionOptionDynamicFeeTx) String() string { return proto.CompactTextString(m) } +func (*ExtensionOptionDynamicFeeTx) ProtoMessage() {} +func (*ExtensionOptionDynamicFeeTx) Descriptor() ([]byte, []int) { + return fileDescriptor_9d7cf05c9992c480, []int{0} +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtensionOptionDynamicFeeTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionOptionDynamicFeeTx.Merge(m, src) +} +func (m *ExtensionOptionDynamicFeeTx) XXX_Size() int { + return m.Size() +} +func (m *ExtensionOptionDynamicFeeTx) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionOptionDynamicFeeTx.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionOptionDynamicFeeTx proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ExtensionOptionDynamicFeeTx)(nil), "ethermint.types.v1.ExtensionOptionDynamicFeeTx") +} + +func init() { + proto.RegisterFile("ethermint/types/v1/dynamic_fee.proto", fileDescriptor_9d7cf05c9992c480) +} + +var fileDescriptor_9d7cf05c9992c480 = []byte{ + // 269 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, + 0xa9, 0xcc, 0x4b, 0xcc, 0xcd, 0x4c, 0x8e, 0x4f, 0x4b, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x82, 0xab, 0xd2, 0x03, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, + 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x65, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, + 0x05, 0x11, 0x55, 0xca, 0xe7, 0x92, 0x76, 0xad, 0x28, 0x49, 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0xf3, + 0x2f, 0x28, 0xc9, 0xcc, 0xcf, 0x73, 0x81, 0x58, 0xe0, 0x96, 0x9a, 0x1a, 0x52, 0x21, 0x14, 0xc0, + 0x25, 0x94, 0x9b, 0x58, 0x11, 0x5f, 0x50, 0x94, 0x99, 0x5f, 0x94, 0x59, 0x52, 0x09, 0x62, 0x24, + 0xa7, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x3a, 0x29, 0x9d, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, + 0xbc, 0x68, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x71, 0x4a, 0xb6, 0x5e, 0x66, 0xbe, 0x7e, 0x6e, + 0x62, 0x49, 0x86, 0x9e, 0x67, 0x5e, 0xc9, 0x8a, 0xe7, 0x1b, 0xb4, 0x18, 0x83, 0x04, 0x72, 0x13, + 0x2b, 0x02, 0xa0, 0x9a, 0x03, 0x40, 0x7a, 0x9d, 0x02, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, + 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, + 0x58, 0x8e, 0x21, 0xca, 0x3c, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xbf, + 0xa2, 0xa8, 0x20, 0x27, 0xb5, 0x2c, 0x57, 0x3f, 0x2f, 0x3f, 0x25, 0x55, 0xbf, 0xcc, 0x12, 0xea, + 0xfd, 0x9c, 0xd4, 0xf4, 0xc4, 0xe4, 0x4a, 0x7d, 0xb4, 0x50, 0x49, 0x62, 0x03, 0x7b, 0xc5, 0x18, + 0x10, 0x00, 0x00, 0xff, 0xff, 0x60, 0xd4, 0xbb, 0x43, 0x2f, 0x01, 0x00, 0x00, +} + +func (m *ExtensionOptionDynamicFeeTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtensionOptionDynamicFeeTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtensionOptionDynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MaxPriorityPrice.Size() + i -= size + if _, err := m.MaxPriorityPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDynamicFee(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintDynamicFee(dAtA []byte, offset int, v uint64) int { + offset -= sovDynamicFee(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExtensionOptionDynamicFeeTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MaxPriorityPrice.Size() + n += 1 + l + sovDynamicFee(uint64(l)) + return n +} + +func sovDynamicFee(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDynamicFee(x uint64) (n int) { + return sovDynamicFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExtensionOptionDynamicFeeTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxPriorityPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDynamicFee + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDynamicFee + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxPriorityPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDynamicFee(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDynamicFee + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDynamicFee(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDynamicFee + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDynamicFee + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDynamicFee + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDynamicFee + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDynamicFee = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDynamicFee = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDynamicFee = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/types/indexer.pb.go b/types/legacy/ethermint/types/indexer.pb.go new file mode 100644 index 0000000..dddea2b --- /dev/null +++ b/types/legacy/ethermint/types/indexer.pb.go @@ -0,0 +1,487 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/indexer.proto + +package types + +import ( + fmt "fmt" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// TxResult is the value stored in eth tx indexer +type TxResult struct { + // height of the blockchain + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // tx_index of the cosmos transaction + TxIndex uint32 `protobuf:"varint,2,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + // msg_index in a batch transaction + MsgIndex uint32 `protobuf:"varint,3,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"` + // eth_tx_index is the index in the list of valid eth tx in the block, + // aka. the transaction list returned by eth_getBlock api. + EthTxIndex int32 `protobuf:"varint,4,opt,name=eth_tx_index,json=ethTxIndex,proto3" json:"eth_tx_index,omitempty"` + // failed is true if the eth transaction did not go succeed + Failed bool `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"` + // gas_used by the transaction. If it exceeds the block gas limit, + // it's set to gas limit, which is what's actually deducted by ante handler. + GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + // cumulative_gas_used specifies the cumulated amount of gas used for all + // processed messages within the current batch transaction. + CumulativeGasUsed uint64 `protobuf:"varint,7,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"` +} + +func (m *TxResult) Reset() { *m = TxResult{} } +func (m *TxResult) String() string { return proto.CompactTextString(m) } +func (*TxResult) ProtoMessage() {} +func (*TxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_1197e10a8be8ed28, []int{0} +} +func (m *TxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxResult.Merge(m, src) +} +func (m *TxResult) XXX_Size() int { + return m.Size() +} +func (m *TxResult) XXX_DiscardUnknown() { + xxx_messageInfo_TxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_TxResult proto.InternalMessageInfo + +func init() { + proto.RegisterType((*TxResult)(nil), "ethermint.types.v1.TxResult") +} + +func init() { proto.RegisterFile("ethermint/types/v1/indexer.proto", fileDescriptor_1197e10a8be8ed28) } + +var fileDescriptor_1197e10a8be8ed28 = []byte{ + // 312 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xc1, 0x4a, 0xf3, 0x40, + 0x14, 0x85, 0x33, 0x7f, 0xdb, 0x34, 0xff, 0xa0, 0x0b, 0xa3, 0x94, 0xa8, 0x10, 0x07, 0x57, 0x59, + 0x65, 0x28, 0x2e, 0x44, 0x97, 0x6e, 0xc4, 0xa5, 0xa1, 0x6e, 0xdc, 0x84, 0xb4, 0xb9, 0x4e, 0x06, + 0x32, 0x9d, 0x92, 0xb9, 0x09, 0xe9, 0x1b, 0xb8, 0xf4, 0x11, 0x7c, 0x1c, 0x97, 0x5d, 0xba, 0x94, + 0x16, 0xdf, 0x43, 0x3a, 0x0d, 0x15, 0xdc, 0xdd, 0xc3, 0xf7, 0x5d, 0x0e, 0x1c, 0xca, 0x00, 0x0b, + 0xa8, 0x94, 0x9c, 0x23, 0xc7, 0xe5, 0x02, 0x0c, 0x6f, 0xc6, 0x5c, 0xce, 0x73, 0x68, 0xa1, 0x8a, + 0x17, 0x95, 0x46, 0xed, 0xfb, 0x7b, 0x23, 0xb6, 0x46, 0xdc, 0x8c, 0xcf, 0x4e, 0x84, 0x16, 0xda, + 0x62, 0xbe, 0xbd, 0x76, 0xe6, 0xe5, 0x37, 0xa1, 0xde, 0xa4, 0x4d, 0xc0, 0xd4, 0x25, 0xfa, 0x23, + 0xea, 0x16, 0x20, 0x45, 0x81, 0x01, 0x61, 0x24, 0xea, 0x25, 0x5d, 0xf2, 0x4f, 0xa9, 0x87, 0x6d, + 0x6a, 0x2b, 0x82, 0x7f, 0x8c, 0x44, 0x87, 0xc9, 0x10, 0xdb, 0x87, 0x6d, 0xf4, 0xcf, 0xe9, 0x7f, + 0x65, 0x44, 0xc7, 0x7a, 0x96, 0x79, 0xca, 0x88, 0x1d, 0x64, 0xf4, 0x00, 0xb0, 0x48, 0xf7, 0xbf, + 0x7d, 0x46, 0xa2, 0x41, 0x42, 0x01, 0x8b, 0x49, 0xf7, 0x3e, 0xa2, 0xee, 0x4b, 0x26, 0x4b, 0xc8, + 0x83, 0x01, 0x23, 0x91, 0x97, 0x74, 0x69, 0xdb, 0x28, 0x32, 0x93, 0xd6, 0x06, 0xf2, 0xc0, 0x65, + 0x24, 0xea, 0x27, 0x43, 0x91, 0x99, 0x27, 0x03, 0xb9, 0x1f, 0xd3, 0xe3, 0x59, 0xad, 0xea, 0x32, + 0x43, 0xd9, 0x40, 0xba, 0xb7, 0x86, 0xd6, 0x3a, 0xfa, 0x45, 0xf7, 0x3b, 0xff, 0xb6, 0xff, 0xfa, + 0x7e, 0xe1, 0xdc, 0x3d, 0x7e, 0xac, 0x43, 0xb2, 0x5a, 0x87, 0xe4, 0x6b, 0x1d, 0x92, 0xb7, 0x4d, + 0xe8, 0xac, 0x36, 0xa1, 0xf3, 0xb9, 0x09, 0x9d, 0xe7, 0x6b, 0x21, 0xb1, 0xa8, 0xa7, 0xf1, 0x4c, + 0x2b, 0xde, 0x56, 0x8b, 0x12, 0x1a, 0xc5, 0xe7, 0x3a, 0x07, 0xde, 0xdc, 0x74, 0xf3, 0x96, 0x20, + 0xb2, 0xd9, 0x92, 0xff, 0x59, 0x7d, 0xea, 0xda, 0x05, 0xaf, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, + 0xb9, 0x87, 0xa4, 0xdb, 0x8f, 0x01, 0x00, 0x00, +} + +func (m *TxResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CumulativeGasUsed != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.CumulativeGasUsed)) + i-- + dAtA[i] = 0x38 + } + if m.GasUsed != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if m.Failed { + i-- + if m.Failed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.EthTxIndex != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.EthTxIndex)) + i-- + dAtA[i] = 0x20 + } + if m.MsgIndex != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.MsgIndex)) + i-- + dAtA[i] = 0x18 + } + if m.TxIndex != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x10 + } + if m.Height != 0 { + i = encodeVarintIndexer(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintIndexer(dAtA []byte, offset int, v uint64) int { + offset -= sovIndexer(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TxResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovIndexer(uint64(m.Height)) + } + if m.TxIndex != 0 { + n += 1 + sovIndexer(uint64(m.TxIndex)) + } + if m.MsgIndex != 0 { + n += 1 + sovIndexer(uint64(m.MsgIndex)) + } + if m.EthTxIndex != 0 { + n += 1 + sovIndexer(uint64(m.EthTxIndex)) + } + if m.Failed { + n += 2 + } + if m.GasUsed != 0 { + n += 1 + sovIndexer(uint64(m.GasUsed)) + } + if m.CumulativeGasUsed != 0 { + n += 1 + sovIndexer(uint64(m.CumulativeGasUsed)) + } + return n +} + +func sovIndexer(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozIndexer(x uint64) (n int) { + return sovIndexer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TxResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgIndex", wireType) + } + m.MsgIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MsgIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EthTxIndex", wireType) + } + m.EthTxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EthTxIndex |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Failed = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativeGasUsed", wireType) + } + m.CumulativeGasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndexer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CumulativeGasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIndexer(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthIndexer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIndexer(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndexer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndexer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndexer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthIndexer + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupIndexer + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthIndexer + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthIndexer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndexer = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupIndexer = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/ethermint/types/web3.pb.go b/types/legacy/ethermint/types/web3.pb.go new file mode 100644 index 0000000..0eade78 --- /dev/null +++ b/types/legacy/ethermint/types/web3.pb.go @@ -0,0 +1,400 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/types/v1/web3.proto + +package types + +import ( + fmt "fmt" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ExtensionOptionsWeb3Tx is an extension option that specifies the typed chain id, +// the fee payer as well as its signature data. +type ExtensionOptionsWeb3Tx struct { + // typed_data_chain_id is used only in EIP712 Domain and should match + // Ethereum network ID in a Web3 provider (e.g. Metamask). + TypedDataChainID uint64 `protobuf:"varint,1,opt,name=typed_data_chain_id,json=typedDataChainId,proto3" json:"typedDataChainID,omitempty"` + // fee_payer is an account address for the fee payer. It will be validated + // during EIP712 signature checking. + FeePayer string `protobuf:"bytes,2,opt,name=fee_payer,json=feePayer,proto3" json:"feePayer,omitempty"` + // fee_payer_sig is a signature data from the fee paying account, + // allows to perform fee delegation when using EIP712 Domain. + FeePayerSig []byte `protobuf:"bytes,3,opt,name=fee_payer_sig,json=feePayerSig,proto3" json:"feePayerSig,omitempty"` +} + +func (m *ExtensionOptionsWeb3Tx) Reset() { *m = ExtensionOptionsWeb3Tx{} } +func (m *ExtensionOptionsWeb3Tx) String() string { return proto.CompactTextString(m) } +func (*ExtensionOptionsWeb3Tx) ProtoMessage() {} +func (*ExtensionOptionsWeb3Tx) Descriptor() ([]byte, []int) { + return fileDescriptor_9eb7cd56e3c92bc3, []int{0} +} +func (m *ExtensionOptionsWeb3Tx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtensionOptionsWeb3Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtensionOptionsWeb3Tx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExtensionOptionsWeb3Tx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionOptionsWeb3Tx.Merge(m, src) +} +func (m *ExtensionOptionsWeb3Tx) XXX_Size() int { + return m.Size() +} +func (m *ExtensionOptionsWeb3Tx) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionOptionsWeb3Tx.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionOptionsWeb3Tx proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ExtensionOptionsWeb3Tx)(nil), "ethermint.types.v1.ExtensionOptionsWeb3Tx") +} + +func init() { proto.RegisterFile("ethermint/types/v1/web3.proto", fileDescriptor_9eb7cd56e3c92bc3) } + +var fileDescriptor_9eb7cd56e3c92bc3 = []byte{ + // 319 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x2d, 0xc9, 0x48, + 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, + 0x4f, 0x4d, 0x32, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x4b, 0xeb, 0x81, 0xa5, + 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xd2, 0xfa, 0x20, 0x16, 0x44, 0xa5, + 0xd2, 0x57, 0x46, 0x2e, 0x31, 0xd7, 0x8a, 0x92, 0xd4, 0xbc, 0xe2, 0xcc, 0xfc, 0x3c, 0xff, 0x82, + 0x92, 0xcc, 0xfc, 0xbc, 0xe2, 0xf0, 0xd4, 0x24, 0xe3, 0x90, 0x0a, 0xa1, 0x44, 0x2e, 0x61, 0x90, + 0xe6, 0x94, 0xf8, 0x94, 0xc4, 0x92, 0xc4, 0xf8, 0xe4, 0x8c, 0xc4, 0xcc, 0xbc, 0xf8, 0xcc, 0x14, + 0x09, 0x46, 0x05, 0x46, 0x0d, 0x16, 0x27, 0xa3, 0x47, 0xf7, 0xe4, 0x05, 0x42, 0x40, 0xd2, 0x2e, + 0x89, 0x25, 0x89, 0xce, 0x20, 0x49, 0x4f, 0x97, 0x57, 0xf7, 0xe4, 0xa5, 0x4a, 0xd0, 0xc4, 0x74, + 0xf2, 0x73, 0x33, 0x4b, 0x52, 0x73, 0x0b, 0x4a, 0x2a, 0x83, 0x04, 0xd0, 0xe4, 0x52, 0x84, 0x8c, + 0xb9, 0x38, 0xd3, 0x52, 0x53, 0xe3, 0x0b, 0x12, 0x2b, 0x53, 0x8b, 0x24, 0x98, 0x14, 0x18, 0x35, + 0x38, 0x9d, 0xc4, 0x5e, 0xdd, 0x93, 0x17, 0x4a, 0x4b, 0x4d, 0x0d, 0x00, 0x89, 0x21, 0x69, 0xe6, + 0x80, 0x89, 0x09, 0xd9, 0x72, 0xf1, 0xc2, 0x35, 0xc5, 0x17, 0x67, 0xa6, 0x4b, 0x30, 0x2b, 0x30, + 0x6a, 0xf0, 0x38, 0x49, 0xbe, 0xba, 0x27, 0x2f, 0x0a, 0x53, 0x14, 0x9c, 0x99, 0x8e, 0xa4, 0x97, + 0x1b, 0x49, 0xd8, 0x8a, 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x53, 0xe0, 0x89, 0x47, 0x72, 0x8c, 0x17, + 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, + 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x99, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, + 0xea, 0x57, 0x14, 0x15, 0xe4, 0xa4, 0x96, 0xe5, 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0xea, 0x97, 0x59, + 0x42, 0xc3, 0x3a, 0x27, 0x35, 0x3d, 0x31, 0xb9, 0x52, 0x1f, 0x2d, 0x0a, 0x92, 0xd8, 0xc0, 0x21, + 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x50, 0xaa, 0x98, 0x9c, 0x01, 0x00, 0x00, +} + +func (m *ExtensionOptionsWeb3Tx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtensionOptionsWeb3Tx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtensionOptionsWeb3Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeePayerSig) > 0 { + i -= len(m.FeePayerSig) + copy(dAtA[i:], m.FeePayerSig) + i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayerSig))) + i-- + dAtA[i] = 0x1a + } + if len(m.FeePayer) > 0 { + i -= len(m.FeePayer) + copy(dAtA[i:], m.FeePayer) + i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayer))) + i-- + dAtA[i] = 0x12 + } + if m.TypedDataChainID != 0 { + i = encodeVarintWeb3(dAtA, i, uint64(m.TypedDataChainID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintWeb3(dAtA []byte, offset int, v uint64) int { + offset -= sovWeb3(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExtensionOptionsWeb3Tx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TypedDataChainID != 0 { + n += 1 + sovWeb3(uint64(m.TypedDataChainID)) + } + l = len(m.FeePayer) + if l > 0 { + n += 1 + l + sovWeb3(uint64(l)) + } + l = len(m.FeePayerSig) + if l > 0 { + n += 1 + l + sovWeb3(uint64(l)) + } + return n +} + +func sovWeb3(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozWeb3(x uint64) (n int) { + return sovWeb3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExtensionOptionsWeb3Tx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TypedDataChainID", wireType) + } + m.TypedDataChainID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TypedDataChainID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWeb3 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWeb3 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeePayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeePayerSig", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWeb3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWeb3 + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWeb3 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeePayerSig = append(m.FeePayerSig[:0], dAtA[iNdEx:postIndex]...) + if m.FeePayerSig == nil { + m.FeePayerSig = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWeb3(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWeb3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWeb3(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWeb3 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWeb3 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWeb3 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthWeb3 + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupWeb3 + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthWeb3 + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthWeb3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWeb3 = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupWeb3 = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/evmos/erc20/erc20.pb.go b/types/legacy/evmos/erc20/erc20.pb.go new file mode 100644 index 0000000..a3e7201 --- /dev/null +++ b/types/legacy/evmos/erc20/erc20.pb.go @@ -0,0 +1,1660 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: evmos/erc20/v1/erc20.proto + +package erc20 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/x/bank/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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Owner enumerates the ownership of a ERC20 contract. +type Owner int32 + +const ( + // OWNER_UNSPECIFIED defines an invalid/undefined owner. + OWNER_UNSPECIFIED Owner = 0 + // OWNER_MODULE - erc20 is owned by the erc20 module account. + OWNER_MODULE Owner = 1 + // OWNER_EXTERNAL - erc20 is owned by an external account. + OWNER_EXTERNAL Owner = 2 +) + +var Owner_name = map[int32]string{ + 0: "OWNER_UNSPECIFIED", + 1: "OWNER_MODULE", + 2: "OWNER_EXTERNAL", +} + +var Owner_value = map[string]int32{ + "OWNER_UNSPECIFIED": 0, + "OWNER_MODULE": 1, + "OWNER_EXTERNAL": 2, +} + +func (x Owner) String() string { + return proto.EnumName(Owner_name, int32(x)) +} + +func (Owner) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_668d5dc537f45142, []int{0} +} + +// TokenPair defines an instance that records a pairing consisting of a native +// Cosmos Coin and an ERC20 token address. +type TokenPair struct { + // erc20_address is the hex address of ERC20 contract token + Erc20Address string `protobuf:"bytes,1,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"` + // denom defines the cosmos base denomination to be mapped to + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // enabled defines the token mapping enable status + Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` + // contract_owner is the an ENUM specifying the type of ERC20 owner (0 invalid, 1 ModuleAccount, 2 external address) + ContractOwner Owner `protobuf:"varint,4,opt,name=contract_owner,json=contractOwner,proto3,enum=evmos.erc20.v1.Owner" json:"contract_owner,omitempty"` + // owner_address is the address of the current owner of the token + // Only set if contract_owner is OWNER_MODULE + OwnerAddress string `protobuf:"bytes,5,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` +} + +func (m *TokenPair) Reset() { *m = TokenPair{} } +func (m *TokenPair) String() string { return proto.CompactTextString(m) } +func (*TokenPair) ProtoMessage() {} +func (*TokenPair) Descriptor() ([]byte, []int) { + return fileDescriptor_668d5dc537f45142, []int{0} +} +func (m *TokenPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenPair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TokenPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenPair.Merge(m, src) +} +func (m *TokenPair) XXX_Size() int { + return m.Size() +} +func (m *TokenPair) XXX_DiscardUnknown() { + xxx_messageInfo_TokenPair.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenPair proto.InternalMessageInfo + +func (m *TokenPair) GetErc20Address() string { + if m != nil { + return m.Erc20Address + } + return "" +} + +func (m *TokenPair) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *TokenPair) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +func (m *TokenPair) GetContractOwner() Owner { + if m != nil { + return m.ContractOwner + } + return OWNER_UNSPECIFIED +} + +func (m *TokenPair) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +// Deprecated: RegisterCoinProposal is a gov Content type to register a token pair for a +// native Cosmos coin. We're keeping it to remove the existing proposals from +// store. After that, remove this message. +// NOTE: Keep this message for backwards compatibility on proposals query +type RegisterCoinProposal struct { + // title of the proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // metadata slice of the native Cosmos coins + Metadata []types.Metadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata"` +} + +func (m *RegisterCoinProposal) Reset() { *m = RegisterCoinProposal{} } +func (m *RegisterCoinProposal) String() string { return proto.CompactTextString(m) } +func (*RegisterCoinProposal) ProtoMessage() {} +func (*RegisterCoinProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_668d5dc537f45142, []int{1} +} +func (m *RegisterCoinProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RegisterCoinProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RegisterCoinProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RegisterCoinProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisterCoinProposal.Merge(m, src) +} +func (m *RegisterCoinProposal) XXX_Size() int { + return m.Size() +} +func (m *RegisterCoinProposal) XXX_DiscardUnknown() { + xxx_messageInfo_RegisterCoinProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_RegisterCoinProposal proto.InternalMessageInfo + +func (m *RegisterCoinProposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *RegisterCoinProposal) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *RegisterCoinProposal) GetMetadata() []types.Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +// Deprecated: ProposalMetadata is used to parse a slice of denom metadata and generate +// the RegisterCoinProposal content. We're keeping it to remove the existing proposals from +// store. After that, remove this message. +type ProposalMetadata struct { + // metadata slice of the native Cosmos coins + Metadata []types.Metadata `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata"` +} + +func (m *ProposalMetadata) Reset() { *m = ProposalMetadata{} } +func (m *ProposalMetadata) String() string { return proto.CompactTextString(m) } +func (*ProposalMetadata) ProtoMessage() {} +func (*ProposalMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_668d5dc537f45142, []int{2} +} +func (m *ProposalMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProposalMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProposalMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProposalMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposalMetadata.Merge(m, src) +} +func (m *ProposalMetadata) XXX_Size() int { + return m.Size() +} +func (m *ProposalMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_ProposalMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_ProposalMetadata proto.InternalMessageInfo + +func (m *ProposalMetadata) GetMetadata() []types.Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +// Deprecated: RegisterERC20Proposal is a gov Content type to register a token pair for an +// ERC20 token. +// NOTE: Keep this message for backwards compatibility on proposals query +type RegisterERC20Proposal struct { + // title of the proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // erc20addresses is a slice of ERC20 token contract addresses + Erc20Addresses []string `protobuf:"bytes,3,rep,name=erc20addresses,proto3" json:"erc20addresses,omitempty"` +} + +func (m *RegisterERC20Proposal) Reset() { *m = RegisterERC20Proposal{} } +func (m *RegisterERC20Proposal) String() string { return proto.CompactTextString(m) } +func (*RegisterERC20Proposal) ProtoMessage() {} +func (*RegisterERC20Proposal) Descriptor() ([]byte, []int) { + return fileDescriptor_668d5dc537f45142, []int{3} +} +func (m *RegisterERC20Proposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RegisterERC20Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RegisterERC20Proposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RegisterERC20Proposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisterERC20Proposal.Merge(m, src) +} +func (m *RegisterERC20Proposal) XXX_Size() int { + return m.Size() +} +func (m *RegisterERC20Proposal) XXX_DiscardUnknown() { + xxx_messageInfo_RegisterERC20Proposal.DiscardUnknown(m) +} + +var xxx_messageInfo_RegisterERC20Proposal proto.InternalMessageInfo + +func (m *RegisterERC20Proposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *RegisterERC20Proposal) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *RegisterERC20Proposal) GetErc20Addresses() []string { + if m != nil { + return m.Erc20Addresses + } + return nil +} + +// Deprecated: ToggleTokenConversionProposal is a gov Content type to toggle the conversion +// of a token pair. +// NOTE: Keep this message for backwards compatibility on proposals query +type ToggleTokenConversionProposal struct { + // title of the proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *ToggleTokenConversionProposal) Reset() { *m = ToggleTokenConversionProposal{} } +func (m *ToggleTokenConversionProposal) String() string { return proto.CompactTextString(m) } +func (*ToggleTokenConversionProposal) ProtoMessage() {} +func (*ToggleTokenConversionProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_668d5dc537f45142, []int{4} +} +func (m *ToggleTokenConversionProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ToggleTokenConversionProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ToggleTokenConversionProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ToggleTokenConversionProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ToggleTokenConversionProposal.Merge(m, src) +} +func (m *ToggleTokenConversionProposal) XXX_Size() int { + return m.Size() +} +func (m *ToggleTokenConversionProposal) XXX_DiscardUnknown() { + xxx_messageInfo_ToggleTokenConversionProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_ToggleTokenConversionProposal proto.InternalMessageInfo + +func (m *ToggleTokenConversionProposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *ToggleTokenConversionProposal) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ToggleTokenConversionProposal) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func init() { + proto.RegisterEnum("evmos.erc20.v1.Owner", Owner_name, Owner_value) + proto.RegisterType((*TokenPair)(nil), "evmos.erc20.v1.TokenPair") + proto.RegisterType((*RegisterCoinProposal)(nil), "evmos.erc20.v1.RegisterCoinProposal") + proto.RegisterType((*ProposalMetadata)(nil), "evmos.erc20.v1.ProposalMetadata") + proto.RegisterType((*RegisterERC20Proposal)(nil), "evmos.erc20.v1.RegisterERC20Proposal") + proto.RegisterType((*ToggleTokenConversionProposal)(nil), "evmos.erc20.v1.ToggleTokenConversionProposal") +} + +func init() { proto.RegisterFile("evmos/erc20/v1/erc20.proto", fileDescriptor_668d5dc537f45142) } + +var fileDescriptor_668d5dc537f45142 = []byte{ + // 528 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x6a, 0xdb, 0x4c, + 0x14, 0xd5, 0xc4, 0xf6, 0xf7, 0xc5, 0x93, 0xc4, 0xb8, 0xc2, 0x06, 0x61, 0x88, 0x62, 0x5c, 0x28, + 0xa6, 0x0b, 0x29, 0x76, 0x56, 0x2d, 0x85, 0x92, 0x38, 0x2a, 0xa4, 0xc4, 0x3f, 0x28, 0x0e, 0x2d, + 0xdd, 0x98, 0xb1, 0x74, 0x51, 0x45, 0xe4, 0x19, 0x33, 0x33, 0x55, 0x9b, 0x45, 0xf7, 0x5d, 0x76, + 0xd3, 0x7d, 0xa1, 0x2f, 0x93, 0xee, 0xb2, 0xec, 0xaa, 0x14, 0x7b, 0xd3, 0xc7, 0x28, 0x9a, 0x91, + 0x42, 0xd2, 0x65, 0xb3, 0xbb, 0xe7, 0xdc, 0x1f, 0xce, 0xb9, 0x73, 0x07, 0xb7, 0x20, 0x5d, 0x30, + 0xe1, 0x02, 0x0f, 0xfa, 0xfb, 0x6e, 0xda, 0xd3, 0x81, 0xb3, 0xe4, 0x4c, 0x32, 0xb3, 0xa6, 0x72, + 0x8e, 0xa6, 0xd2, 0x5e, 0xcb, 0x0e, 0x98, 0xc8, 0x8a, 0xe7, 0x84, 0x5e, 0xb8, 0x69, 0x6f, 0x0e, + 0x92, 0xf4, 0x14, 0xd0, 0xf5, 0xad, 0x46, 0xc4, 0x22, 0xa6, 0x42, 0x37, 0x8b, 0x34, 0xdb, 0xf9, + 0x8e, 0x70, 0x75, 0xca, 0x2e, 0x80, 0x4e, 0x48, 0xcc, 0xcd, 0x87, 0x78, 0x47, 0xcd, 0x9b, 0x91, + 0x30, 0xe4, 0x20, 0x84, 0x85, 0xda, 0xa8, 0x5b, 0xf5, 0xb7, 0x15, 0x79, 0xa8, 0x39, 0xb3, 0x81, + 0x2b, 0x21, 0x50, 0xb6, 0xb0, 0x36, 0x54, 0x52, 0x03, 0xd3, 0xc2, 0xff, 0x03, 0x25, 0xf3, 0x04, + 0x42, 0xab, 0xd4, 0x46, 0xdd, 0x4d, 0xbf, 0x80, 0xe6, 0x33, 0x5c, 0x0b, 0x18, 0x95, 0x9c, 0x04, + 0x72, 0xc6, 0xde, 0x53, 0xe0, 0x56, 0xb9, 0x8d, 0xba, 0xb5, 0x7e, 0xd3, 0xb9, 0xeb, 0xc0, 0x19, + 0x67, 0x49, 0x7f, 0xa7, 0x28, 0x56, 0x30, 0x93, 0xa4, 0x9a, 0x6e, 0x24, 0x55, 0xb4, 0x24, 0x45, + 0xe6, 0x92, 0x9e, 0x96, 0x7f, 0x7f, 0xdd, 0x43, 0x9d, 0x2f, 0x08, 0x37, 0x7c, 0x88, 0x62, 0x21, + 0x81, 0x0f, 0x58, 0x4c, 0x27, 0x9c, 0x2d, 0x99, 0x20, 0x49, 0xa6, 0x58, 0xc6, 0x32, 0x81, 0xdc, + 0x8e, 0x06, 0x66, 0x1b, 0x6f, 0x85, 0x20, 0x02, 0x1e, 0x2f, 0x65, 0xcc, 0x68, 0xee, 0xe6, 0x36, + 0x65, 0x3e, 0xc7, 0x9b, 0x0b, 0x90, 0x24, 0x24, 0x92, 0x58, 0xa5, 0x76, 0xa9, 0xbb, 0xd5, 0xdf, + 0x75, 0xf4, 0x96, 0x1d, 0xb5, 0xd8, 0x7c, 0xcb, 0xce, 0x30, 0x2f, 0x3a, 0x2a, 0x5f, 0xfd, 0xdc, + 0x33, 0xfc, 0x9b, 0x26, 0xa5, 0xcb, 0xe8, 0x9c, 0xe1, 0x7a, 0x21, 0xa5, 0xa8, 0xbc, 0x33, 0x1a, + 0xfd, 0xc3, 0xe8, 0xce, 0x47, 0xdc, 0x2c, 0xbc, 0x7a, 0xfe, 0xa0, 0xbf, 0x7f, 0x6f, 0xb3, 0x8f, + 0x70, 0x4d, 0xbd, 0x44, 0xbe, 0x67, 0x10, 0xca, 0x72, 0xd5, 0xff, 0x8b, 0xcd, 0x3d, 0x09, 0xbc, + 0x3b, 0x65, 0x51, 0x94, 0x80, 0x3a, 0x9e, 0x01, 0xa3, 0x29, 0x70, 0x11, 0xb3, 0xfb, 0xef, 0x3c, + 0xeb, 0xcb, 0x46, 0xaa, 0x2b, 0xca, 0xfa, 0x32, 0xa0, 0x1f, 0xf8, 0xf1, 0x4b, 0x5c, 0xd1, 0x47, + 0xd1, 0xc4, 0x0f, 0xc6, 0xaf, 0x46, 0x9e, 0x3f, 0x3b, 0x1f, 0x9d, 0x4d, 0xbc, 0xc1, 0xc9, 0x8b, + 0x13, 0xef, 0xb8, 0x6e, 0x98, 0x75, 0xbc, 0xad, 0xe9, 0xe1, 0xf8, 0xf8, 0xfc, 0xd4, 0xab, 0x23, + 0xd3, 0xc4, 0x35, 0xcd, 0x78, 0xaf, 0xa7, 0x9e, 0x3f, 0x3a, 0x3c, 0xad, 0x6f, 0xb4, 0xca, 0x9f, + 0xbe, 0xd9, 0xc6, 0xd1, 0xf0, 0x6a, 0x65, 0xa3, 0xeb, 0x95, 0x8d, 0x7e, 0xad, 0x6c, 0xf4, 0x79, + 0x6d, 0x1b, 0xd7, 0x6b, 0xdb, 0xf8, 0xb1, 0xb6, 0x8d, 0x37, 0x07, 0x51, 0x2c, 0xdf, 0xbe, 0x9b, + 0x3b, 0x01, 0x5b, 0xb8, 0x1f, 0xf8, 0x32, 0x81, 0x74, 0xe1, 0x52, 0x16, 0x82, 0x9b, 0x3e, 0x71, + 0xe5, 0xe5, 0x12, 0x84, 0x9b, 0x40, 0x44, 0x82, 0x4b, 0xf7, 0xd6, 0xe7, 0x9c, 0xff, 0xa7, 0xbe, + 0xd3, 0xc1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x35, 0x07, 0x1f, 0xb2, 0x03, 0x00, 0x00, +} + +func (this *TokenPair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TokenPair) + if !ok { + that2, ok := that.(TokenPair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Erc20Address != that1.Erc20Address { + return false + } + if this.Denom != that1.Denom { + return false + } + if this.Enabled != that1.Enabled { + return false + } + if this.ContractOwner != that1.ContractOwner { + return false + } + if this.OwnerAddress != that1.OwnerAddress { + return false + } + return true +} +func (this *ToggleTokenConversionProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ToggleTokenConversionProposal) + if !ok { + that2, ok := that.(ToggleTokenConversionProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Token != that1.Token { + return false + } + return true +} +func (m *TokenPair) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TokenPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintErc20(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x2a + } + if m.ContractOwner != 0 { + i = encodeVarintErc20(dAtA, i, uint64(m.ContractOwner)) + i-- + dAtA[i] = 0x20 + } + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Erc20Address) > 0 { + i -= len(m.Erc20Address) + copy(dAtA[i:], m.Erc20Address) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Erc20Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RegisterCoinProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RegisterCoinProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegisterCoinProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintErc20(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ProposalMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProposalMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintErc20(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *RegisterERC20Proposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RegisterERC20Proposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegisterERC20Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Erc20Addresses) > 0 { + for iNdEx := len(m.Erc20Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Erc20Addresses[iNdEx]) + copy(dAtA[i:], m.Erc20Addresses[iNdEx]) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Erc20Addresses[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ToggleTokenConversionProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ToggleTokenConversionProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ToggleTokenConversionProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintErc20(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintErc20(dAtA []byte, offset int, v uint64) int { + offset -= sovErc20(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TokenPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Erc20Address) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + if m.Enabled { + n += 2 + } + if m.ContractOwner != 0 { + n += 1 + sovErc20(uint64(m.ContractOwner)) + } + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + return n +} + +func (m *RegisterCoinProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + if len(m.Metadata) > 0 { + for _, e := range m.Metadata { + l = e.Size() + n += 1 + l + sovErc20(uint64(l)) + } + } + return n +} + +func (m *ProposalMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Metadata) > 0 { + for _, e := range m.Metadata { + l = e.Size() + n += 1 + l + sovErc20(uint64(l)) + } + } + return n +} + +func (m *RegisterERC20Proposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + if len(m.Erc20Addresses) > 0 { + for _, s := range m.Erc20Addresses { + l = len(s) + n += 1 + l + sovErc20(uint64(l)) + } + } + return n +} + +func (m *ToggleTokenConversionProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + l = len(m.Token) + if l > 0 { + n += 1 + l + sovErc20(uint64(l)) + } + return n +} + +func sovErc20(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozErc20(x uint64) (n int) { + return sovErc20(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TokenPair) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TokenPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractOwner", wireType) + } + m.ContractOwner = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContractOwner |= Owner(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipErc20(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthErc20 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RegisterCoinProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisterCoinProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterCoinProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata, types.Metadata{}) + if err := m.Metadata[len(m.Metadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipErc20(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthErc20 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProposalMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProposalMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposalMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata, types.Metadata{}) + if err := m.Metadata[len(m.Metadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipErc20(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthErc20 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RegisterERC20Proposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisterERC20Proposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterERC20Proposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20Addresses = append(m.Erc20Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipErc20(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthErc20 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ToggleTokenConversionProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ToggleTokenConversionProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ToggleTokenConversionProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErc20 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthErc20 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthErc20 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipErc20(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthErc20 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipErc20(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowErc20 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowErc20 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowErc20 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthErc20 + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupErc20 + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthErc20 + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthErc20 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowErc20 = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupErc20 = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/evmos/erc20/events.pb.go b/types/legacy/evmos/erc20/events.pb.go new file mode 100644 index 0000000..d09a8a9 --- /dev/null +++ b/types/legacy/evmos/erc20/events.pb.go @@ -0,0 +1,1363 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: evmos/erc20/v1/events.proto + +package erc20 + +import ( + fmt "fmt" + 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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventRegisterPair is an event emitted when a coin is registered. +type EventRegisterPair struct { + // denom is the coin's denomination. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // erc20_address is the ERC20 contract address. + Erc20Address string `protobuf:"bytes,2,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"` +} + +func (m *EventRegisterPair) Reset() { *m = EventRegisterPair{} } +func (m *EventRegisterPair) String() string { return proto.CompactTextString(m) } +func (*EventRegisterPair) ProtoMessage() {} +func (*EventRegisterPair) Descriptor() ([]byte, []int) { + return fileDescriptor_b8091384ab031e64, []int{0} +} +func (m *EventRegisterPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRegisterPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRegisterPair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventRegisterPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRegisterPair.Merge(m, src) +} +func (m *EventRegisterPair) XXX_Size() int { + return m.Size() +} +func (m *EventRegisterPair) XXX_DiscardUnknown() { + xxx_messageInfo_EventRegisterPair.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRegisterPair proto.InternalMessageInfo + +func (m *EventRegisterPair) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *EventRegisterPair) GetErc20Address() string { + if m != nil { + return m.Erc20Address + } + return "" +} + +// EventToggleTokenConversion is an event emitted when a coin's token conversion is toggled. +type EventToggleTokenConversion struct { + // denom is the coin's denomination. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // erc20_address is the ERC20 contract address. + Erc20Address string `protobuf:"bytes,2,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"` +} + +func (m *EventToggleTokenConversion) Reset() { *m = EventToggleTokenConversion{} } +func (m *EventToggleTokenConversion) String() string { return proto.CompactTextString(m) } +func (*EventToggleTokenConversion) ProtoMessage() {} +func (*EventToggleTokenConversion) Descriptor() ([]byte, []int) { + return fileDescriptor_b8091384ab031e64, []int{1} +} +func (m *EventToggleTokenConversion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventToggleTokenConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventToggleTokenConversion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventToggleTokenConversion) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventToggleTokenConversion.Merge(m, src) +} +func (m *EventToggleTokenConversion) XXX_Size() int { + return m.Size() +} +func (m *EventToggleTokenConversion) XXX_DiscardUnknown() { + xxx_messageInfo_EventToggleTokenConversion.DiscardUnknown(m) +} + +var xxx_messageInfo_EventToggleTokenConversion proto.InternalMessageInfo + +func (m *EventToggleTokenConversion) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *EventToggleTokenConversion) GetErc20Address() string { + if m != nil { + return m.Erc20Address + } + return "" +} + +// EventConvertCoin is an event emitted when a coin is converted. +type EventConvertCoin struct { + // sender is the sender's address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // receiver is the receiver's address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // amount is the amount of coins to be converted. + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // denom is the coin's denomination. + Denom string `protobuf:"bytes,4,opt,name=denom,proto3" json:"denom,omitempty"` + // erc20_address is the ERC20 contract address. + Erc20Address string `protobuf:"bytes,5,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"` +} + +func (m *EventConvertCoin) Reset() { *m = EventConvertCoin{} } +func (m *EventConvertCoin) String() string { return proto.CompactTextString(m) } +func (*EventConvertCoin) ProtoMessage() {} +func (*EventConvertCoin) Descriptor() ([]byte, []int) { + return fileDescriptor_b8091384ab031e64, []int{2} +} +func (m *EventConvertCoin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConvertCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConvertCoin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventConvertCoin) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConvertCoin.Merge(m, src) +} +func (m *EventConvertCoin) XXX_Size() int { + return m.Size() +} +func (m *EventConvertCoin) XXX_DiscardUnknown() { + xxx_messageInfo_EventConvertCoin.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConvertCoin proto.InternalMessageInfo + +func (m *EventConvertCoin) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventConvertCoin) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *EventConvertCoin) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func (m *EventConvertCoin) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *EventConvertCoin) GetErc20Address() string { + if m != nil { + return m.Erc20Address + } + return "" +} + +// EventConvertERC20 is an event emitted when an ERC20 is converted. +type EventConvertERC20 struct { + // sender is the sender's address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // receiver is the receiver's address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // amount is the amount of coins to be converted. + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // denom is the coin's denomination. + Denom string `protobuf:"bytes,4,opt,name=denom,proto3" json:"denom,omitempty"` + // contract_address of an ERC20 token contract, that is registered in a token pair + ContractAddress string `protobuf:"bytes,5,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *EventConvertERC20) Reset() { *m = EventConvertERC20{} } +func (m *EventConvertERC20) String() string { return proto.CompactTextString(m) } +func (*EventConvertERC20) ProtoMessage() {} +func (*EventConvertERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_b8091384ab031e64, []int{3} +} +func (m *EventConvertERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConvertERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConvertERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventConvertERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConvertERC20.Merge(m, src) +} +func (m *EventConvertERC20) XXX_Size() int { + return m.Size() +} +func (m *EventConvertERC20) XXX_DiscardUnknown() { + xxx_messageInfo_EventConvertERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConvertERC20 proto.InternalMessageInfo + +func (m *EventConvertERC20) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventConvertERC20) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *EventConvertERC20) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func (m *EventConvertERC20) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *EventConvertERC20) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func init() { + proto.RegisterType((*EventRegisterPair)(nil), "evmos.erc20.v1.EventRegisterPair") + proto.RegisterType((*EventToggleTokenConversion)(nil), "evmos.erc20.v1.EventToggleTokenConversion") + proto.RegisterType((*EventConvertCoin)(nil), "evmos.erc20.v1.EventConvertCoin") + proto.RegisterType((*EventConvertERC20)(nil), "evmos.erc20.v1.EventConvertERC20") +} + +func init() { proto.RegisterFile("evmos/erc20/v1/events.proto", fileDescriptor_b8091384ab031e64) } + +var fileDescriptor_b8091384ab031e64 = []byte{ + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x92, 0x3d, 0x4b, 0x73, 0x31, + 0x18, 0x86, 0x9b, 0xf7, 0xb5, 0x45, 0x83, 0x1f, 0xf5, 0x20, 0x52, 0x2a, 0x04, 0xa9, 0x8b, 0x2e, + 0x27, 0xfd, 0x98, 0x1c, 0xb5, 0x74, 0x54, 0xa4, 0x14, 0x04, 0x17, 0x39, 0xcd, 0x79, 0x38, 0x06, + 0x7b, 0xf2, 0x94, 0x24, 0x0d, 0xf6, 0x5f, 0xb8, 0xba, 0xf9, 0x73, 0x1c, 0x3b, 0x3a, 0x4a, 0xfb, + 0x47, 0xa4, 0x39, 0xf1, 0x03, 0x11, 0x17, 0xc1, 0xf1, 0x7e, 0x6e, 0xee, 0x8b, 0x8b, 0x10, 0xba, + 0x07, 0x2e, 0x47, 0xc3, 0x41, 0x8b, 0x76, 0x93, 0xbb, 0x16, 0x07, 0x07, 0xca, 0x9a, 0x78, 0xac, + 0xd1, 0x62, 0xb4, 0xe9, 0xcb, 0xd8, 0x97, 0xb1, 0x6b, 0x35, 0xce, 0xe9, 0x76, 0x6f, 0xd9, 0xf7, + 0x21, 0x93, 0xc6, 0x82, 0xbe, 0x48, 0xa4, 0x8e, 0x76, 0x68, 0x39, 0x05, 0x85, 0x79, 0x8d, 0xec, + 0x93, 0xc3, 0xb5, 0x7e, 0x11, 0xa2, 0x03, 0xba, 0xe1, 0x67, 0xd7, 0x49, 0x9a, 0x6a, 0x30, 0xa6, + 0xf6, 0xcf, 0xb7, 0xeb, 0xfe, 0x78, 0x52, 0xdc, 0x1a, 0x97, 0xb4, 0xee, 0x79, 0x03, 0xcc, 0xb2, + 0x11, 0x0c, 0xf0, 0x16, 0x54, 0x17, 0x95, 0x03, 0x6d, 0x24, 0xaa, 0xdf, 0x80, 0x1f, 0x08, 0xad, + 0x7a, 0x72, 0x81, 0xb3, 0x5d, 0x94, 0x2a, 0xda, 0xa5, 0x15, 0x03, 0x2a, 0x05, 0x1d, 0x80, 0x21, + 0x45, 0x75, 0xba, 0xaa, 0x41, 0x80, 0x74, 0xa0, 0x03, 0xec, 0x3d, 0x2f, 0x37, 0x49, 0x8e, 0x13, + 0x65, 0x6b, 0xff, 0x8b, 0x4d, 0x91, 0x3e, 0xdc, 0x56, 0x7e, 0x74, 0x2b, 0x7f, 0xe3, 0xf6, 0x48, + 0xc2, 0x2b, 0x06, 0xb7, 0x5e, 0xbf, 0xdb, 0x6e, 0xfe, 0x81, 0xdc, 0x11, 0xad, 0x0a, 0x54, 0x56, + 0x27, 0xc2, 0x7e, 0xf1, 0xdb, 0x7a, 0xbb, 0x07, 0xc5, 0xd3, 0xb3, 0xa7, 0x39, 0x23, 0xb3, 0x39, + 0x23, 0x2f, 0x73, 0x46, 0xee, 0x17, 0xac, 0x34, 0x5b, 0xb0, 0xd2, 0xf3, 0x82, 0x95, 0xae, 0x3a, + 0x99, 0xb4, 0x37, 0x93, 0x61, 0x2c, 0x30, 0xe7, 0x77, 0x7a, 0x3c, 0x02, 0x97, 0x73, 0x85, 0x29, + 0x70, 0x77, 0xcc, 0xed, 0x74, 0x0c, 0x86, 0x8f, 0x20, 0x4b, 0xc4, 0x94, 0x7f, 0xfa, 0x56, 0xc3, + 0x8a, 0xff, 0x4d, 0x9d, 0xd7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0xba, 0x50, 0x0c, 0x6c, 0x02, + 0x00, 0x00, +} + +func (m *EventRegisterPair) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventRegisterPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRegisterPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Erc20Address) > 0 { + i -= len(m.Erc20Address) + copy(dAtA[i:], m.Erc20Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Erc20Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventToggleTokenConversion) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventToggleTokenConversion) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventToggleTokenConversion) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Erc20Address) > 0 { + i -= len(m.Erc20Address) + copy(dAtA[i:], m.Erc20Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Erc20Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventConvertCoin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventConvertCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConvertCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Erc20Address) > 0 { + i -= len(m.Erc20Address) + copy(dAtA[i:], m.Erc20Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Erc20Address))) + i-- + dAtA[i] = 0x2a + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x22 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x1a + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventConvertERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventConvertERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConvertERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x22 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x1a + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventRegisterPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Erc20Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventToggleTokenConversion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Erc20Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventConvertCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Erc20Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventConvertERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventRegisterPair) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventRegisterPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRegisterPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventToggleTokenConversion) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventToggleTokenConversion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventToggleTokenConversion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventConvertCoin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventConvertCoin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConvertCoin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventConvertERC20) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventConvertERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConvertERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/evmos/erc20/genesis.pb.go b/types/legacy/evmos/erc20/genesis.pb.go new file mode 100644 index 0000000..090c73a --- /dev/null +++ b/types/legacy/evmos/erc20/genesis.pb.go @@ -0,0 +1,671 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: evmos/erc20/v1/genesis.proto + +package erc20 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the module's genesis state. +type GenesisState struct { + // params are the erc20 module parameters at genesis + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // token_pairs is a slice of the registered token pairs at genesis + TokenPairs []TokenPair `protobuf:"bytes,2,rep,name=token_pairs,json=tokenPairs,proto3" json:"token_pairs"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_2f4674601b0d6987, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetTokenPairs() []TokenPair { + if m != nil { + return m.TokenPairs + } + return nil +} + +// Params defines the erc20 module params +type Params struct { + // enable_erc20 is the parameter to enable the conversion of Cosmos coins <--> ERC20 tokens. + EnableErc20 bool `protobuf:"varint,1,opt,name=enable_erc20,json=enableErc20,proto3" json:"enable_erc20,omitempty"` + // native_precompiles defines the slice of hex addresses of the + // active precompiles that are used to interact with native staking coins as ERC20s + NativePrecompiles []string `protobuf:"bytes,3,rep,name=native_precompiles,json=nativePrecompiles,proto3" json:"native_precompiles,omitempty"` + // dynamic_precompiles defines the slice of hex addresses of the + // active precompiles that are used to interact with Bank coins as ERC20s + DynamicPrecompiles []string `protobuf:"bytes,4,rep,name=dynamic_precompiles,json=dynamicPrecompiles,proto3" json:"dynamic_precompiles,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_2f4674601b0d6987, []int{1} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetEnableErc20() bool { + if m != nil { + return m.EnableErc20 + } + return false +} + +func (m *Params) GetNativePrecompiles() []string { + if m != nil { + return m.NativePrecompiles + } + return nil +} + +func (m *Params) GetDynamicPrecompiles() []string { + if m != nil { + return m.DynamicPrecompiles + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "evmos.erc20.v1.GenesisState") + proto.RegisterType((*Params)(nil), "evmos.erc20.v1.Params") +} + +func init() { proto.RegisterFile("evmos/erc20/v1/genesis.proto", fileDescriptor_2f4674601b0d6987) } + +var fileDescriptor_2f4674601b0d6987 = []byte{ + // 347 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xc1, 0x4a, 0x02, 0x41, + 0x1c, 0xc6, 0x77, 0x5c, 0x11, 0x9d, 0x95, 0xc8, 0x29, 0xc2, 0x24, 0x36, 0xf3, 0x24, 0x41, 0x3b, + 0xa9, 0x27, 0xaf, 0x82, 0x04, 0x41, 0x20, 0xd6, 0xa9, 0x8b, 0x8c, 0xeb, 0x9f, 0x6d, 0x68, 0x77, + 0x67, 0xd9, 0x99, 0x96, 0x7c, 0x0b, 0x7b, 0x8b, 0x8e, 0x3d, 0x86, 0x47, 0x8f, 0x9d, 0x22, 0xf4, + 0xd0, 0x6b, 0x84, 0x33, 0x46, 0xea, 0x65, 0xf8, 0xf3, 0xfd, 0xbe, 0xef, 0xff, 0x0d, 0x33, 0xf8, + 0x0c, 0xb2, 0x48, 0x48, 0x0a, 0xa9, 0xdf, 0xbe, 0xa6, 0x59, 0x8b, 0x06, 0x10, 0x83, 0xe4, 0xd2, + 0x4b, 0x52, 0xa1, 0x04, 0x39, 0xd0, 0xd4, 0xd3, 0xd4, 0xcb, 0x5a, 0xb5, 0x0a, 0x8b, 0x78, 0x2c, + 0xa8, 0x3e, 0x8d, 0xa5, 0x56, 0xdb, 0x5b, 0x60, 0xbc, 0x86, 0x1d, 0x07, 0x22, 0x10, 0x7a, 0xa4, + 0xeb, 0xc9, 0xa8, 0x8d, 0x19, 0xc2, 0xe5, 0x1b, 0x53, 0x73, 0xaf, 0x98, 0x02, 0xd2, 0xc5, 0x85, + 0x84, 0xa5, 0x2c, 0x92, 0x55, 0x54, 0x47, 0x4d, 0xa7, 0x7d, 0xe2, 0xed, 0xd6, 0x7a, 0x03, 0x4d, + 0x7b, 0xa5, 0xf9, 0xd7, 0xb9, 0xf5, 0xfe, 0xf3, 0x71, 0x89, 0x86, 0x9b, 0x00, 0xe9, 0x63, 0x47, + 0x89, 0x67, 0x88, 0x47, 0x09, 0xe3, 0xa9, 0xac, 0xe6, 0xea, 0x76, 0xd3, 0x69, 0x9f, 0xee, 0xe7, + 0x1f, 0xd6, 0x96, 0x01, 0xe3, 0xe9, 0xf6, 0x0a, 0xac, 0xfe, 0x54, 0xd9, 0x78, 0x43, 0xb8, 0x60, + 0x4a, 0xc8, 0x05, 0x2e, 0x43, 0xcc, 0xc6, 0x21, 0x8c, 0x74, 0x5c, 0x5f, 0xa9, 0x38, 0x74, 0x8c, + 0xd6, 0x5f, 0x4b, 0xe4, 0x0a, 0x93, 0x98, 0x29, 0x9e, 0xc1, 0x28, 0x49, 0xc1, 0x17, 0x51, 0xc2, + 0x43, 0x90, 0x55, 0xbb, 0x6e, 0x37, 0x4b, 0xc3, 0x8a, 0x21, 0x83, 0x7f, 0x40, 0x28, 0x3e, 0x9a, + 0x4c, 0x63, 0x16, 0x71, 0x7f, 0xc7, 0x9f, 0xd7, 0x7e, 0xb2, 0x41, 0x5b, 0x81, 0xdb, 0x7c, 0x31, + 0x77, 0x68, 0xf7, 0xee, 0xe6, 0x4b, 0x17, 0x2d, 0x96, 0x2e, 0xfa, 0x5e, 0xba, 0x68, 0xb6, 0x72, + 0xad, 0xc5, 0xca, 0xb5, 0x3e, 0x57, 0xae, 0xf5, 0xd8, 0x09, 0xb8, 0x7a, 0x7a, 0x19, 0x7b, 0xbe, + 0x88, 0xe8, 0x6b, 0x9a, 0x84, 0x90, 0x45, 0x34, 0x16, 0x13, 0xa0, 0x59, 0x97, 0xaa, 0x69, 0x02, + 0x92, 0x86, 0x10, 0x30, 0x7f, 0x4a, 0xb7, 0xbe, 0x66, 0x5c, 0xd0, 0x8f, 0xdf, 0xf9, 0x0d, 0x00, + 0x00, 0xff, 0xff, 0xde, 0x9c, 0x0f, 0x55, 0xf1, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenPairs) > 0 { + for iNdEx := len(m.TokenPairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenPairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DynamicPrecompiles) > 0 { + for iNdEx := len(m.DynamicPrecompiles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DynamicPrecompiles[iNdEx]) + copy(dAtA[i:], m.DynamicPrecompiles[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.DynamicPrecompiles[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.NativePrecompiles) > 0 { + for iNdEx := len(m.NativePrecompiles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NativePrecompiles[iNdEx]) + copy(dAtA[i:], m.NativePrecompiles[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.NativePrecompiles[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.EnableErc20 { + i-- + if m.EnableErc20 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.TokenPairs) > 0 { + for _, e := range m.TokenPairs { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EnableErc20 { + n += 2 + } + if len(m.NativePrecompiles) > 0 { + for _, s := range m.NativePrecompiles { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.DynamicPrecompiles) > 0 { + for _, s := range m.DynamicPrecompiles { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenPairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenPairs = append(m.TokenPairs, TokenPair{}) + if err := m.TokenPairs[len(m.TokenPairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableErc20", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableErc20 = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NativePrecompiles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NativePrecompiles = append(m.NativePrecompiles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DynamicPrecompiles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DynamicPrecompiles = append(m.DynamicPrecompiles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/evmos/erc20/query.pb.go b/types/legacy/evmos/erc20/query.pb.go new file mode 100644 index 0000000..c905e22 --- /dev/null +++ b/types/legacy/evmos/erc20/query.pb.go @@ -0,0 +1,1788 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: evmos/erc20/v1/query.proto + +package erc20 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryTokenPairsRequest is the request type for the Query/TokenPairs RPC +// method. +type QueryTokenPairsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTokenPairsRequest) Reset() { *m = QueryTokenPairsRequest{} } +func (m *QueryTokenPairsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPairsRequest) ProtoMessage() {} +func (*QueryTokenPairsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{0} +} +func (m *QueryTokenPairsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPairsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTokenPairsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPairsRequest.Merge(m, src) +} +func (m *QueryTokenPairsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPairsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPairsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPairsRequest proto.InternalMessageInfo + +func (m *QueryTokenPairsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryTokenPairsResponse is the response type for the Query/TokenPairs RPC +// method. +type QueryTokenPairsResponse struct { + // token_pairs is a slice of registered token pairs for the erc20 module + TokenPairs []TokenPair `protobuf:"bytes,1,rep,name=token_pairs,json=tokenPairs,proto3" json:"token_pairs"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTokenPairsResponse) Reset() { *m = QueryTokenPairsResponse{} } +func (m *QueryTokenPairsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPairsResponse) ProtoMessage() {} +func (*QueryTokenPairsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{1} +} +func (m *QueryTokenPairsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPairsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTokenPairsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPairsResponse.Merge(m, src) +} +func (m *QueryTokenPairsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPairsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPairsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPairsResponse proto.InternalMessageInfo + +func (m *QueryTokenPairsResponse) GetTokenPairs() []TokenPair { + if m != nil { + return m.TokenPairs + } + return nil +} + +func (m *QueryTokenPairsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryTokenPairRequest is the request type for the Query/TokenPair RPC method. +type QueryTokenPairRequest struct { + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *QueryTokenPairRequest) Reset() { *m = QueryTokenPairRequest{} } +func (m *QueryTokenPairRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPairRequest) ProtoMessage() {} +func (*QueryTokenPairRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{2} +} +func (m *QueryTokenPairRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPairRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTokenPairRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPairRequest.Merge(m, src) +} +func (m *QueryTokenPairRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPairRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPairRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPairRequest proto.InternalMessageInfo + +func (m *QueryTokenPairRequest) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +// QueryTokenPairResponse is the response type for the Query/TokenPair RPC +// method. +type QueryTokenPairResponse struct { + // token_pairs returns the info about a registered token pair for the erc20 module + TokenPair TokenPair `protobuf:"bytes,1,opt,name=token_pair,json=tokenPair,proto3" json:"token_pair"` +} + +func (m *QueryTokenPairResponse) Reset() { *m = QueryTokenPairResponse{} } +func (m *QueryTokenPairResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPairResponse) ProtoMessage() {} +func (*QueryTokenPairResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{3} +} +func (m *QueryTokenPairResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPairResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTokenPairResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPairResponse.Merge(m, src) +} +func (m *QueryTokenPairResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPairResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPairResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPairResponse proto.InternalMessageInfo + +func (m *QueryTokenPairResponse) GetTokenPair() TokenPair { + if m != nil { + return m.TokenPair + } + return TokenPair{} +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{4} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC +// method. +type QueryParamsResponse struct { + // params are the erc20 module parameters + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{5} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryOwnerAddressRequest struct { + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *QueryOwnerAddressRequest) Reset() { *m = QueryOwnerAddressRequest{} } +func (m *QueryOwnerAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOwnerAddressRequest) ProtoMessage() {} +func (*QueryOwnerAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{6} +} +func (m *QueryOwnerAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOwnerAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOwnerAddressRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryOwnerAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOwnerAddressRequest.Merge(m, src) +} +func (m *QueryOwnerAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOwnerAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOwnerAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOwnerAddressRequest proto.InternalMessageInfo + +func (m *QueryOwnerAddressRequest) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +type QueryOwnerAddressResponse struct { + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` +} + +func (m *QueryOwnerAddressResponse) Reset() { *m = QueryOwnerAddressResponse{} } +func (m *QueryOwnerAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOwnerAddressResponse) ProtoMessage() {} +func (*QueryOwnerAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fba814bce17cabdf, []int{7} +} +func (m *QueryOwnerAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOwnerAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOwnerAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryOwnerAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOwnerAddressResponse.Merge(m, src) +} +func (m *QueryOwnerAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOwnerAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOwnerAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOwnerAddressResponse proto.InternalMessageInfo + +func (m *QueryOwnerAddressResponse) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func init() { + proto.RegisterType((*QueryTokenPairsRequest)(nil), "evmos.erc20.v1.QueryTokenPairsRequest") + proto.RegisterType((*QueryTokenPairsResponse)(nil), "evmos.erc20.v1.QueryTokenPairsResponse") + proto.RegisterType((*QueryTokenPairRequest)(nil), "evmos.erc20.v1.QueryTokenPairRequest") + proto.RegisterType((*QueryTokenPairResponse)(nil), "evmos.erc20.v1.QueryTokenPairResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "evmos.erc20.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "evmos.erc20.v1.QueryParamsResponse") + proto.RegisterType((*QueryOwnerAddressRequest)(nil), "evmos.erc20.v1.QueryOwnerAddressRequest") + proto.RegisterType((*QueryOwnerAddressResponse)(nil), "evmos.erc20.v1.QueryOwnerAddressResponse") +} + +func init() { proto.RegisterFile("evmos/erc20/v1/query.proto", fileDescriptor_fba814bce17cabdf) } + +var fileDescriptor_fba814bce17cabdf = []byte{ + // 623 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, + 0x14, 0x8f, 0xfb, 0xfd, 0xb6, 0x52, 0x5e, 0xca, 0xaf, 0x23, 0x84, 0xd4, 0x80, 0xa9, 0x1c, 0x35, + 0x4d, 0x8b, 0xf0, 0x35, 0xe9, 0x42, 0x37, 0x28, 0x2a, 0x4c, 0x88, 0x10, 0x31, 0x21, 0xa1, 0x72, + 0x71, 0x4e, 0xc6, 0x22, 0xf1, 0x39, 0xb6, 0x63, 0x88, 0xaa, 0x2e, 0x5d, 0x58, 0x91, 0x98, 0xd9, + 0xe9, 0xc6, 0x9f, 0xd1, 0xb1, 0x12, 0x0b, 0x13, 0x42, 0x09, 0x12, 0xff, 0x06, 0xf2, 0xdd, 0xc5, + 0xb1, 0x4d, 0x94, 0x74, 0x89, 0xee, 0xde, 0x7b, 0x9f, 0x1f, 0xef, 0xdd, 0x8b, 0x41, 0xa5, 0x61, + 0x8f, 0xf9, 0x98, 0x7a, 0x66, 0x63, 0x07, 0x87, 0x75, 0xdc, 0x1f, 0x50, 0x6f, 0x68, 0xb8, 0x1e, + 0x0b, 0x18, 0xba, 0xcc, 0x73, 0x06, 0xcf, 0x19, 0x61, 0x5d, 0xbd, 0x46, 0x7a, 0xb6, 0xc3, 0x30, + 0xff, 0x15, 0x25, 0xea, 0xb6, 0xc9, 0xfc, 0x08, 0xdf, 0x26, 0x3e, 0x15, 0x58, 0x1c, 0xd6, 0xdb, + 0x34, 0x20, 0x75, 0xec, 0x12, 0xcb, 0x76, 0x48, 0x60, 0x33, 0x47, 0xd6, 0x66, 0xa5, 0x04, 0xaf, + 0xc8, 0xdd, 0xce, 0xe4, 0x2c, 0xea, 0x50, 0xdf, 0xf6, 0x65, 0xb6, 0x68, 0x31, 0x8b, 0xf1, 0x23, + 0x8e, 0x4e, 0x13, 0x8c, 0xc5, 0x98, 0xd5, 0xa5, 0x98, 0xb8, 0x36, 0x26, 0x8e, 0xc3, 0x02, 0x2e, + 0x26, 0x31, 0xfa, 0x1b, 0x28, 0xbd, 0x88, 0xfc, 0xbc, 0x64, 0xef, 0xa8, 0xd3, 0x24, 0xb6, 0xe7, + 0xb7, 0x68, 0x7f, 0x40, 0xfd, 0x00, 0x3d, 0x01, 0x98, 0x7a, 0x2b, 0x2b, 0xeb, 0x4a, 0xad, 0xd0, + 0xa8, 0x1a, 0xa2, 0x11, 0x23, 0x6a, 0xc4, 0x10, 0x43, 0x90, 0x8d, 0x18, 0x4d, 0x62, 0x51, 0x89, + 0x6d, 0x25, 0x90, 0xfa, 0xa9, 0x02, 0x37, 0xff, 0x91, 0xf0, 0x5d, 0xe6, 0xf8, 0x14, 0x1d, 0x40, + 0x21, 0x88, 0xa2, 0x87, 0x6e, 0x14, 0x2e, 0x2b, 0xeb, 0xff, 0xd5, 0x0a, 0x8d, 0x35, 0x23, 0x3d, + 0x50, 0x23, 0x06, 0xee, 0xe7, 0xcf, 0x7e, 0xde, 0xcd, 0x7d, 0xfd, 0xf3, 0x6d, 0x5b, 0x69, 0x41, + 0x10, 0xd3, 0xa1, 0xa7, 0x29, 0xab, 0x4b, 0xdc, 0xea, 0xe6, 0x42, 0xab, 0xc2, 0x43, 0xca, 0xeb, + 0x7d, 0xb8, 0x91, 0xb6, 0x3a, 0x19, 0x46, 0x11, 0x96, 0xb9, 0x1e, 0x9f, 0x43, 0xbe, 0x25, 0x2e, + 0xfa, 0xeb, 0xec, 0xf0, 0xe2, 0xc6, 0x1e, 0x03, 0x4c, 0x1b, 0x93, 0xc3, 0xbb, 0x58, 0x5f, 0xf9, + 0xb8, 0x2f, 0xbd, 0x08, 0x88, 0xd3, 0x37, 0x89, 0x47, 0x7a, 0x93, 0x77, 0xd1, 0x9b, 0x70, 0x3d, + 0x15, 0x95, 0x8a, 0x7b, 0xb0, 0xe2, 0xf2, 0x88, 0x54, 0x2b, 0x65, 0xd5, 0x44, 0x7d, 0x52, 0x4a, + 0x02, 0xf4, 0x03, 0x28, 0x73, 0xc6, 0xe7, 0xef, 0x1d, 0xea, 0x3d, 0xea, 0x74, 0x3c, 0xea, 0xc7, + 0x5b, 0xb0, 0x05, 0x57, 0x4d, 0xe6, 0x04, 0x1e, 0x31, 0x83, 0x43, 0x22, 0x52, 0x72, 0x06, 0x57, + 0x26, 0x71, 0x89, 0xd0, 0x1f, 0xc2, 0xda, 0x0c, 0x1a, 0x69, 0xaf, 0x02, 0x97, 0x58, 0x14, 0xcf, + 0x90, 0xac, 0xb2, 0x44, 0x71, 0xe3, 0xf4, 0x7f, 0x58, 0xe6, 0x14, 0xe8, 0x44, 0x01, 0x98, 0xee, + 0x0b, 0xaa, 0x66, 0x9b, 0x99, 0xbd, 0xb3, 0xea, 0xe6, 0xc2, 0x3a, 0x61, 0x47, 0xaf, 0x9c, 0x7c, + 0xff, 0xfd, 0x79, 0xe9, 0x0e, 0xba, 0x85, 0x33, 0xff, 0xa8, 0xc4, 0x3a, 0xa2, 0x8f, 0x0a, 0xe4, + 0x63, 0x2c, 0xda, 0x98, 0xcf, 0x3d, 0xb1, 0x50, 0x5d, 0x54, 0x26, 0x1d, 0xdc, 0xe3, 0x0e, 0x36, + 0x50, 0x65, 0x8e, 0x03, 0x7c, 0xc4, 0x2f, 0xc7, 0xa8, 0x0f, 0x2b, 0xe2, 0xf9, 0x90, 0x3e, 0x93, + 0x3e, 0xb5, 0x21, 0x6a, 0x65, 0x6e, 0x8d, 0xd4, 0xd7, 0xb8, 0x7e, 0x19, 0x95, 0xb2, 0xfa, 0x62, + 0x29, 0xd0, 0x17, 0x05, 0x56, 0x93, 0x2f, 0x89, 0x6a, 0x33, 0x59, 0x67, 0xec, 0x8c, 0xba, 0x75, + 0x81, 0x4a, 0xe9, 0xe2, 0x01, 0x77, 0xd1, 0x40, 0x3b, 0x59, 0x17, 0xa9, 0x65, 0xc1, 0x47, 0xd9, + 0x1d, 0x3c, 0xde, 0x7f, 0x76, 0x36, 0xd2, 0x94, 0xf3, 0x91, 0xa6, 0xfc, 0x1a, 0x69, 0xca, 0xa7, + 0xb1, 0x96, 0x3b, 0x1f, 0x6b, 0xb9, 0x1f, 0x63, 0x2d, 0xf7, 0x6a, 0xd7, 0xb2, 0x83, 0xb7, 0x83, + 0xb6, 0x61, 0xb2, 0x1e, 0xfe, 0xe0, 0xb9, 0x5d, 0x1a, 0xf6, 0xb0, 0xc3, 0x3a, 0x14, 0x87, 0x7b, + 0x38, 0x18, 0xba, 0xd4, 0xc7, 0x5d, 0x6a, 0x11, 0x73, 0x98, 0x94, 0x6c, 0xaf, 0xf0, 0xcf, 0xe1, + 0xee, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9d, 0xc8, 0x4c, 0x3b, 0xe9, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // TokenPairs retrieves registered token pairs + TokenPairs(ctx context.Context, in *QueryTokenPairsRequest, opts ...grpc.CallOption) (*QueryTokenPairsResponse, error) + // TokenPair retrieves a registered token pair + TokenPair(ctx context.Context, in *QueryTokenPairRequest, opts ...grpc.CallOption) (*QueryTokenPairResponse, error) + // Params retrieves the erc20 module params + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // OwnerAddress retrieves the owner address for a given ERC20 contract address + OwnerAddress(ctx context.Context, in *QueryOwnerAddressRequest, opts ...grpc.CallOption) (*QueryOwnerAddressResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) TokenPairs(ctx context.Context, in *QueryTokenPairsRequest, opts ...grpc.CallOption) (*QueryTokenPairsResponse, error) { + out := new(QueryTokenPairsResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Query/TokenPairs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TokenPair(ctx context.Context, in *QueryTokenPairRequest, opts ...grpc.CallOption) (*QueryTokenPairResponse, error) { + out := new(QueryTokenPairResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Query/TokenPair", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) OwnerAddress(ctx context.Context, in *QueryOwnerAddressRequest, opts ...grpc.CallOption) (*QueryOwnerAddressResponse, error) { + out := new(QueryOwnerAddressResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Query/OwnerAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // TokenPairs retrieves registered token pairs + TokenPairs(context.Context, *QueryTokenPairsRequest) (*QueryTokenPairsResponse, error) + // TokenPair retrieves a registered token pair + TokenPair(context.Context, *QueryTokenPairRequest) (*QueryTokenPairResponse, error) + // Params retrieves the erc20 module params + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // OwnerAddress retrieves the owner address for a given ERC20 contract address + OwnerAddress(context.Context, *QueryOwnerAddressRequest) (*QueryOwnerAddressResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) TokenPairs(ctx context.Context, req *QueryTokenPairsRequest) (*QueryTokenPairsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenPairs not implemented") +} +func (*UnimplementedQueryServer) TokenPair(ctx context.Context, req *QueryTokenPairRequest) (*QueryTokenPairResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenPair not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) OwnerAddress(ctx context.Context, req *QueryOwnerAddressRequest) (*QueryOwnerAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OwnerAddress not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_TokenPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenPairsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TokenPairs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Query/TokenPairs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenPairs(ctx, req.(*QueryTokenPairsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TokenPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenPairRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TokenPair(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Query/TokenPair", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenPair(ctx, req.(*QueryTokenPairRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_OwnerAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOwnerAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).OwnerAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Query/OwnerAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).OwnerAddress(ctx, req.(*QueryOwnerAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "evmos.erc20.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "TokenPairs", + Handler: _Query_TokenPairs_Handler, + }, + { + MethodName: "TokenPair", + Handler: _Query_TokenPair_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "OwnerAddress", + Handler: _Query_OwnerAddress_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "evmos/erc20/v1/query.proto", +} + +func (m *QueryTokenPairsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTokenPairsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPairsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenPairsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTokenPairsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPairsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.TokenPairs) > 0 { + for iNdEx := len(m.TokenPairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenPairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenPairRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTokenPairRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPairRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenPairResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTokenPairResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.TokenPair.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryOwnerAddressRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryOwnerAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOwnerAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryOwnerAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryOwnerAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOwnerAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryTokenPairsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenPairsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TokenPairs) > 0 { + for _, e := range m.TokenPairs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenPairRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Token) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenPairResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TokenPair.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryOwnerAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryOwnerAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryTokenPairsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTokenPairsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPairsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenPairsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTokenPairsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPairsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenPairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenPairs = append(m.TokenPairs, TokenPair{}) + if err := m.TokenPairs[len(m.TokenPairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenPairRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTokenPairRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPairRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenPairResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTokenPairResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPairResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenPair", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TokenPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOwnerAddressRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryOwnerAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOwnerAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOwnerAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryOwnerAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOwnerAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/evmos/erc20/query.pb.gw.go b/types/legacy/evmos/erc20/query.pb.gw.go new file mode 100644 index 0000000..bee32ab --- /dev/null +++ b/types/legacy/evmos/erc20/query.pb.gw.go @@ -0,0 +1,438 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: evmos/erc20/v1/query.proto + +/* +Package erc20 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package erc20 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_TokenPairs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TokenPairs_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPairsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TokenPairs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TokenPairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenPairs_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPairsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TokenPairs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TokenPairs(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TokenPair_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPairRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["token"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") + } + + protoReq.Token, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) + } + + msg, err := client.TokenPair(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenPair_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPairRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["token"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") + } + + protoReq.Token, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) + } + + msg, err := server.TokenPair(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_OwnerAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOwnerAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["contract_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "contract_address") + } + + protoReq.ContractAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "contract_address", err) + } + + msg, err := client.OwnerAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_OwnerAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOwnerAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["contract_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "contract_address") + } + + protoReq.ContractAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "contract_address", err) + } + + msg, err := server.OwnerAddress(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_TokenPairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenPairs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenPair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenPair_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OwnerAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_OwnerAddress_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OwnerAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_TokenPairs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TokenPairs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenPair_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TokenPair_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OwnerAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_OwnerAddress_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OwnerAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_TokenPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "erc20", "v1", "token_pairs"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TokenPair_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "erc20", "v1", "token_pairs", "token"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evmos", "erc20", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_OwnerAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evmos", "erc20", "v1", "owner_address", "contract_address"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_TokenPairs_0 = runtime.ForwardResponseMessage + + forward_Query_TokenPair_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_OwnerAddress_0 = runtime.ForwardResponseMessage +) diff --git a/types/legacy/evmos/erc20/tx.pb.go b/types/legacy/evmos/erc20/tx.pb.go new file mode 100644 index 0000000..4bb3d1b --- /dev/null +++ b/types/legacy/evmos/erc20/tx.pb.go @@ -0,0 +1,3643 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: evmos/erc20/v1/tx.proto + +package erc20 + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgConvertERC20 defines a Msg to convert a ERC20 token to a native Cosmos +// coin. +type MsgConvertERC20 struct { + // contract_address of an ERC20 token contract, that is registered in a token pair + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // amount of ERC20 tokens to convert + Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` + // receiver is the bech32 address to receive native Cosmos coins + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + // sender is the hex address from the owner of the given ERC20 tokens + Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` +} + +func (m *MsgConvertERC20) Reset() { *m = MsgConvertERC20{} } +func (m *MsgConvertERC20) String() string { return proto.CompactTextString(m) } +func (*MsgConvertERC20) ProtoMessage() {} +func (*MsgConvertERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{0} +} +func (m *MsgConvertERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConvertERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConvertERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgConvertERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConvertERC20.Merge(m, src) +} +func (m *MsgConvertERC20) XXX_Size() int { + return m.Size() +} +func (m *MsgConvertERC20) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConvertERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConvertERC20 proto.InternalMessageInfo + +func (m *MsgConvertERC20) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func (m *MsgConvertERC20) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *MsgConvertERC20) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +// MsgConvertERC20Response returns no fields +type MsgConvertERC20Response struct { +} + +func (m *MsgConvertERC20Response) Reset() { *m = MsgConvertERC20Response{} } +func (m *MsgConvertERC20Response) String() string { return proto.CompactTextString(m) } +func (*MsgConvertERC20Response) ProtoMessage() {} +func (*MsgConvertERC20Response) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{1} +} +func (m *MsgConvertERC20Response) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConvertERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConvertERC20Response.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgConvertERC20Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConvertERC20Response.Merge(m, src) +} +func (m *MsgConvertERC20Response) XXX_Size() int { + return m.Size() +} +func (m *MsgConvertERC20Response) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConvertERC20Response.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConvertERC20Response proto.InternalMessageInfo + +// MsgConvertCoin defines a Msg to convert a native Cosmos coin to a ERC20 token +type MsgConvertCoin struct { + // coin is a Cosmos coin whose denomination is registered in a token pair. The coin + // amount defines the amount of coins to convert. + Coin types.Coin `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin"` + // receiver is the hex address to receive ERC20 token + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // sender is the cosmos bech32 address from the owner of the given Cosmos coins + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` +} + +func (m *MsgConvertCoin) Reset() { *m = MsgConvertCoin{} } +func (m *MsgConvertCoin) String() string { return proto.CompactTextString(m) } +func (*MsgConvertCoin) ProtoMessage() {} +func (*MsgConvertCoin) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{2} +} +func (m *MsgConvertCoin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConvertCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConvertCoin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgConvertCoin) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConvertCoin.Merge(m, src) +} +func (m *MsgConvertCoin) XXX_Size() int { + return m.Size() +} +func (m *MsgConvertCoin) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConvertCoin.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConvertCoin proto.InternalMessageInfo + +func (m *MsgConvertCoin) GetCoin() types.Coin { + if m != nil { + return m.Coin + } + return types.Coin{} +} + +func (m *MsgConvertCoin) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *MsgConvertCoin) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +// MsgConvertCoinResponse returns no fields +type MsgConvertCoinResponse struct { +} + +func (m *MsgConvertCoinResponse) Reset() { *m = MsgConvertCoinResponse{} } +func (m *MsgConvertCoinResponse) String() string { return proto.CompactTextString(m) } +func (*MsgConvertCoinResponse) ProtoMessage() {} +func (*MsgConvertCoinResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{3} +} +func (m *MsgConvertCoinResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConvertCoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConvertCoinResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgConvertCoinResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConvertCoinResponse.Merge(m, src) +} +func (m *MsgConvertCoinResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgConvertCoinResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConvertCoinResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConvertCoinResponse proto.InternalMessageInfo + +// MsgUpdateParams is the Msg/UpdateParams request type for Erc20 parameters. +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/evm parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{4} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{5} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgTransferOwnership defines a Msg to transfer the ownership of the ERC20 token pair to the new owner +type MsgTransferOwnership struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + // new_owner is the hex address of the new owner + NewOwner string `protobuf:"bytes,3,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` +} + +func (m *MsgTransferOwnership) Reset() { *m = MsgTransferOwnership{} } +func (m *MsgTransferOwnership) String() string { return proto.CompactTextString(m) } +func (*MsgTransferOwnership) ProtoMessage() {} +func (*MsgTransferOwnership) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{6} +} +func (m *MsgTransferOwnership) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferOwnership) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransferOwnership.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgTransferOwnership) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferOwnership.Merge(m, src) +} +func (m *MsgTransferOwnership) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferOwnership) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferOwnership.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferOwnership proto.InternalMessageInfo + +func (m *MsgTransferOwnership) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgTransferOwnership) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *MsgTransferOwnership) GetNewOwner() string { + if m != nil { + return m.NewOwner + } + return "" +} + +// MsgTransferOwnershipResponse returns no fields +type MsgTransferOwnershipResponse struct { +} + +func (m *MsgTransferOwnershipResponse) Reset() { *m = MsgTransferOwnershipResponse{} } +func (m *MsgTransferOwnershipResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTransferOwnershipResponse) ProtoMessage() {} +func (*MsgTransferOwnershipResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{7} +} +func (m *MsgTransferOwnershipResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferOwnershipResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransferOwnershipResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgTransferOwnershipResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferOwnershipResponse.Merge(m, src) +} +func (m *MsgTransferOwnershipResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferOwnershipResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferOwnershipResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferOwnershipResponse proto.InternalMessageInfo + +// MsgMint defines a Msg to mint ERC20 tokens +type MsgMint struct { + // contract_address of an ERC20 token contract, that is registered in a token pair + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // amount of ERC20 tokens to mint + Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` + // to is the address to mint the tokens to + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + // sender is the address of the sender + Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` +} + +func (m *MsgMint) Reset() { *m = MsgMint{} } +func (m *MsgMint) String() string { return proto.CompactTextString(m) } +func (*MsgMint) ProtoMessage() {} +func (*MsgMint) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{8} +} +func (m *MsgMint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgMint) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMint.Merge(m, src) +} +func (m *MsgMint) XXX_Size() int { + return m.Size() +} +func (m *MsgMint) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMint.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMint proto.InternalMessageInfo + +func (m *MsgMint) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func (m *MsgMint) GetTo() string { + if m != nil { + return m.To + } + return "" +} + +func (m *MsgMint) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +type MsgMintResponse struct { +} + +func (m *MsgMintResponse) Reset() { *m = MsgMintResponse{} } +func (m *MsgMintResponse) String() string { return proto.CompactTextString(m) } +func (*MsgMintResponse) ProtoMessage() {} +func (*MsgMintResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{9} +} +func (m *MsgMintResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMintResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMintResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgMintResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMintResponse.Merge(m, src) +} +func (m *MsgMintResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgMintResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMintResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMintResponse proto.InternalMessageInfo + +// MsgBurn defines a Msg to burn ERC20 tokens +type MsgBurn struct { + // contract_address of an ERC20 token contract, that is registered in a token pair + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // amount of ERC20 tokens to burn + Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` + // sender is the address of the sender + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` +} + +func (m *MsgBurn) Reset() { *m = MsgBurn{} } +func (m *MsgBurn) String() string { return proto.CompactTextString(m) } +func (*MsgBurn) ProtoMessage() {} +func (*MsgBurn) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{10} +} +func (m *MsgBurn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBurn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBurn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBurn) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBurn.Merge(m, src) +} +func (m *MsgBurn) XXX_Size() int { + return m.Size() +} +func (m *MsgBurn) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBurn.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBurn proto.InternalMessageInfo + +func (m *MsgBurn) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func (m *MsgBurn) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +type MsgBurnResponse struct { +} + +func (m *MsgBurnResponse) Reset() { *m = MsgBurnResponse{} } +func (m *MsgBurnResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBurnResponse) ProtoMessage() {} +func (*MsgBurnResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{11} +} +func (m *MsgBurnResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBurnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBurnResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBurnResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBurnResponse.Merge(m, src) +} +func (m *MsgBurnResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBurnResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBurnResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBurnResponse proto.InternalMessageInfo + +// MsgRegisterERC20 is the Msg/RegisterERC20 request type for registering +// an Erc20 contract token pair. +type MsgRegisterERC20 struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // erc20addresses is a slice of ERC20 token contract hex addresses + Erc20Addresses []string `protobuf:"bytes,2,rep,name=erc20addresses,proto3" json:"erc20addresses,omitempty"` +} + +func (m *MsgRegisterERC20) Reset() { *m = MsgRegisterERC20{} } +func (m *MsgRegisterERC20) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterERC20) ProtoMessage() {} +func (*MsgRegisterERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{12} +} +func (m *MsgRegisterERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterERC20.Merge(m, src) +} +func (m *MsgRegisterERC20) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterERC20) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterERC20 proto.InternalMessageInfo + +func (m *MsgRegisterERC20) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRegisterERC20) GetErc20Addresses() []string { + if m != nil { + return m.Erc20Addresses + } + return nil +} + +// MsgRegisterERC20Response defines the response structure for executing a +// MsgRegisterERC20 message. +type MsgRegisterERC20Response struct { +} + +func (m *MsgRegisterERC20Response) Reset() { *m = MsgRegisterERC20Response{} } +func (m *MsgRegisterERC20Response) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterERC20Response) ProtoMessage() {} +func (*MsgRegisterERC20Response) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{13} +} +func (m *MsgRegisterERC20Response) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterERC20Response.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterERC20Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterERC20Response.Merge(m, src) +} +func (m *MsgRegisterERC20Response) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterERC20Response) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterERC20Response.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterERC20Response proto.InternalMessageInfo + +// MsgToggleConversion is the Msg/MsgToggleConversion request type for toggling +// an Erc20 contract conversion capability. +type MsgToggleConversion struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // token identifier can be either the hex contract address of the ERC20 or the + // Cosmos base denomination + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *MsgToggleConversion) Reset() { *m = MsgToggleConversion{} } +func (m *MsgToggleConversion) String() string { return proto.CompactTextString(m) } +func (*MsgToggleConversion) ProtoMessage() {} +func (*MsgToggleConversion) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{14} +} +func (m *MsgToggleConversion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgToggleConversion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgToggleConversion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgToggleConversion) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgToggleConversion.Merge(m, src) +} +func (m *MsgToggleConversion) XXX_Size() int { + return m.Size() +} +func (m *MsgToggleConversion) XXX_DiscardUnknown() { + xxx_messageInfo_MsgToggleConversion.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgToggleConversion proto.InternalMessageInfo + +func (m *MsgToggleConversion) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgToggleConversion) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +// MsgToggleConversionResponse defines the response structure for executing a +// ToggleConversion message. +type MsgToggleConversionResponse struct { +} + +func (m *MsgToggleConversionResponse) Reset() { *m = MsgToggleConversionResponse{} } +func (m *MsgToggleConversionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgToggleConversionResponse) ProtoMessage() {} +func (*MsgToggleConversionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f8926fc6cb676914, []int{15} +} +func (m *MsgToggleConversionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgToggleConversionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgToggleConversionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgToggleConversionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgToggleConversionResponse.Merge(m, src) +} +func (m *MsgToggleConversionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgToggleConversionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgToggleConversionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgToggleConversionResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgConvertERC20)(nil), "evmos.erc20.v1.MsgConvertERC20") + proto.RegisterType((*MsgConvertERC20Response)(nil), "evmos.erc20.v1.MsgConvertERC20Response") + proto.RegisterType((*MsgConvertCoin)(nil), "evmos.erc20.v1.MsgConvertCoin") + proto.RegisterType((*MsgConvertCoinResponse)(nil), "evmos.erc20.v1.MsgConvertCoinResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "evmos.erc20.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "evmos.erc20.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgTransferOwnership)(nil), "evmos.erc20.v1.MsgTransferOwnership") + proto.RegisterType((*MsgTransferOwnershipResponse)(nil), "evmos.erc20.v1.MsgTransferOwnershipResponse") + proto.RegisterType((*MsgMint)(nil), "evmos.erc20.v1.MsgMint") + proto.RegisterType((*MsgMintResponse)(nil), "evmos.erc20.v1.MsgMintResponse") + proto.RegisterType((*MsgBurn)(nil), "evmos.erc20.v1.MsgBurn") + proto.RegisterType((*MsgBurnResponse)(nil), "evmos.erc20.v1.MsgBurnResponse") + proto.RegisterType((*MsgRegisterERC20)(nil), "evmos.erc20.v1.MsgRegisterERC20") + proto.RegisterType((*MsgRegisterERC20Response)(nil), "evmos.erc20.v1.MsgRegisterERC20Response") + proto.RegisterType((*MsgToggleConversion)(nil), "evmos.erc20.v1.MsgToggleConversion") + proto.RegisterType((*MsgToggleConversionResponse)(nil), "evmos.erc20.v1.MsgToggleConversionResponse") +} + +func init() { proto.RegisterFile("evmos/erc20/v1/tx.proto", fileDescriptor_f8926fc6cb676914) } + +var fileDescriptor_f8926fc6cb676914 = []byte{ + // 927 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0x3a, 0x4e, 0xc0, 0x93, 0xe2, 0xa6, 0x4b, 0x1a, 0xdb, 0xdb, 0x66, 0x1d, 0x96, 0xaf, + 0x10, 0x60, 0x27, 0x76, 0x00, 0xa9, 0xbe, 0xe1, 0x88, 0x03, 0x07, 0x0b, 0x64, 0x40, 0x42, 0x70, + 0x88, 0xc6, 0xeb, 0x61, 0xb2, 0x6a, 0x76, 0xc6, 0x9a, 0x99, 0x38, 0xc9, 0x0d, 0xe5, 0xc8, 0xa9, + 0x88, 0x13, 0x37, 0x2e, 0x48, 0x1c, 0x73, 0x40, 0xfc, 0x86, 0x1e, 0x2b, 0x7a, 0x41, 0x1c, 0x2a, + 0x94, 0x80, 0xf2, 0x37, 0xd0, 0x7c, 0x78, 0xe3, 0x5d, 0x6f, 0xda, 0x52, 0xa1, 0x5e, 0xa2, 0xcc, + 0xfb, 0x35, 0xcf, 0xfb, 0xcc, 0xf3, 0xbe, 0x6b, 0x50, 0xc3, 0xe3, 0x84, 0x09, 0x88, 0x79, 0xd4, + 0xde, 0x82, 0xe3, 0x16, 0x94, 0x47, 0xe1, 0x88, 0x33, 0xc9, 0xdc, 0xaa, 0x76, 0x84, 0xda, 0x11, + 0x8e, 0x5b, 0xde, 0x0d, 0x94, 0xc4, 0x94, 0x41, 0xfd, 0xd7, 0x84, 0x78, 0x7e, 0xc4, 0x84, 0x4a, + 0x1e, 0x20, 0x81, 0xe1, 0xb8, 0x35, 0xc0, 0x12, 0xb5, 0x60, 0xc4, 0x62, 0x6a, 0xfd, 0x35, 0xeb, + 0x4f, 0x04, 0x51, 0xa5, 0x13, 0x41, 0xac, 0xa3, 0x61, 0x1c, 0xbb, 0xfa, 0x04, 0xcd, 0xc1, 0xba, + 0x6e, 0xe7, 0xf0, 0x10, 0x4c, 0xb1, 0x88, 0x27, 0xde, 0x15, 0xc2, 0x08, 0x33, 0x59, 0xea, 0xbf, + 0x49, 0x0e, 0x61, 0x8c, 0xec, 0x63, 0x88, 0x46, 0x31, 0x44, 0x94, 0x32, 0x89, 0x64, 0xcc, 0xa8, + 0xcd, 0x09, 0x1e, 0x3a, 0xe0, 0x7a, 0x4f, 0x90, 0x1d, 0x46, 0xc7, 0x98, 0xcb, 0x8f, 0xfa, 0x3b, + 0xed, 0x2d, 0xf7, 0x2d, 0xb0, 0x1c, 0x31, 0x2a, 0x39, 0x8a, 0xe4, 0x2e, 0x1a, 0x0e, 0x39, 0x16, + 0xa2, 0xee, 0xac, 0x3b, 0x1b, 0x95, 0xfe, 0xf5, 0x89, 0xfd, 0x43, 0x63, 0x76, 0x3b, 0x60, 0x11, + 0x25, 0xec, 0x80, 0xca, 0x7a, 0x49, 0x05, 0x74, 0x83, 0xfb, 0x8f, 0x9a, 0x73, 0x7f, 0x3e, 0x6a, + 0xde, 0x34, 0xb0, 0xc5, 0xf0, 0x6e, 0x18, 0x33, 0x98, 0x20, 0xb9, 0x17, 0x7e, 0x4c, 0xe5, 0x2f, + 0x17, 0xa7, 0x9b, 0x4e, 0xdf, 0x66, 0xb8, 0x1e, 0x78, 0x91, 0xe3, 0x08, 0xc7, 0x63, 0xcc, 0xeb, + 0xf3, 0xba, 0x7c, 0x7a, 0x76, 0x57, 0xc1, 0xa2, 0xc0, 0x74, 0x88, 0x79, 0xbd, 0xac, 0x3d, 0xf6, + 0xd4, 0x79, 0xfd, 0xe4, 0xe2, 0x74, 0xd3, 0x1e, 0xbe, 0xbb, 0x38, 0xdd, 0xbc, 0x69, 0x08, 0xc9, + 0x75, 0x10, 0x34, 0x40, 0x2d, 0x67, 0xea, 0x63, 0x31, 0x62, 0x54, 0xe0, 0xe0, 0x18, 0x54, 0x2f, + 0x5d, 0x3b, 0x2c, 0xa6, 0xee, 0x36, 0x28, 0xab, 0x67, 0xd1, 0x2d, 0x2e, 0xb5, 0x1b, 0xa1, 0x65, + 0x5c, 0xbd, 0x5b, 0x68, 0xdf, 0x2d, 0x54, 0x81, 0xdd, 0xb2, 0x6a, 0xae, 0xaf, 0x83, 0x33, 0xe0, + 0x4b, 0x57, 0x82, 0x9f, 0x9f, 0x06, 0x1f, 0xd4, 0xc1, 0x6a, 0xf6, 0xea, 0x14, 0xd4, 0x6f, 0xe6, + 0x15, 0xbe, 0x18, 0x0d, 0x91, 0xc4, 0x9f, 0x22, 0x8e, 0x12, 0xe1, 0x7e, 0x00, 0x2a, 0xe8, 0x40, + 0xee, 0x31, 0x1e, 0xcb, 0x63, 0x43, 0x7f, 0xb7, 0xfe, 0xfb, 0xaf, 0xef, 0xae, 0x58, 0x78, 0xf6, + 0x05, 0x3e, 0x93, 0x3c, 0xa6, 0xa4, 0x7f, 0x19, 0xea, 0xde, 0x01, 0x8b, 0x23, 0x5d, 0x41, 0xe3, + 0x5a, 0x6a, 0xaf, 0x86, 0x59, 0xad, 0x86, 0xa6, 0x7e, 0xb7, 0xa2, 0xba, 0xb1, 0x2f, 0x62, 0x12, + 0x3a, 0x5b, 0x8a, 0xdd, 0xcb, 0x52, 0x8a, 0xe0, 0x35, 0x43, 0xf0, 0x91, 0xd5, 0x5c, 0x0e, 0xa4, + 0x25, 0x7a, 0xda, 0x94, 0xf6, 0xf4, 0xbd, 0x03, 0x56, 0x7a, 0x82, 0x7c, 0xce, 0x11, 0x15, 0xdf, + 0x60, 0xfe, 0xc9, 0x21, 0xc5, 0x5c, 0xec, 0xc5, 0xa3, 0x67, 0x6e, 0x6c, 0x05, 0x2c, 0x48, 0x76, + 0x17, 0x53, 0xcb, 0xb7, 0x39, 0xb8, 0xb7, 0x40, 0x85, 0xe2, 0xc3, 0x5d, 0xa6, 0xca, 0x4f, 0x64, + 0x44, 0xf1, 0xa1, 0xbe, 0xae, 0x53, 0xcd, 0x36, 0x14, 0xf8, 0xe0, 0x76, 0x11, 0xa4, 0x14, 0xf3, + 0x4f, 0x0e, 0x78, 0xa1, 0x27, 0x48, 0x2f, 0xa6, 0xf2, 0xbf, 0x4c, 0xc1, 0xfb, 0xb9, 0x29, 0x58, + 0x7b, 0xec, 0x14, 0xa4, 0x03, 0x50, 0x05, 0x25, 0xc9, 0x2c, 0xe6, 0x92, 0x64, 0x57, 0x8a, 0x7e, + 0x69, 0x4a, 0xf4, 0xc1, 0x0d, 0xad, 0x14, 0x85, 0x30, 0x45, 0x7d, 0xcf, 0xa0, 0xee, 0x1e, 0x70, + 0xfa, 0x1c, 0x50, 0x5f, 0xa1, 0xee, 0x22, 0x94, 0x0a, 0x51, 0x8a, 0xf2, 0x67, 0x07, 0x2c, 0xf7, + 0x04, 0xe9, 0x63, 0x12, 0x0b, 0x89, 0xb9, 0x59, 0x35, 0xcf, 0xaa, 0x85, 0x37, 0x40, 0x55, 0x0b, + 0xd2, 0xb6, 0x88, 0x95, 0xd8, 0xe7, 0x37, 0x2a, 0xfd, 0x9c, 0xb5, 0xd3, 0x9a, 0x55, 0xb4, 0x3f, + 0xa3, 0xe8, 0x0c, 0xa4, 0xc0, 0x03, 0xf5, 0xbc, 0x2d, 0xed, 0xe1, 0x47, 0x07, 0xbc, 0xac, 0x04, + 0xc4, 0x08, 0xd9, 0xc7, 0x66, 0x90, 0x45, 0xcc, 0xe8, 0xff, 0x2b, 0xe9, 0xce, 0x7b, 0xb3, 0xa0, + 0x5f, 0x99, 0x01, 0x9d, 0xc7, 0x10, 0xac, 0x81, 0x5b, 0x05, 0xe6, 0x09, 0xf4, 0xf6, 0x3f, 0x0b, + 0x60, 0xbe, 0x27, 0x88, 0x7b, 0xe2, 0x80, 0x6b, 0x99, 0x6d, 0xdf, 0xcc, 0xef, 0x87, 0xdc, 0xe6, + 0xf4, 0xde, 0x7c, 0x42, 0x40, 0xca, 0xce, 0xc6, 0xc9, 0xc3, 0xbf, 0x7f, 0x28, 0x05, 0xee, 0x3a, + 0x9c, 0xf9, 0x6c, 0xc2, 0xc8, 0x24, 0xec, 0x6a, 0x9b, 0xfb, 0x25, 0xb8, 0x96, 0xd9, 0x75, 0x45, + 0x18, 0xa6, 0x03, 0x0a, 0x31, 0x14, 0x6d, 0x1d, 0x97, 0x81, 0xc6, 0x64, 0xbc, 0x77, 0xac, 0xde, + 0x2f, 0x37, 0xcf, 0x6b, 0x05, 0x55, 0x66, 0x96, 0x81, 0xf7, 0xce, 0xd3, 0x44, 0xa5, 0x17, 0x22, + 0x50, 0xd6, 0xeb, 0xa2, 0x56, 0x90, 0xa5, 0x1c, 0x5e, 0xf3, 0x0a, 0x47, 0x4a, 0x5b, 0x53, 0xd3, + 0xd6, 0x08, 0x6a, 0x05, 0xb4, 0x25, 0xaa, 0x34, 0x02, 0x65, 0x3d, 0xdb, 0x45, 0x57, 0x28, 0x47, + 0xe1, 0x15, 0x99, 0xd9, 0x7b, 0xdc, 0x15, 0x03, 0x55, 0xfa, 0x6b, 0xf0, 0x52, 0x76, 0x30, 0xd7, + 0x0b, 0x4a, 0x66, 0x22, 0xbc, 0x8d, 0x27, 0x45, 0xa4, 0x14, 0x0d, 0xc1, 0xf2, 0xcc, 0xc4, 0xbc, + 0x5a, 0x44, 0x72, 0x2e, 0xc8, 0x7b, 0xfb, 0x29, 0x82, 0x26, 0xb7, 0x78, 0x0b, 0xdf, 0xaa, 0x6f, + 0x59, 0xb7, 0x77, 0xff, 0xcc, 0x77, 0x1e, 0x9c, 0xf9, 0xce, 0x5f, 0x67, 0xbe, 0x73, 0xef, 0xdc, + 0x9f, 0x7b, 0x70, 0xee, 0xcf, 0xfd, 0x71, 0xee, 0xcf, 0x7d, 0xb5, 0x4d, 0x62, 0xb9, 0x77, 0x30, + 0x08, 0x23, 0x96, 0xc0, 0x23, 0x3e, 0xda, 0xc7, 0xe3, 0x04, 0x52, 0x36, 0xc4, 0x70, 0x7c, 0x07, + 0xca, 0xe3, 0x11, 0x16, 0x70, 0x1f, 0x13, 0x14, 0x1d, 0x4f, 0x73, 0x34, 0x58, 0xd4, 0x3f, 0x93, + 0xb6, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xde, 0x1e, 0xcb, 0x0a, 0x0a, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // ConvertERC20 mints a native Cosmos coin representation of the ERC20 token + // contract that is registered on the token mapping. + ConvertERC20(ctx context.Context, in *MsgConvertERC20, opts ...grpc.CallOption) (*MsgConvertERC20Response, error) + // UpdateParams defines a governance operation for updating the x/erc20 module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // TransferContractOwnership defines a Msg to transfer the ownership of the ERC20 token pair to the new owner + TransferContractOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) + // Mint mints ERC20 tokens + Mint(ctx context.Context, in *MsgMint, opts ...grpc.CallOption) (*MsgMintResponse, error) + // Burn burns ERC20 tokens + Burn(ctx context.Context, in *MsgBurn, opts ...grpc.CallOption) (*MsgBurnResponse, error) + // RegisterERC20 defines a governance operation for registering a token pair for the specified erc20 contract. + // The authority is hard-coded to the Cosmos SDK x/gov module account + RegisterERC20(ctx context.Context, in *MsgRegisterERC20, opts ...grpc.CallOption) (*MsgRegisterERC20Response, error) + // ToggleConversion defines a governance operation for enabling/disablen a token pair conversion. + // The authority is hard-coded to the Cosmos SDK x/gov module account + ToggleConversion(ctx context.Context, in *MsgToggleConversion, opts ...grpc.CallOption) (*MsgToggleConversionResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) ConvertERC20(ctx context.Context, in *MsgConvertERC20, opts ...grpc.CallOption) (*MsgConvertERC20Response, error) { + out := new(MsgConvertERC20Response) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Msg/ConvertERC20", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) TransferContractOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) { + out := new(MsgTransferOwnershipResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Msg/TransferContractOwnership", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Mint(ctx context.Context, in *MsgMint, opts ...grpc.CallOption) (*MsgMintResponse, error) { + out := new(MsgMintResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Msg/Mint", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Burn(ctx context.Context, in *MsgBurn, opts ...grpc.CallOption) (*MsgBurnResponse, error) { + out := new(MsgBurnResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Msg/Burn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterERC20(ctx context.Context, in *MsgRegisterERC20, opts ...grpc.CallOption) (*MsgRegisterERC20Response, error) { + out := new(MsgRegisterERC20Response) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Msg/RegisterERC20", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ToggleConversion(ctx context.Context, in *MsgToggleConversion, opts ...grpc.CallOption) (*MsgToggleConversionResponse, error) { + out := new(MsgToggleConversionResponse) + err := c.cc.Invoke(ctx, "/evmos.erc20.v1.Msg/ToggleConversion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // ConvertERC20 mints a native Cosmos coin representation of the ERC20 token + // contract that is registered on the token mapping. + ConvertERC20(context.Context, *MsgConvertERC20) (*MsgConvertERC20Response, error) + // UpdateParams defines a governance operation for updating the x/erc20 module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // TransferContractOwnership defines a Msg to transfer the ownership of the ERC20 token pair to the new owner + TransferContractOwnership(context.Context, *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) + // Mint mints ERC20 tokens + Mint(context.Context, *MsgMint) (*MsgMintResponse, error) + // Burn burns ERC20 tokens + Burn(context.Context, *MsgBurn) (*MsgBurnResponse, error) + // RegisterERC20 defines a governance operation for registering a token pair for the specified erc20 contract. + // The authority is hard-coded to the Cosmos SDK x/gov module account + RegisterERC20(context.Context, *MsgRegisterERC20) (*MsgRegisterERC20Response, error) + // ToggleConversion defines a governance operation for enabling/disablen a token pair conversion. + // The authority is hard-coded to the Cosmos SDK x/gov module account + ToggleConversion(context.Context, *MsgToggleConversion) (*MsgToggleConversionResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) ConvertERC20(ctx context.Context, req *MsgConvertERC20) (*MsgConvertERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConvertERC20 not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) TransferContractOwnership(ctx context.Context, req *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferContractOwnership not implemented") +} +func (*UnimplementedMsgServer) Mint(ctx context.Context, req *MsgMint) (*MsgMintResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Mint not implemented") +} +func (*UnimplementedMsgServer) Burn(ctx context.Context, req *MsgBurn) (*MsgBurnResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Burn not implemented") +} +func (*UnimplementedMsgServer) RegisterERC20(ctx context.Context, req *MsgRegisterERC20) (*MsgRegisterERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterERC20 not implemented") +} +func (*UnimplementedMsgServer) ToggleConversion(ctx context.Context, req *MsgToggleConversion) (*MsgToggleConversionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ToggleConversion not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_ConvertERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgConvertERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ConvertERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Msg/ConvertERC20", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ConvertERC20(ctx, req.(*MsgConvertERC20)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TransferContractOwnership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransferOwnership) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TransferContractOwnership(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Msg/TransferContractOwnership", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TransferContractOwnership(ctx, req.(*MsgTransferOwnership)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Mint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgMint) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Mint(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Msg/Mint", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Mint(ctx, req.(*MsgMint)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Burn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBurn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Burn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Msg/Burn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Burn(ctx, req.(*MsgBurn)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RegisterERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Msg/RegisterERC20", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterERC20(ctx, req.(*MsgRegisterERC20)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ToggleConversion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgToggleConversion) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ToggleConversion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/evmos.erc20.v1.Msg/ToggleConversion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ToggleConversion(ctx, req.(*MsgToggleConversion)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "evmos.erc20.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ConvertERC20", + Handler: _Msg_ConvertERC20_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "TransferContractOwnership", + Handler: _Msg_TransferContractOwnership_Handler, + }, + { + MethodName: "Mint", + Handler: _Msg_Mint_Handler, + }, + { + MethodName: "Burn", + Handler: _Msg_Burn_Handler, + }, + { + MethodName: "RegisterERC20", + Handler: _Msg_RegisterERC20_Handler, + }, + { + MethodName: "ToggleConversion", + Handler: _Msg_ToggleConversion_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "evmos/erc20/v1/tx.proto", +} + +func (m *MsgConvertERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgConvertERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConvertERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x22 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgConvertERC20Response) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgConvertERC20Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConvertERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgConvertCoin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgConvertCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConvertCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x1a + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Coin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgConvertCoinResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgConvertCoinResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConvertCoinResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgTransferOwnership) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgTransferOwnership) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferOwnership) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewOwner) > 0 { + i -= len(m.NewOwner) + copy(dAtA[i:], m.NewOwner) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewOwner))) + i-- + dAtA[i] = 0x1a + } + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgTransferOwnershipResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgTransferOwnershipResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferOwnershipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgMint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgMint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x22 + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgMintResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgMintResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMintResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgBurn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBurn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBurn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBurnResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBurnResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBurnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRegisterERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Erc20Addresses) > 0 { + for iNdEx := len(m.Erc20Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Erc20Addresses[iNdEx]) + copy(dAtA[i:], m.Erc20Addresses[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Erc20Addresses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterERC20Response) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterERC20Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgToggleConversion) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgToggleConversion) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgToggleConversion) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgToggleConversionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgToggleConversionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgToggleConversionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgConvertERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgConvertERC20Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgConvertCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Coin.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgConvertCoinResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgTransferOwnership) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Token) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NewOwner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgTransferOwnershipResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgMint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgMintResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgBurn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgBurnResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRegisterERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Erc20Addresses) > 0 { + for _, s := range m.Erc20Addresses { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgRegisterERC20Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgToggleConversion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Token) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgToggleConversionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgConvertERC20) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgConvertERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgConvertERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgConvertERC20Response) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgConvertERC20Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgConvertERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgConvertCoin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgConvertCoin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgConvertCoin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgConvertCoinResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgConvertCoinResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgConvertCoinResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferOwnership) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferOwnership: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferOwnership: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewOwner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferOwnershipResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferOwnershipResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferOwnershipResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMintResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMintResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMintResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBurn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBurn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBurn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBurnResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBurnResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBurnResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterERC20) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Erc20Addresses = append(m.Erc20Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterERC20Response) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterERC20Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgToggleConversion) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgToggleConversion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgToggleConversion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgToggleConversionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgToggleConversionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgToggleConversionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/legacy/evmos/erc20/tx.pb.gw.go b/types/legacy/evmos/erc20/tx.pb.gw.go new file mode 100644 index 0000000..4889bdf --- /dev/null +++ b/types/legacy/evmos/erc20/tx.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: evmos/erc20/v1/tx.proto + +/* +Package erc20 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package erc20 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Msg_ConvertERC20_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_ConvertERC20_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgConvertERC20 + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ConvertERC20_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ConvertERC20(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_ConvertERC20_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgConvertERC20 + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ConvertERC20_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ConvertERC20(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_Mint_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_Mint_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgMint + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Mint_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Mint(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_Mint_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgMint + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Mint_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Mint(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_Burn_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_Burn_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgBurn + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Burn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Burn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_Burn_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgBurn + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_Burn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Burn(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". +// UnaryRPC :call MsgServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. +func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { + + mux.Handle("GET", pattern_Msg_ConvertERC20_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_ConvertERC20_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ConvertERC20_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_Mint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_Mint_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_Mint_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_Burn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_Burn_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_Burn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMsgHandler(ctx, mux, conn) +} + +// RegisterMsgHandler registers the http handlers for service Msg to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) +} + +// RegisterMsgHandlerClient registers the http handlers for service Msg +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MsgClient" to call the correct interceptors. +func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { + + mux.Handle("GET", pattern_Msg_ConvertERC20_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_ConvertERC20_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_ConvertERC20_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_Mint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_Mint_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_Mint_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_Burn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_Burn_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_Burn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Msg_ConvertERC20_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"evmos", "erc20", "v1", "tx", "convert_erc20"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_Mint_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"evmos", "erc20", "v1", "tx", "mint"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_Burn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"evmos", "erc20", "v1", "tx", "burn"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Msg_ConvertERC20_0 = runtime.ForwardResponseMessage + + forward_Msg_Mint_0 = runtime.ForwardResponseMessage + + forward_Msg_Burn_0 = runtime.ForwardResponseMessage +) diff --git a/x/poa/types/legacy/genesis.pb.go b/x/poa/types/legacy/genesis.pb.go new file mode 100644 index 0000000..7991eb3 --- /dev/null +++ b/x/poa/types/legacy/genesis.pb.go @@ -0,0 +1,324 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packages/blockchain/poa/genesis.proto + +package legacy + +import ( + fmt "fmt" + _ "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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the poa module's genesis state. +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_a9913de4cca7aa3b, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "packages.blockchain.poa.GenesisState") +} + +func init() { + proto.RegisterFile("packages/blockchain/poa/genesis.proto", fileDescriptor_a9913de4cca7aa3b) +} + +var fileDescriptor_a9913de4cca7aa3b = []byte{ + // 218 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0x48, 0x4c, 0xce, + 0x4e, 0x4c, 0x4f, 0x2d, 0xd6, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0x4e, 0xce, 0x48, 0xcc, 0xcc, 0xd3, + 0x2f, 0xc8, 0x4f, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x12, 0x87, 0x29, 0xd3, 0x43, 0x28, 0xd3, 0x2b, 0xc8, 0x4f, 0x94, 0x12, 0x49, 0xcf, + 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x54, 0x70, 0x99, 0x5a, 0x90, 0x58, + 0x94, 0x98, 0x0b, 0x35, 0x54, 0xc9, 0x97, 0x8b, 0xc7, 0x1d, 0x62, 0x4b, 0x70, 0x49, 0x62, 0x49, + 0xaa, 0x90, 0x2d, 0x17, 0x1b, 0x44, 0x5e, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x5e, 0x0f, + 0x87, 0xad, 0x7a, 0x01, 0x60, 0x65, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0x35, 0x39, + 0xb9, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, + 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x6e, 0x7a, 0x66, 0x49, + 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x45, 0x51, 0x41, 0x4e, 0x6a, 0x59, 0xae, 0x7e, + 0x5e, 0x7e, 0x4a, 0xaa, 0x7e, 0x99, 0xa5, 0x7e, 0x05, 0xd8, 0x5d, 0x25, 0x95, 0x05, 0xa9, 0xc5, + 0xfa, 0x39, 0xa9, 0xe9, 0x89, 0xc9, 0x95, 0x49, 0x6c, 0x60, 0xe7, 0x19, 0x03, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xc1, 0xad, 0x44, 0xfa, 0x1c, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/poa/types/legacy/params.pb.go b/x/poa/types/legacy/params.pb.go new file mode 100644 index 0000000..5ad1445 --- /dev/null +++ b/x/poa/types/legacy/params.pb.go @@ -0,0 +1,266 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packages/blockchain/poa/params.proto + +package legacy + +import ( + fmt "fmt" + 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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_907661d1da522650, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "packages.blockchain.poa.Params") +} + +func init() { + proto.RegisterFile("packages/blockchain/poa/params.proto", fileDescriptor_907661d1da522650) +} + +var fileDescriptor_907661d1da522650 = []byte{ + // 157 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x29, 0x48, 0x4c, 0xce, + 0x4e, 0x4c, 0x4f, 0x2d, 0xd6, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0x4e, 0xce, 0x48, 0xcc, 0xcc, 0xd3, + 0x2f, 0xc8, 0x4f, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x87, 0xa9, 0xd2, 0x43, 0xa8, 0xd2, 0x2b, 0xc8, 0x4f, 0x54, 0xe2, 0xe0, 0x62, 0x0b, + 0x00, 0x2b, 0x74, 0x72, 0x3f, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, + 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xdd, + 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x8a, 0xa2, 0x82, 0x9c, 0xd4, + 0xb2, 0x5c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, 0xfd, 0x32, 0x4b, 0xfd, 0x0a, 0xb0, 0x5d, 0x25, 0x95, + 0x05, 0xa9, 0xc5, 0xfa, 0x39, 0xa9, 0xe9, 0x89, 0xc9, 0x95, 0x49, 0x6c, 0x60, 0x2b, 0x8d, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x62, 0xa4, 0x8e, 0x9a, 0x00, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/poa/types/legacy/query.pb.go b/x/poa/types/legacy/query.pb.go new file mode 100644 index 0000000..28a1bc5 --- /dev/null +++ b/x/poa/types/legacy/query.pb.go @@ -0,0 +1,538 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packages/blockchain/poa/query.proto + +package legacy + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73271f4041d49da6, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73271f4041d49da6, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "packages.blockchain.poa.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "packages.blockchain.poa.QueryParamsResponse") +} + +func init() { + proto.RegisterFile("packages/blockchain/poa/query.proto", fileDescriptor_73271f4041d49da6) +} + +var fileDescriptor_73271f4041d49da6 = []byte{ + // 301 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2e, 0x48, 0x4c, 0xce, + 0x4e, 0x4c, 0x4f, 0x2d, 0xd6, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0x4e, 0xce, 0x48, 0xcc, 0xcc, 0xd3, + 0x2f, 0xc8, 0x4f, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x12, 0x87, 0x29, 0xd2, 0x43, 0x28, 0xd2, 0x2b, 0xc8, 0x4f, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x64, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, + 0x13, 0x0b, 0x32, 0xf5, 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0xa1, + 0xb2, 0x2a, 0xb8, 0x6c, 0x2c, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0xaa, 0x52, 0x12, 0xe1, 0x12, 0x0a, + 0x04, 0xb9, 0x20, 0x00, 0x2c, 0x18, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0xa2, 0x14, 0xc2, 0x25, + 0x8c, 0x22, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x64, 0xcb, 0xc5, 0x06, 0xd1, 0x2c, 0xc1, + 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xaf, 0x87, 0xc3, 0xc1, 0x7a, 0x10, 0x8d, 0x4e, 0x2c, 0x27, + 0xee, 0xc9, 0x33, 0x04, 0x41, 0x35, 0x19, 0xb5, 0x31, 0x72, 0xb1, 0x82, 0x8d, 0x15, 0xaa, 0xe5, + 0x62, 0x83, 0xa8, 0x10, 0xd2, 0xc6, 0x69, 0x04, 0xa6, 0xb3, 0xa4, 0x74, 0x88, 0x53, 0x0c, 0x71, + 0xad, 0x92, 0x44, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0x84, 0x84, 0x04, 0xf4, 0x53, 0x2b, 0x8a, 0x0a, + 0x90, 0xbc, 0xee, 0xe4, 0x7e, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, + 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xba, + 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x15, 0x45, 0x05, 0x39, 0xa9, + 0x65, 0xb9, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0xfa, 0x65, 0x96, 0xfa, 0x15, 0x60, 0x23, 0x4a, 0x2a, + 0x0b, 0x52, 0x8b, 0xf5, 0x73, 0x52, 0xd3, 0x13, 0x93, 0x2b, 0x93, 0xd8, 0xc0, 0x81, 0x68, 0x0c, + 0x08, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x7c, 0xf3, 0x28, 0xde, 0x01, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/packages.blockchain.poa.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/packages.blockchain.poa.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "packages.blockchain.poa.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "packages/blockchain/poa/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/poa/types/legacy/query.pb.gw.go b/x/poa/types/legacy/query.pb.gw.go new file mode 100644 index 0000000..e193255 --- /dev/null +++ b/x/poa/types/legacy/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: packages/blockchain/poa/query.proto + +/* +Package legacy is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package legacy + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"exrp", "poa", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/poa/types/legacy/tx.pb.go b/x/poa/types/legacy/tx.pb.go new file mode 100644 index 0000000..c5d192a --- /dev/null +++ b/x/poa/types/legacy/tx.pb.go @@ -0,0 +1,1096 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packages/blockchain/poa/tx.proto + +package legacy + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + types "github.com/cosmos/cosmos-sdk/x/staking/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgAddValidator defines a message for adding a new validator +type MsgAddValidator struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Description types.Description `protobuf:"bytes,3,opt,name=description,proto3" json:"description"` + Pubkey *types1.Any `protobuf:"bytes,4,opt,name=pubkey,proto3" json:"pubkey,omitempty"` +} + +func (m *MsgAddValidator) Reset() { *m = MsgAddValidator{} } +func (m *MsgAddValidator) String() string { return proto.CompactTextString(m) } +func (*MsgAddValidator) ProtoMessage() {} +func (*MsgAddValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_22361659a4d452f4, []int{0} +} +func (m *MsgAddValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddValidator.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddValidator.Merge(m, src) +} +func (m *MsgAddValidator) XXX_Size() int { + return m.Size() +} +func (m *MsgAddValidator) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddValidator proto.InternalMessageInfo + +func (m *MsgAddValidator) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgAddValidator) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *MsgAddValidator) GetDescription() types.Description { + if m != nil { + return m.Description + } + return types.Description{} +} + +func (m *MsgAddValidator) GetPubkey() *types1.Any { + if m != nil { + return m.Pubkey + } + return nil +} + +// MsgAddValidatorResponse defines the response for adding a new validator +type MsgAddValidatorResponse struct { +} + +func (m *MsgAddValidatorResponse) Reset() { *m = MsgAddValidatorResponse{} } +func (m *MsgAddValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddValidatorResponse) ProtoMessage() {} +func (*MsgAddValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_22361659a4d452f4, []int{1} +} +func (m *MsgAddValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddValidatorResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddValidatorResponse.Merge(m, src) +} +func (m *MsgAddValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddValidatorResponse proto.InternalMessageInfo + +// MsgRemoveValidator defines a message for removing an existing validator +type MsgRemoveValidator struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *MsgRemoveValidator) Reset() { *m = MsgRemoveValidator{} } +func (m *MsgRemoveValidator) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveValidator) ProtoMessage() {} +func (*MsgRemoveValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_22361659a4d452f4, []int{2} +} +func (m *MsgRemoveValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveValidator.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveValidator.Merge(m, src) +} +func (m *MsgRemoveValidator) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveValidator) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveValidator proto.InternalMessageInfo + +func (m *MsgRemoveValidator) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRemoveValidator) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +// MsgRemoveValidatorResponse defines the response for removing an existing +// validator +type MsgRemoveValidatorResponse struct { +} + +func (m *MsgRemoveValidatorResponse) Reset() { *m = MsgRemoveValidatorResponse{} } +func (m *MsgRemoveValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveValidatorResponse) ProtoMessage() {} +func (*MsgRemoveValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_22361659a4d452f4, []int{3} +} +func (m *MsgRemoveValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveValidatorResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveValidatorResponse.Merge(m, src) +} +func (m *MsgRemoveValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveValidatorResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgAddValidator)(nil), "packages.blockchain.poa.MsgAddValidator") + proto.RegisterType((*MsgAddValidatorResponse)(nil), "packages.blockchain.poa.MsgAddValidatorResponse") + proto.RegisterType((*MsgRemoveValidator)(nil), "packages.blockchain.poa.MsgRemoveValidator") + proto.RegisterType((*MsgRemoveValidatorResponse)(nil), "packages.blockchain.poa.MsgRemoveValidatorResponse") +} + +func init() { proto.RegisterFile("packages/blockchain/poa/tx.proto", fileDescriptor_22361659a4d452f4) } + +var fileDescriptor_22361659a4d452f4 = []byte{ + // 517 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x6b, 0xd4, 0x40, + 0x14, 0xdf, 0xb4, 0x5a, 0xd8, 0xa9, 0x58, 0x1b, 0x16, 0x36, 0x0d, 0x1a, 0x97, 0xd5, 0xc3, 0x52, + 0xe9, 0x8c, 0x6d, 0x41, 0xd0, 0xdb, 0x2e, 0xfe, 0x01, 0x65, 0xa1, 0x44, 0xf0, 0xe0, 0xa5, 0x4c, + 0x92, 0x71, 0x36, 0xee, 0x26, 0x6f, 0xc8, 0x4c, 0xc2, 0xe6, 0x26, 0x7e, 0x02, 0xbf, 0x83, 0x17, + 0x8f, 0x3d, 0x78, 0xf7, 0x5a, 0x3c, 0x15, 0x4f, 0x9e, 0x44, 0x76, 0x0f, 0x3d, 0xf9, 0x1d, 0x24, + 0xff, 0x8c, 0xee, 0xb2, 0xa2, 0xf4, 0x92, 0xe4, 0xe5, 0xf7, 0x67, 0xde, 0xfb, 0xf1, 0x18, 0xd4, + 0x11, 0xd4, 0x1d, 0x53, 0xce, 0x24, 0x71, 0x26, 0xe0, 0x8e, 0xdd, 0x11, 0xf5, 0x43, 0x22, 0x80, + 0x12, 0x35, 0xc5, 0x22, 0x02, 0x05, 0x7a, 0xbb, 0x62, 0xe0, 0x9a, 0x81, 0x05, 0x50, 0xb3, 0xc5, + 0x81, 0x43, 0xce, 0x21, 0xd9, 0x57, 0x41, 0x37, 0x77, 0x5c, 0x90, 0x01, 0xc8, 0xe3, 0x02, 0x28, + 0x8a, 0x12, 0x6a, 0x17, 0x15, 0x09, 0x24, 0x27, 0xc9, 0x7e, 0xf6, 0x2a, 0x81, 0xdb, 0x25, 0x20, + 0x15, 0x1d, 0xfb, 0x61, 0x06, 0x3a, 0x4c, 0xd1, 0xfd, 0xaa, 0xae, 0x9c, 0x39, 0x00, 0x9f, 0x30, + 0x92, 0x57, 0x4e, 0xfc, 0x8a, 0xd0, 0x30, 0x2d, 0xa1, 0x6d, 0x1a, 0xf8, 0x21, 0x90, 0xfc, 0x59, + 0xfc, 0xea, 0x7e, 0x5a, 0x43, 0x5b, 0x43, 0xc9, 0xfb, 0x9e, 0xf7, 0x82, 0x4e, 0x7c, 0x8f, 0x2a, + 0x88, 0xf4, 0x7b, 0xa8, 0x49, 0x63, 0x35, 0x82, 0xc8, 0x57, 0xa9, 0xa1, 0x75, 0xb4, 0x5e, 0x73, + 0x60, 0x7c, 0xf9, 0xb8, 0xd7, 0x2a, 0xbb, 0xec, 0x7b, 0x5e, 0xc4, 0xa4, 0x7c, 0xae, 0x22, 0x3f, + 0xe4, 0x76, 0x4d, 0xd5, 0x9f, 0xa2, 0xed, 0xa4, 0x32, 0x39, 0xa6, 0x05, 0xcb, 0x58, 0xcb, 0xf5, + 0x37, 0x56, 0xe9, 0x3f, 0x9c, 0x9f, 0xec, 0x36, 0xec, 0x6b, 0xbf, 0x74, 0x25, 0xa8, 0x1f, 0xa1, + 0x4d, 0x8f, 0x49, 0x37, 0xf2, 0x85, 0xf2, 0x21, 0x34, 0xd6, 0x3b, 0x5a, 0x6f, 0xf3, 0xe0, 0x16, + 0x2e, 0x2d, 0xaa, 0x89, 0xcb, 0x04, 0xf0, 0xc3, 0x9a, 0x3a, 0x68, 0x9e, 0x7e, 0xbb, 0xd9, 0xc8, + 0x6c, 0x35, 0xfb, 0x77, 0x0b, 0xfd, 0x31, 0xda, 0x10, 0xb1, 0x33, 0x66, 0xa9, 0x71, 0x29, 0x37, + 0x6b, 0xe1, 0x22, 0x28, 0x5c, 0x05, 0x85, 0xfb, 0x61, 0x3a, 0x30, 0x3e, 0xd7, 0x8d, 0xba, 0x51, + 0x2a, 0x14, 0xe0, 0xa3, 0xd8, 0x79, 0xc6, 0x52, 0xbb, 0x54, 0x3f, 0xb8, 0xfa, 0xf6, 0xfc, 0x64, + 0xb7, 0x9e, 0xba, 0xbb, 0x83, 0xda, 0x0b, 0x01, 0xda, 0x4c, 0x0a, 0x08, 0x25, 0xeb, 0xbe, 0xd7, + 0x90, 0x3e, 0x94, 0xdc, 0x66, 0x01, 0x24, 0xec, 0xe2, 0xf9, 0x3e, 0x5a, 0x9d, 0xef, 0x6a, 0xfd, + 0x52, 0xb4, 0x4b, 0x03, 0x5c, 0x47, 0xe6, 0x72, 0x93, 0xd5, 0x0c, 0x07, 0x3f, 0x34, 0xb4, 0x3e, + 0x94, 0x5c, 0x7f, 0x8d, 0xae, 0xfc, 0xb1, 0x24, 0x3d, 0xbc, 0x62, 0xe1, 0xf1, 0x42, 0x1a, 0xe6, + 0xdd, 0x7f, 0x65, 0x56, 0x67, 0xea, 0x12, 0x6d, 0x2d, 0x66, 0x76, 0xe7, 0x6f, 0x26, 0x0b, 0x64, + 0xf3, 0xf0, 0x3f, 0xc8, 0xd5, 0xa1, 0xe6, 0xe5, 0x37, 0xd9, 0xce, 0x0c, 0x9e, 0x9c, 0xce, 0x2c, + 0xed, 0x6c, 0x66, 0x69, 0xdf, 0x67, 0x96, 0xf6, 0x6e, 0x6e, 0x35, 0xce, 0xe6, 0x56, 0xe3, 0xeb, + 0xdc, 0x6a, 0xbc, 0xdc, 0xe3, 0xbe, 0x1a, 0xc5, 0x0e, 0x76, 0x21, 0x20, 0xd3, 0x48, 0x4c, 0x58, + 0x12, 0x90, 0x10, 0x3c, 0x46, 0x92, 0xfb, 0x64, 0x5a, 0x5c, 0x06, 0xa9, 0x60, 0x92, 0x4c, 0x18, + 0xa7, 0x6e, 0xea, 0x6c, 0xe4, 0x7b, 0x75, 0xf8, 0x33, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x5e, 0x5d, + 0x93, 0x3b, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // Adds a new validator into the authority + AddValidator(ctx context.Context, in *MsgAddValidator, opts ...grpc.CallOption) (*MsgAddValidatorResponse, error) + // Removes an existing validator from the authority + RemoveValidator(ctx context.Context, in *MsgRemoveValidator, opts ...grpc.CallOption) (*MsgRemoveValidatorResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) AddValidator(ctx context.Context, in *MsgAddValidator, opts ...grpc.CallOption) (*MsgAddValidatorResponse, error) { + out := new(MsgAddValidatorResponse) + err := c.cc.Invoke(ctx, "/packages.blockchain.poa.Msg/AddValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RemoveValidator(ctx context.Context, in *MsgRemoveValidator, opts ...grpc.CallOption) (*MsgRemoveValidatorResponse, error) { + out := new(MsgRemoveValidatorResponse) + err := c.cc.Invoke(ctx, "/packages.blockchain.poa.Msg/RemoveValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // Adds a new validator into the authority + AddValidator(context.Context, *MsgAddValidator) (*MsgAddValidatorResponse, error) + // Removes an existing validator from the authority + RemoveValidator(context.Context, *MsgRemoveValidator) (*MsgRemoveValidatorResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) AddValidator(ctx context.Context, req *MsgAddValidator) (*MsgAddValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddValidator not implemented") +} +func (*UnimplementedMsgServer) RemoveValidator(ctx context.Context, req *MsgRemoveValidator) (*MsgRemoveValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveValidator not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_AddValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/packages.blockchain.poa.Msg/AddValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddValidator(ctx, req.(*MsgAddValidator)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/packages.blockchain.poa.Msg/RemoveValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveValidator(ctx, req.(*MsgRemoveValidator)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "packages.blockchain.poa.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddValidator", + Handler: _Msg_AddValidator_Handler, + }, + { + MethodName: "RemoveValidator", + Handler: _Msg_RemoveValidator_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "packages/blockchain/poa/tx.proto", +} + +func (m *MsgAddValidator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pubkey != nil { + { + size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddValidatorResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRemoveValidator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveValidatorResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgAddValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAddValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRemoveValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRemoveValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgAddValidator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pubkey == nil { + m.Pubkey = &types1.Any{} + } + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddValidatorResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveValidator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveValidatorResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) From 8d389d5beca1411fa214e5ed32790d368c332339 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Fri, 19 Sep 2025 15:46:51 +0200 Subject: [PATCH 65/66] fi(app): remove evm mempool support --- app/app.go | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/app/app.go b/app/app.go index 4b03b31..f61f6c9 100644 --- a/app/app.go +++ b/app/app.go @@ -10,8 +10,6 @@ import ( "cosmossdk.io/client/v2/autocli" "cosmossdk.io/core/appmodule" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" - "github.com/cosmos/cosmos-sdk/x/auth/posthandler" "github.com/ethereum/go-ethereum/common" @@ -48,7 +46,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - evmmempool "github.com/cosmos/evm/mempool" vmmod "github.com/cosmos/evm/x/vm" "github.com/xrplevm/node/v9/x/poa" @@ -234,7 +231,6 @@ type App struct { EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper Erc20Keeper erc20keeper.Keeper - EVMMempool *evmmempool.ExperimentalEVMMempool // exrp keepers PoaKeeper poakeeper.Keeper @@ -795,45 +791,6 @@ func New( app.setAnteHandler(app.txConfig, cast.ToUint64(appOpts.Get(srvflags.EVMMaxTxGasWanted))) - if evmtypes.GetChainConfig() != nil { - mempoolConfig := &evmmempool.EVMMempoolConfig{ - AnteHandler: app.GetAnteHandler(), - BlockGasLimit: 100_000_000, - } - - evmMempool := evmmempool.NewExperimentalEVMMempool( - app.CreateQueryContext, - logger, - app.EvmKeeper, - app.FeeMarketKeeper, - app.txConfig, - app.clientCtx, - mempoolConfig, - ) - app.EVMMempool = evmMempool - - // Set the global mempool for RPC access - if err := evmmempool.SetGlobalEVMMempool(evmMempool); err != nil { - panic(err) - } - - // Replace BaseApp mempool - app.SetMempool(evmMempool) - - // Set custom CheckTx handler for nonce gap support - checkTxHandler := evmmempool.NewCheckTxHandler(evmMempool) - app.SetCheckTxHandler(checkTxHandler) - - // Set custom PrepareProposal handler - abciProposalHandler := baseapp.NewDefaultProposalHandler(evmMempool, app) - abciProposalHandler.SetSignerExtractionAdapter( - evmmempool.NewEthSignerExtractionAdapter( - sdkmempool.NewDefaultSignerExtractionAdapter(), - ), - ) - app.SetPrepareProposal(abciProposalHandler.PrepareProposalHandler()) - } - app.setPostHandler() app.setupUpgradeHandlers() @@ -1084,10 +1041,6 @@ func (app *App) GetStakingKeeperSDK() *stakingkeeper.Keeper { return app.StakingKeeper } -// func (app *App) GetMempool() sdkmempool.ExtMempool { -// return app.EVMMempool -//} - func (app *App) GetAnteHandler() sdk.AnteHandler { return app.BaseApp.AnteHandler() } From 09849ac83f46b9dd9a7f32e59d29bf86385584b9 Mon Sep 17 00:00:00 2001 From: GuillemGarciaDev Date: Mon, 22 Sep 2025 10:39:26 +0200 Subject: [PATCH 66/66] fix: remove state-sync script --- state_sync.sh | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100755 state_sync.sh diff --git a/state_sync.sh b/state_sync.sh deleted file mode 100755 index cf9d982..0000000 --- a/state_sync.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -SNAP_RPC="https://xrp-testnet-rpc.polkachu.com:443" - -LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \ -BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \ -TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) - -sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \ -s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \ -s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \ -s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.exrpd/config/config.toml \ No newline at end of file