diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a4fce7b35..ea2efa6f2 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -281,7 +281,7 @@ jobs: - name: build go test binary run: cd integration_tests && go test -c - name: Run all up ci test - run: ./integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m Test${{ matrix.test_type }} + run: ./integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m Test${{ matrix.test_type }} env: E2E_SKIP_CLEANUP: true ARCHIVE_NODE_URL: https://eth-mainnet.alchemyapi.io/v2/${{ secrets.ALCHEMY_ID }} diff --git a/.gitignore b/.gitignore index 547ef5086..fe3872778 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ artifacts build/ .env +module/coverage.txt diff --git a/Makefile b/Makefile index 6ab16ace7..7e626befb 100644 --- a/Makefile +++ b/Makefile @@ -48,15 +48,15 @@ fail: @false e2e_happy_path: e2e_clean_slate - integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestHappyPath || make -s fail + integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestHappyPath || make -s fail e2e_valset_update: e2e_clean_slate - integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValsetUpdate || make -s fail + integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValsetUpdate || make -s fail e2e_validator_out: e2e_clean_slate - integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorOut || make -s fail + integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorOut || make -s fail e2e_transaction_stress: e2e_clean_slate - integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestTransactionStress || make -s fail + integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestTransactionStress || make -s fail diff --git a/integration_tests/ethereum/addresses.js b/integration_tests/ethereum/addresses.js index a219fa697..3257c0c66 100644 --- a/integration_tests/ethereum/addresses.js +++ b/integration_tests/ethereum/addresses.js @@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.VALIDATORS = exports.WHALE = void 0; exports.WHALE = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'; exports.VALIDATORS = [ - '0xd312f0f1B39D54Db2829537595fC1167B14d4b34', + '0x14fdAC734De10065093C4Ed4a83C41638378005A', '0x7bE2a04df4b9C3227928147461e19158eB2B11d1', '0xb8c6886FDDa38adaa0F416722dd5554886C43055', - '0x14fdAC734De10065093C4Ed4a83C41638378005A' + '0xd312f0f1B39D54Db2829537595fC1167B14d4b34', ]; diff --git a/integration_tests/ethereum/addresses.ts b/integration_tests/ethereum/addresses.ts index cd1361b0c..41dbd03c4 100644 --- a/integration_tests/ethereum/addresses.ts +++ b/integration_tests/ethereum/addresses.ts @@ -1,7 +1,7 @@ export const WHALE = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'; export const VALIDATORS = [ - '0xd312f0f1B39D54Db2829537595fC1167B14d4b34', + '0x14fdAC734De10065093C4Ed4a83C41638378005A', '0x7bE2a04df4b9C3227928147461e19158eB2B11d1', '0xb8c6886FDDa38adaa0F416722dd5554886C43055', - '0x14fdAC734De10065093C4Ed4a83C41638378005A' -] \ No newline at end of file + '0xd312f0f1B39D54Db2829537595fC1167B14d4b34', +] diff --git a/go.mod b/integration_tests/go.mod similarity index 93% rename from go.mod rename to integration_tests/go.mod index af7a709e6..e21521493 100644 --- a/go.mod +++ b/integration_tests/go.mod @@ -1,4 +1,4 @@ -module github.com/peggyjv/gravity-bridge/v3 +module github.com/peggyjv/gravity-bridge/integration-tests go 1.18 @@ -7,8 +7,8 @@ require ( github.com/cosmos/go-bip39 v1.0.0 github.com/ethereum/go-ethereum v1.10.22 github.com/miguelmota/go-ethereum-hdwallet v0.1.1 - github.com/ory/dockertest/v3 v3.9.1 - github.com/peggyjv/gravity-bridge/module/v3 v3.0.0-20230420190248-79b4b232781d + github.com/ory/dockertest/v3 v3.10.0 + github.com/peggyjv/gravity-bridge/module/v3 v3.0.0 github.com/spf13/viper v1.14.0 github.com/stretchr/testify v1.8.1 github.com/tendermint/tendermint v0.34.22 @@ -20,7 +20,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.5 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect @@ -52,7 +52,7 @@ require ( github.com/dgraph-io/badger/v2 v2.2007.2 // indirect github.com/dgraph-io/ristretto v0.0.3 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/cli v20.10.14+incompatible // indirect + github.com/docker/cli v20.10.17+incompatible // indirect github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect @@ -105,7 +105,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect - github.com/opencontainers/runc v1.1.3 // indirect + github.com/opencontainers/runc v1.1.5 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect @@ -144,10 +144,12 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.4.0 // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/mod v0.9.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect + golang.org/x/tools v0.7.0 // indirect google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect google.golang.org/grpc v1.52.0 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -163,3 +165,5 @@ replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alp replace github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.22 replace github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 + +replace github.com/peggyjv/gravity-bridge/module/v3 => ../module diff --git a/go.sum b/integration_tests/go.sum similarity index 98% rename from go.sum rename to integration_tests/go.sum index b7cd3b2f1..456a103b6 100644 --- a/go.sum +++ b/integration_tests/go.sum @@ -69,8 +69,8 @@ github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= @@ -259,8 +259,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/cli v20.10.14+incompatible h1:dSBKJOVesDgHo7rbxlYjYsXe7gPzrTT+/cKQgpDAazg= -github.com/docker/cli v20.10.14+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= +github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -722,8 +722,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= +github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -736,8 +736,8 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= -github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= -github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= +github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= +github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -746,8 +746,6 @@ 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 v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/peggyjv/gravity-bridge/module/v3 v3.0.0-20230420190248-79b4b232781d h1:iJiwyPyTCqyDeQETW2bcbOAPRUULpGQXVJe1yAHbWXU= -github.com/peggyjv/gravity-bridge/module/v3 v3.0.0-20230420190248-79b4b232781d/go.mod h1:6hJ61P6sBw3dVBBt+qMCXj2SJjq1Qf/1miKOtDaYWEI= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -1065,6 +1063,8 @@ 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.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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= @@ -1115,8 +1115,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210525063256-abc453219eb5/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.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 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= @@ -1224,12 +1224,12 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/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-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= 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= @@ -1239,8 +1239,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 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= @@ -1307,6 +1307,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f 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.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= 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= @@ -1469,7 +1471,7 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= 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= diff --git a/integration_tests/gorc_bootstrap.sh b/integration_tests/gorc_bootstrap.sh index 18d724045..92a0bf145 100755 --- a/integration_tests/gorc_bootstrap.sh +++ b/integration_tests/gorc_bootstrap.sh @@ -7,4 +7,4 @@ gorc --config=/root/gorc/config.toml keys cosmos recover orch-key "$ORCH_MNEMONI gorc --config=/root/gorc/config.toml keys eth import orch-eth-key $ETH_PRIV_KEY # start gorc orchestrator -gorc --config=/root/gorc/config.toml orchestrator start --cosmos-key=orch-key --ethereum-key=orch-eth-key +RUST_LOG="info" gorc --config=/root/gorc/config.toml orchestrator start --cosmos-key=orch-key --ethereum-key=orch-eth-key diff --git a/integration_tests/happy_path_test.go b/integration_tests/happy_path_test.go index c4954029e..0d2e2cfe5 100644 --- a/integration_tests/happy_path_test.go +++ b/integration_tests/happy_path_test.go @@ -22,9 +22,9 @@ func (s *IntegrationTestSuite) TestHappyPath() { s.Require().NoError(err, "error getting allowance of gravity contract spending on behalf of first validator") s.Require().Equal(UInt256Max(), allowance.BigInt(), "spending allowance not set correctly, got: %s", allowance.String()) - balance, err := s.getEthTokenBalanceOf(common.HexToAddress(s.chain.validators[0].ethereumKey.address), testERC20contract) + initialBalance, err := s.getEthTokenBalanceOf(common.HexToAddress(s.chain.validators[0].ethereumKey.address), testERC20contract) s.Require().NoError(err, "error getting first validator balance") - s.Require().Equal(sdk.NewUint(10000).BigInt(), balance.BigInt(), "balance was %s, expected 10000", balance.String()) + s.Require().Equal(sdk.NewUint(10000).BigInt(), initialBalance.BigInt(), "balance was %s, expected 10000", initialBalance.String()) for _, val := range s.chain.validators { kb, err := val.keyring() @@ -188,16 +188,27 @@ func (s *IntegrationTestSuite) TestHappyPath() { return true }, 180*time.Second, 10*time.Second, "unable to verify ERC20 deployment") + erc20Res, err := gbQueryClient.DenomToERC20(context.Background(), + &types.DenomToERC20Request{ + Denom: testDenom, + }, + ) + s.Require().NoError(err, "error querying ERC20 for testgb denom") + erc20Contract := common.HexToAddress(erc20Res.Erc20) + initialBalance, err = s.getEthTokenBalanceOf(common.HexToAddress(s.chain.validators[2].ethereumKey.address), erc20Contract) + s.Require().NoError(err, "error getting destination balance") + s.T().Logf("create governance proposal to fund an ethereum address") orch = s.chain.orchestrators[0] clientCtx, err = s.chain.clientContext("tcp://localhost:26657", orch.keyring, "orch", orch.keyInfo.GetAddress()) s.Require().NoError(err) + sendAmount := int64(900000000) proposal := types.CommunityPoolEthereumSpendProposal{ Title: "community pool spend ethereum", Description: "community pool spend ethereum", Recipient: s.chain.validators[2].ethereumKey.address, - Amount: sdk.NewCoin(testDenom, sdk.NewInt(900000000)), + Amount: sdk.NewCoin(testDenom, sdk.NewInt(sendAmount)), BridgeFee: sdk.NewCoin(testDenom, sdk.NewInt(1000000)), } @@ -246,25 +257,20 @@ func (s *IntegrationTestSuite) TestHappyPath() { return govtypes.StatusPassed == proposalQueryResponse.Proposal.Status }, time.Second*30, time.Second*5, "proposal was never accepted") - erc20Res, err := gbQueryClient.DenomToERC20(context.Background(), - &types.DenomToERC20Request{ - Denom: testDenom, - }, - ) - s.Require().NoError(err, "error querying ERC20 for testgb denom") - erc20Contract := common.HexToAddress(erc20Res.Erc20) - + s.T().Logf("initial balance of %s of token %s is %v", s.chain.validators[2].ethereumKey.address, erc20Contract.Hex(), initialBalance) s.T().Log("waiting for community funds to reach destination") s.Require().Eventuallyf(func() bool { + s.T().Logf("getting balance in %s of token %s", s.chain.validators[2].ethereumKey.address, erc20Contract.Hex()) balance, err := s.getEthTokenBalanceOf(common.HexToAddress(s.chain.validators[2].ethereumKey.address), erc20Contract) s.Require().NoError(err, "error getting destination balance") + s.T().Logf("balance is %v", balance) - if balance.LT(sdk.NewInt(900000000)) { + if balance.LT(sdk.NewInt(sendAmount)) { s.T().Logf("funds not received yet, dest balance: %s", balance.String()) return false } - s.Require().Equal(balance.BigInt(), sdk.NewInt(900000000).BigInt(), "balance was %s, expected 900000000", balance.String()) + s.Require().Equal(balance.BigInt(), sdk.NewInt(sendAmount).BigInt(), "balance was %s, expected %v", balance.String(), sendAmount) return true }, time.Second*180, time.Second*10, "community funds did not reach destination") }) diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index c26de4fe8..19610ae0d 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -344,7 +344,10 @@ func (s *IntegrationTestSuite) initGenesis() { s.Require().NoError(cdc.UnmarshalJSON(appGenState[gravitytypes.ModuleName], &gravityGenState)) gravityGenState.Params.GravityId = "gravitytest" gravityGenState.Params.BridgeEthereumAddress = gravityContract.String() - gravityGenState.Params.SignedBatchesWindow = 35 + gravityGenState.Params.ConfirmedOutgoingTxWindow = 100 + gravityGenState.Params.TargetEthTxTimeout = 3600000 + gravityGenState.Params.AverageBlockTime = 1000 + gravityGenState.Params.AverageEthereumBlockTime = 1000 bz, err = cdc.MarshalJSON(&gravityGenState) s.Require().NoError(err) @@ -693,7 +696,7 @@ msg_batch_size = 5 return strings.Contains(containerLogsBuf.String(), match) }, 3*time.Minute, - 20*time.Second, + 1*time.Second, "orchestrator %s not healthy", resource.Container.ID, ) diff --git a/integration_tests/validator_out.go b/integration_tests/validator_out.go index ff2ebab41..ac12de667 100644 --- a/integration_tests/validator_out.go +++ b/integration_tests/validator_out.go @@ -73,7 +73,7 @@ func (s *IntegrationTestSuite) TestValidatorOut() { return false }, 105*time.Second, 10*time.Second, "balance never found on cosmos") - s.T().Logf("sending to ethereum") + s.T().Logf("submitting SendToEthereum") sendToEthereumMsg := types.NewMsgSendToEthereum( s.chain.validators[1].keyInfo.GetAddress(), s.chain.validators[1].ethereumKey.address, @@ -82,7 +82,6 @@ func (s *IntegrationTestSuite) TestValidatorOut() { ) s.dockerPool.RemoveContainerByName("orchestrator3") - s.dockerPool.RemoveContainerByName("orchestrator2") // Send NewMsgSendToEthereum Message s.Require().Eventuallyf(func() bool { @@ -107,6 +106,7 @@ func (s *IntegrationTestSuite) TestValidatorOut() { }, 5*time.Minute, 10*time.Second, "unable to send to ethereum") // Confirm batchtx signatures + s.T().Log("waiting for batch tx confirms") s.Require().Eventuallyf(func() bool { keyRing, err := s.chain.validators[3].keyring() s.Require().NoError(err) @@ -115,13 +115,12 @@ func (s *IntegrationTestSuite) TestValidatorOut() { s.Require().NoError(err) queryClient := types.NewQueryClient(clientCtx) res, err := queryClient.BatchTxConfirmations(context.Background(), &types.BatchTxConfirmationsRequest{BatchNonce: 1, TokenContract: testERC20contract.String()}) - s.Require().NotEmpty(res.GetSignatures()) - return true - }, 5*time.Minute, 1*time.Minute, "Can't find Batchtx signing info") + return len(res.GetSignatures()) != 0 + }, 5*time.Minute, 10*time.Second, "Can't find Batchtx signing info") // Check jail status of validators + s.T().Logf("waiting for validator 3 to become jailed") s.Require().Eventuallyf(func() bool { - observed_jailing := true orchKey := s.chain.validators[3] keyring, err := orchKey.keyring() s.Require().NoError(err) @@ -129,41 +128,34 @@ func (s *IntegrationTestSuite) TestValidatorOut() { clientCtx, err := s.chain.clientContext("tcp://localhost:26657", &keyring, "val", s.chain.validators[3].keyInfo.GetAddress()) s.Require().NoError(err) newQ := stakingtypes.NewQueryClient(clientCtx) - valThree, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[3].keyInfo.GetAddress()).String()}) + + val0, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[0].keyInfo.GetAddress()).String()}) if err != nil { s.T().Logf("error: %s", err) return false } - if !valThree.GetValidator().IsJailed() { - observed_jailing = false - s.T().Logf("validator 3 not jailed yet") - } + s.Require().False(val0.GetValidator().IsJailed()) - valTwo, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[2].keyInfo.GetAddress()).String()}) + val1, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[1].keyInfo.GetAddress()).String()}) if err != nil { s.T().Logf("error: %s", err) return false } - if !valTwo.GetValidator().IsJailed() { - observed_jailing = false - s.T().Logf("validator 2 not jailed yet") - } + s.Require().False(val1.GetValidator().IsJailed()) - valOne, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[1].keyInfo.GetAddress()).String()}) + val2, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[2].keyInfo.GetAddress()).String()}) if err != nil { s.T().Logf("error: %s", err) return false } - s.Require().False(valOne.GetValidator().IsJailed()) + s.Require().False(val2.GetValidator().IsJailed()) - valZero, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[0].keyInfo.GetAddress()).String()}) + val3, err := newQ.Validator(context.Background(), &stakingtypes.QueryValidatorRequest{ValidatorAddr: sdk.ValAddress(s.chain.validators[3].keyInfo.GetAddress()).String()}) if err != nil { s.T().Logf("error: %s", err) return false } - s.Require().False(valZero.GetValidator().IsJailed()) - - return observed_jailing - }, 10*time.Minute, 1*time.Minute, "can't confirm jailing status") + return val3.GetValidator().IsJailed() + }, 5*time.Minute, 5*time.Second, "can't confirm jailing status") }) } diff --git a/module/Makefile b/module/Makefile index 28b1f84bc..5c2fe8f30 100644 --- a/module/Makefile +++ b/module/Makefile @@ -1,4 +1,4 @@ -PACKAGES=$(shell go list ./... | grep -v '/simulation') +PACKAGES=$(shell go list ./... | grep -v '/simulation\|/migrations') VERSION := $(shell git describe --abbrev=6 --dirty --always --tags) COMMIT := $(shell git log -1 --format='%H') DOCKER := $(shell which docker) diff --git a/module/proto/gravity/v1/genesis.proto b/module/proto/gravity/v1/genesis.proto index ddda90e5c..a73a7540e 100644 --- a/module/proto/gravity/v1/genesis.proto +++ b/module/proto/gravity/v1/genesis.proto @@ -100,6 +100,8 @@ message Params { (gogoproto.nullable) = false ]; uint64 unbond_slashing_signer_set_txs_window = 17; + uint64 ethereum_event_vote_window = 18; + uint64 confirmed_outgoing_tx_window = 19; } // GenesisState struct diff --git a/module/proto/gravity/v1/query.proto b/module/proto/gravity/v1/query.proto index ae75e1682..f1c7d66f2 100644 --- a/module/proto/gravity/v1/query.proto +++ b/module/proto/gravity/v1/query.proto @@ -3,8 +3,10 @@ package gravity.v1; import "cosmos/base/query/v1beta1/pagination.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "google/protobuf/any.proto"; import "gravity/v1/genesis.proto"; import "gravity/v1/gravity.proto"; import "gravity/v1/msgs.proto"; @@ -16,36 +18,26 @@ service Query { // Module parameters query rpc Params(ParamsRequest) returns (ParamsResponse) { - // option (google.api.http).get = "/gravity/v1/params"; } // get info on individual outgoing data rpc SignerSetTx(SignerSetTxRequest) returns (SignerSetTxResponse) { - // option (google.api.http).get = "/gravity/v1/signer_set"; } rpc LatestSignerSetTx(LatestSignerSetTxRequest) returns (SignerSetTxResponse) { - // option (google.api.http).get = "/gravity/v1/signer_set/latest"; } rpc BatchTx(BatchTxRequest) returns (BatchTxResponse) { - // option (google.api.http).get = - // "/gravity/v1/batch_txs/{token_contract}/{nonce}"; } rpc ContractCallTx(ContractCallTxRequest) returns (ContractCallTxResponse) { - // option (google.api.http).get = - // "/gravity/v1/contract_call_txs/{invalidation_id}/{invalidation_nonce}"; } // get collections of outgoing traffic from the bridge rpc SignerSetTxs(SignerSetTxsRequest) returns (SignerSetTxsResponse) { - // option (google.api.http).get = "/gravity/v1/signer_sets"; } rpc BatchTxs(BatchTxsRequest) returns (BatchTxsResponse) { - // option (google.api.http).get = "/gravity/v1/batch/batch_txs"; } rpc ContractCallTxs(ContractCallTxsRequest) returns (ContractCallTxsResponse) { - // option (google.api.http).get = "/gravity/v1/batch/contract_call_txs"; } // ethereum signature queries so validators can construct valid etherum @@ -54,18 +46,12 @@ service Query { // TODO: can/should we group these into one endpoint? rpc SignerSetTxConfirmations(SignerSetTxConfirmationsRequest) returns (SignerSetTxConfirmationsResponse) { - // option (google.api.http).get = - // "/gravity/v1/signer_sets/ethereum_signatures"; } rpc BatchTxConfirmations(BatchTxConfirmationsRequest) returns (BatchTxConfirmationsResponse) { - // option (google.api.http).get = - // "/gravity/v1/batch_txs/ethereum_signatures"; } rpc ContractCallTxConfirmations(ContractCallTxConfirmationsRequest) returns (ContractCallTxConfirmationsResponse) { - // option (google.api.http).get = - // "/gravity/v1/logic_calls/ethereum_signatures"; } // ^^^^^^^^^^^^ seem okay for now ^^^^^^ @@ -75,84 +61,93 @@ service Query { // TODO: can/should we group this into one endpoint? rpc UnsignedSignerSetTxs(UnsignedSignerSetTxsRequest) returns (UnsignedSignerSetTxsResponse) { - // option (google.api.http).get = - // "/gravity/v1/SignerSetTxs/{address}/pending"; } rpc UnsignedBatchTxs(UnsignedBatchTxsRequest) returns (UnsignedBatchTxsResponse) { - // option (google.api.http).get = "/gravity/v1/batches/{address}/pending"; } rpc UnsignedContractCallTxs(UnsignedContractCallTxsRequest) returns (UnsignedContractCallTxsResponse) { - // option (google.api.http).get = - // "/gravity/v1/ContractCallTxs/{address}/pending"; } rpc LastSubmittedEthereumEvent(LastSubmittedEthereumEventRequest) returns (LastSubmittedEthereumEventResponse) { - // option (google.api.http).get = - // "/gravity/v1/oracle/event_nonce/{address}"; } // Queries the fees for all pending batches, results are returned in sdk.Coin // (fee_amount_int)(contract_address) style rpc BatchTxFees(BatchTxFeesRequest) returns (BatchTxFeesResponse) { - // option (google.api.http).get = "/gravity/v1/batches/fees"; } // Query for info about denoms tracked by gravity rpc ERC20ToDenom(ERC20ToDenomRequest) returns (ERC20ToDenomResponse) { - // option (google.api.http).get = - // "/gravity/v1/cosmos_originated/erc20_to_denom"; } // DenomToERC20Params implements a query that allows ERC-20 parameter // information to be retrieved by a Cosmos base denomination. rpc DenomToERC20Params(DenomToERC20ParamsRequest) - returns (DenomToERC20ParamsResponse) {} + returns (DenomToERC20ParamsResponse) { + } // Query for info about denoms tracked by gravity rpc DenomToERC20(DenomToERC20Request) returns (DenomToERC20Response) { - // option (google.api.http).get = - // "/gravity/v1/cosmos_originated/denom_to_erc20"; } // Query for batch send to ethereums rpc BatchedSendToEthereums(BatchedSendToEthereumsRequest) returns (BatchedSendToEthereumsResponse) { - // option (google.api.http).get = "/gravity/v1/query_batched_send_to_eth"; } // Query for unbatched send to ethereums rpc UnbatchedSendToEthereums(UnbatchedSendToEthereumsRequest) returns (UnbatchedSendToEthereumsResponse) { - // option (google.api.http).get = "/gravity/v1/query_unbatched_send_to_eth"; } // delegate keys rpc DelegateKeysByValidator(DelegateKeysByValidatorRequest) returns (DelegateKeysByValidatorResponse) { - // option (google.api.http).get = - // "/gravity/v1/delegate_keys/validator/{validator}"; } rpc DelegateKeysByEthereumSigner(DelegateKeysByEthereumSignerRequest) returns (DelegateKeysByEthereumSignerResponse) { - // option (google.api.http).get = - // "/gravity/v1/delegate_keys/ethereum/{ethereum_signer}"; } rpc DelegateKeysByOrchestrator(DelegateKeysByOrchestratorRequest) returns (DelegateKeysByOrchestratorResponse) { - // option (google.api.http).get = - // "/gravity/v1/delegate_keys/orchestrator/{orchestrator}"; } rpc DelegateKeys(DelegateKeysRequest) returns (DelegateKeysResponse) { - // option (google.api.http).get = - // "/gravity/v1/delegate_keys"; } rpc LastObservedEthereumHeight(LastObservedEthereumHeightRequest) returns (LastObservedEthereumHeightResponse) { - // option (google.api.http).get = - // "/gravity/v1/last_observed_ethereum_height" + } + + rpc CompletedSignerSetTxs(CompletedSignerSetTxsRequest) + returns (CompletedSignerSetTxsResponse) { + } + + rpc CompletedBatchTxs(CompletedBatchTxsRequest) + returns (CompletedBatchTxsResponse) { + } + + rpc CompletedContractCallTxs(CompletedContractCallTxsRequest) + returns (CompletedContractCallTxsResponse) { + } + + rpc BatchTxConfirmationsByValidator(BatchTxConfirmationsByValidatorRequest) + returns (BatchTxConfirmationsByValidatorResponse) { + } + + rpc ContractCallTxConfirmationsByValidator(ContractCallTxConfirmationsByValidatorRequest) + returns (ContractCallTxConfirmationsByValidatorResponse) { + } + + rpc SignerSetTxConfirmationsByValidator(SignerSetTxConfirmationsByValidatorRequest) + returns (SignerSetTxConfirmationsByValidatorResponse) { + } + + rpc EthereumEventVoteRecords(EthereumEventVoteRecordsRequest) + returns (EthereumEventVoteRecordsResponse) { + } + + rpc EthereumEventVotes(EthereumEventVotesRequest) + returns (EthereumEventVotesResponse) { } } @@ -330,4 +325,61 @@ message UnbatchedSendToEthereumsResponse { message LastObservedEthereumHeightRequest {} message LastObservedEthereumHeightResponse { LatestEthereumBlockHeight last_observed_ethereum_height = 1; -} \ No newline at end of file +} + +message CompletedBatchTxsRequest {} +message CompletedBatchTxsResponse { + repeated BatchTx completed_batch_txs = 1; +} + +message CompletedContractCallTxsRequest {} +message CompletedContractCallTxsResponse { + repeated ContractCallTx completed_contract_call_txs = 1; +} + +message CompletedSignerSetTxsRequest {} +message CompletedSignerSetTxsResponse { + repeated SignerSetTx completed_signer_set_txs = 1; +} + +message BatchTxConfirmationsByValidatorRequest { + string validator_address = 1; +} + +message BatchTxConfirmationsByValidatorResponse { + repeated BatchTxConfirmation batch_tx_confirmations = 1; +} + +message ContractCallTxConfirmationsByValidatorRequest { + string validator_address = 1; +} + +message ContractCallTxConfirmationsByValidatorResponse { + repeated ContractCallTxConfirmation contract_call_tx_confirmations = 2; +} + +message SignerSetTxConfirmationsByValidatorRequest { + string validator_address = 1; +} + +message SignerSetTxConfirmationsByValidatorResponse { + repeated SignerSetTxConfirmation signer_set_tx_confirmations = 3; +} + +message EthereumEventVoteRecordsRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message EthereumEventVoteRecordsResponse { + repeated EthereumEventVoteRecord records = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message EthereumEventVotesRequest { + string validator_address = 1; +} + +message EthereumEventVotesResponse { + repeated google.protobuf.Any events = 1 + [ (cosmos_proto.accepts_interface) = "EthereumEvent" ]; +} diff --git a/module/x/gravity/abci.go b/module/x/gravity/abci.go index 9183273cd..cb6df225b 100644 --- a/module/x/gravity/abci.go +++ b/module/x/gravity/abci.go @@ -1,12 +1,9 @@ package gravity import ( - "fmt" "sort" sdk "github.com/cosmos/cosmos-sdk/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/keeper" "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" @@ -22,6 +19,8 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { createSignerSetTxs(ctx, k) createBatchTxs(ctx, k) pruneSignerSetTxs(ctx, k) + pruneCompletedOutgoingTxs(ctx, k) + pruneEthereumEventVoteRecords(ctx, k) } // EndBlocker is called at the end of every block @@ -97,15 +96,53 @@ func pruneSignerSetTxs(ctx sdk.Context, k keeper.Keeper) { currentBlock := uint64(ctx.BlockHeight()) tooEarly := currentBlock < params.SignedSignerSetTxsWindow if lastObserved != nil && !tooEarly { - earliestToPrune := currentBlock - params.SignedSignerSetTxsWindow + earliestToKeep := currentBlock - params.SignedSignerSetTxsWindow for _, set := range k.GetSignerSetTxs(ctx) { - if set.Nonce < lastObserved.Nonce && set.Height < earliestToPrune { + if set.Nonce < lastObserved.Nonce && set.Height < earliestToKeep { + k.DeleteEthereumSignatures(ctx, set.GetStoreIndex()) k.DeleteOutgoingTx(ctx, set.GetStoreIndex()) } } } } +// pruneCompletedOutgoingTxs deletes all completed txs and their signatures whos block height is below the last slashed +// height. This accounts for the corner case where a tx becomes a CompletedOutgoingTx right after its relevant block height +// has been slashed for, since it's possible for a relayer to submit a tx right before its slashing height. +func pruneCompletedOutgoingTxs(ctx sdk.Context, k keeper.Keeper) { + lastSlashed := k.GetLastSlashedOutgoingTxBlockHeight(ctx) + k.IterateCompletedOutgoingTxs(ctx, func(key []byte, cotx types.OutgoingTx) bool { + if cotx.GetCosmosHeight() <= lastSlashed { + k.DeleteCompletedOutgoingTx(ctx, cotx.GetStoreIndex()) + } + return false + }) + +} + +// pruneEthereumEventVoteRecords deletes all event vote records for events that are oustide of the event vote window +func pruneEthereumEventVoteRecords(ctx sdk.Context, k keeper.Keeper) { + lastEthereumHeight := k.GetLastObservedEthereumBlockHeight(ctx).EthereumHeight + window := k.GetParams(ctx).EthereumEventVoteWindow + if lastEthereumHeight < window { + return + } + minEthereumHeight := lastEthereumHeight - window + + k.IterateEthereumEventVoteRecords(ctx, func(key []byte, eventVoteRecord *types.EthereumEventVoteRecord) bool { + event, err := types.UnpackEvent(eventVoteRecord.Event) + if err != nil { + panic(err) + } + + if event.GetEthereumHeight() < minEthereumHeight && eventVoteRecord.Accepted { + k.DeleteEthereumEventVoteRecord(ctx, event.GetEventNonce(), event.Hash()) + } + + return false + }) +} + // Iterate over all attestations currently being voted on in order of nonce and // "Observe" those who have passed the threshold. Break the loop once we see // an attestation that has not passed the threshold @@ -242,6 +279,8 @@ func cleanupTimedOutBatchTxs(ctx sdk.Context, k keeper.Keeper) { btx, _ := otx.(*types.BatchTx) if btx.Timeout < ethereumHeight { + // we keep the data around for slashing in case the timeout was due to a lack of signatures. + k.CompleteOutgoingTx(ctx, btx) k.CancelBatchTx(ctx, btx) } @@ -266,7 +305,8 @@ func cleanupTimedOutContractCallTxs(ctx sdk.Context, k keeper.Keeper) { k.IterateOutgoingTxsByType(ctx, types.ContractCallTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { cctx, _ := otx.(*types.ContractCallTx) if cctx.Timeout < ethereumHeight { - k.DeleteOutgoingTx(ctx, cctx.GetStoreIndex()) + // we keep the data around for slashing in case the timeout was due to a lack of signatures + k.CompleteOutgoingTx(ctx, cctx) } return true }) @@ -275,135 +315,52 @@ func cleanupTimedOutContractCallTxs(ctx sdk.Context, k keeper.Keeper) { func outgoingTxSlashing(ctx sdk.Context, k keeper.Keeper) { params := k.GetParams(ctx) maxHeight := uint64(0) - if uint64(ctx.BlockHeight()) > params.SignedBatchesWindow { - maxHeight = uint64(ctx.BlockHeight()) - params.SignedBatchesWindow + if uint64(ctx.BlockHeight()) > params.ConfirmedOutgoingTxWindow { + maxHeight = uint64(ctx.BlockHeight()) - params.ConfirmedOutgoingTxWindow } else { return } - usotxs := k.GetUnSlashedOutgoingTxs(ctx, maxHeight) + usotxs := k.GetUnslashedOutgoingTxs(ctx, maxHeight) if len(usotxs) == 0 { return } // get signing info for each validator - type valInfo struct { - val stakingtypes.Validator - exist bool - sigs slashingtypes.ValidatorSigningInfo - cons sdk.ConsAddress - } + bondedValidators, bondedValidatorSlashingInfos := k.GetBondedValidatorSlashingInfos(ctx) + unbondingValidators, unbondingValidatorSlashingInfos := k.GetUnbondingValidatorSlashingInfos(ctx) - bondedVals := k.StakingKeeper.GetBondedValidatorsByPower(ctx) - valInfos := make([]valInfo, len(bondedVals)) - - for i, val := range bondedVals { - consAddr, err := val.GetConsAddr() - if err != nil { - panic(fmt.Sprintf("failed to get consensus address: %s", err)) - } - - sigs, exist := k.SlashingKeeper.GetValidatorSigningInfo(ctx, consAddr) - valInfos[i] = valInfo{val, exist, sigs, consAddr} - } - - var unbondingValInfos []valInfo - - blockTime := ctx.BlockTime().Add(k.StakingKeeper.GetParams(ctx).UnbondingTime) - blockHeight := ctx.BlockHeight() - unbondingValIterator := k.StakingKeeper.ValidatorQueueIterator(ctx, blockTime, blockHeight) - defer unbondingValIterator.Close() - - // All unbonding validators - for ; unbondingValIterator.Valid(); unbondingValIterator.Next() { - unbondingValidators := k.GetUnbondingvalidators(unbondingValIterator.Value()) - for _, valAddr := range unbondingValidators.Addresses { - addr, err := sdk.ValAddressFromBech32(valAddr) - if err != nil { - panic(fmt.Sprintf("failed to bech32 decode validator address: %s", err)) - } + for _, otx := range usotxs { + signatures := k.GetEthereumSignatures(ctx, otx.GetStoreIndex()) - validator, _ := k.StakingKeeper.GetValidator(ctx, addr) + // Slash bonded validators who didn't sign outgoing txs + otxHeight := int64(otx.GetCosmosHeight()) + for i, validator := range bondedValidators { + vsi := bondedValidatorSlashingInfos[i] + eligibleSigner := vsi.Exists && (vsi.SigningInfo.StartHeight < otxHeight) + _, signedTx := signatures[validator.GetOperator().String()] - valConsAddr, err := validator.GetConsAddr() - if err != nil { - panic(fmt.Sprintf("failed to get validator consensus address: %s", err)) + if eligibleSigner && !signedTx { + k.SlashAndJail(ctx, validator, types.AttributeMissingSignature) } - - valSigningInfo, exist := k.SlashingKeeper.GetValidatorSigningInfo(ctx, valConsAddr) - unbondingValInfos = append(unbondingValInfos, valInfo{validator, exist, valSigningInfo, valConsAddr}) } - } - for _, otx := range usotxs { - // SLASH BONDED VALIDATORS who didn't sign batch txs - signatures := k.GetEthereumSignatures(ctx, otx.GetStoreIndex()) - for _, valInfo := range valInfos { - // Don't slash validators who joined after outgoingtx is created - if valInfo.exist && valInfo.sigs.StartHeight < int64(otx.GetCosmosHeight()) { - if _, ok := signatures[valInfo.val.GetOperator().String()]; !ok { - if !valInfo.val.IsJailed() { - power := valInfo.val.ConsensusPower(k.PowerReduction) - k.StakingKeeper.Slash( - ctx, - valInfo.cons, - ctx.BlockHeight(), - power, - params.SlashFractionBatch, - ) - k.StakingKeeper.Jail(ctx, valInfo.cons) - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - slashingtypes.EventTypeSlash, - sdk.NewAttribute(slashingtypes.AttributeKeyAddress, valInfo.cons.String()), - sdk.NewAttribute(slashingtypes.AttributeKeyJailed, valInfo.cons.String()), - sdk.NewAttribute(slashingtypes.AttributeKeyReason, types.AttributeMissingBridgeBatchSig), - sdk.NewAttribute(slashingtypes.AttributeKeyPower, fmt.Sprintf("%d", power)), - ), - ) - } - } - } - } + // Slash unbonding validators who didn't sign new signer set txs only + if _, ok := otx.(*types.SignerSetTx); ok { + for i, validator := range unbondingValidators { + vsi := unbondingValidatorSlashingInfos[i] + eligibleSigner := vsi.Exists && (vsi.SigningInfo.StartHeight < otxHeight) + deadlinePassed := otxHeight < validator.UnbondingHeight+int64(params.UnbondSlashingSignerSetTxsWindow) + _, signedTx := signatures[validator.GetOperator().String()] - if sstx, ok := otx.(*types.SignerSetTx); ok { - for _, valInfo := range unbondingValInfos { - // Only slash validators who joined after valset is created and they are - // unbonding and UNBOND_SLASHING_WINDOW didn't pass. - if valInfo.exist && valInfo.sigs.StartHeight < int64(sstx.Height) && - valInfo.val.IsUnbonding() && - sstx.Height < uint64(valInfo.val.UnbondingHeight)+params.UnbondSlashingSignerSetTxsWindow { - // check if validator has confirmed valset or not - if _, found := signatures[valInfo.val.GetOperator().String()]; !found { - if !valInfo.val.IsJailed() { - // TODO: Do we want to slash jailed validators? - power := valInfo.val.ConsensusPower(k.PowerReduction) - k.StakingKeeper.Slash( - ctx, - valInfo.cons, - ctx.BlockHeight(), - power, - params.SlashFractionSignerSetTx, - ) - k.StakingKeeper.Jail(ctx, valInfo.cons) - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - slashingtypes.EventTypeSlash, - sdk.NewAttribute(slashingtypes.AttributeKeyAddress, valInfo.cons.String()), - sdk.NewAttribute(slashingtypes.AttributeKeyJailed, valInfo.cons.String()), - sdk.NewAttribute(slashingtypes.AttributeKeyReason, types.AttributeMissingBridgeBatchSig), - sdk.NewAttribute(slashingtypes.AttributeKeyPower, fmt.Sprintf("%d", power)), - ), - ) - } - } + if eligibleSigner && validator.IsUnbonding() && deadlinePassed && !signedTx { + k.SlashAndJail(ctx, validator, types.AttributeMissingSignerSetSignature) } } } - // then we set the latest slashed outgoing tx block - k.SetLastSlashedOutgoingTxBlockHeight(ctx, otx.GetCosmosHeight()) + if otx.GetCosmosHeight() > k.GetLastSlashedOutgoingTxBlockHeight(ctx) { + k.SetLastSlashedOutgoingTxBlockHeight(ctx, otx.GetCosmosHeight()) + } } } diff --git a/module/x/gravity/abci_test.go b/module/x/gravity/abci_test.go index 51a35122a..6f04e674f 100644 --- a/module/x/gravity/abci_test.go +++ b/module/x/gravity/abci_test.go @@ -8,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" @@ -161,21 +162,42 @@ func TestSignerSetTxSlashing_UnbondingValidator_UnbondWindow_NotExpired(t *testi // check if tokens shouldn't be slashed for val2. } -func TestBatchSlashing(t *testing.T) { +// TestBatchAndContractCallSlashingAndPruning tests that slashing and pruning are working properly for the +// batch and contract call implementations of OutgoingTx. It also implicitly tests that two slashes against +// a validator do not result in a second jail call, which would cause panic and chain halt. +func TestTxSlashingAndPruning(t *testing.T) { input, ctx := keeper.SetupFiveValChain(t) gravityKeeper := input.GravityKeeper params := gravityKeeper.GetParams(ctx) + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + int64(params.ConfirmedOutgoingTxWindow) + 2) - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + int64(params.SignedBatchesWindow) + 2) - - // First store a batch - batch := &types.BatchTx{ + batchExecuted := &types.BatchTx{ BatchNonce: 1, Transactions: []*types.SendToEthereum{}, TokenContract: keeper.TokenContractAddrs[0], - Height: uint64(ctx.BlockHeight() - int64(params.SignedBatchesWindow+1)), + Height: uint64(ctx.BlockHeight() - int64(params.ConfirmedOutgoingTxWindow+1)), + } + batchNotExecuted := &types.BatchTx{ + BatchNonce: 2, + Transactions: []*types.SendToEthereum{}, + TokenContract: keeper.TokenContractAddrs[0], + Height: uint64(ctx.BlockHeight() - int64(params.ConfirmedOutgoingTxWindow)), + } + contractCallExecuted := &types.ContractCallTx{ + InvalidationNonce: 1, + InvalidationScope: []byte("test"), + Height: uint64(ctx.BlockHeight() - int64(params.ConfirmedOutgoingTxWindow+1)), } - gravityKeeper.SetOutgoingTx(ctx, batch) + contractCallNotExecuted := &types.ContractCallTx{ + InvalidationNonce: 2, + InvalidationScope: []byte("test"), + Height: uint64(ctx.BlockHeight() - int64(params.ConfirmedOutgoingTxWindow)), + } + + gravityKeeper.SetOutgoingTx(ctx, batchExecuted) + gravityKeeper.SetOutgoingTx(ctx, batchNotExecuted) + gravityKeeper.SetOutgoingTx(ctx, contractCallExecuted) + gravityKeeper.SetOutgoingTx(ctx, contractCallNotExecuted) for i, val := range keeper.ValAddrs { if i == 0 { @@ -186,18 +208,29 @@ func TestBatchSlashing(t *testing.T) { // don't sign with 2nd validator. set val bond height > batch block height validator := input.StakingKeeper.Validator(ctx, keeper.ValAddrs[i]) valConsAddr, _ := validator.GetConsAddr() - valSigningInfo := slashingtypes.ValidatorSigningInfo{StartHeight: int64(batch.Height + 1)} + valSigningInfo := slashingtypes.ValidatorSigningInfo{StartHeight: int64(batchExecuted.Height + 1)} input.SlashingKeeper.SetValidatorSigningInfo(ctx, valConsAddr, valSigningInfo) continue } gravityKeeper.SetEthereumSignature(ctx, &types.BatchTxConfirmation{ - BatchNonce: batch.BatchNonce, + BatchNonce: batchExecuted.BatchNonce, TokenContract: keeper.TokenContractAddrs[0], EthereumSigner: keeper.EthAddrs[i].String(), Signature: []byte("dummysig"), }, val) + gravityKeeper.SetEthereumSignature(ctx, &types.ContractCallTxConfirmation{ + InvalidationNonce: 1, + InvalidationScope: []byte("test"), + EthereumSigner: keeper.EthAddrs[i].String(), + Signature: []byte("dummysig"), + }, val) } + // validator 3 is unbonding and doesn't sign the a signer set tx. + validator3 := input.StakingKeeper.Validator(ctx, keeper.ValAddrs[2]) + input.StakingKeeper.InsertUnbondingValidatorQueue(ctx, validator3.(stakingtypes.Validator)) + + gravity.BeginBlocker(ctx, gravityKeeper) gravity.EndBlocker(ctx, gravityKeeper) // ensure that the validator is jailed and slashed @@ -206,8 +239,85 @@ func TestBatchSlashing(t *testing.T) { // ensure that the 2nd validator is not jailed and slashed require.False(t, input.StakingKeeper.Validator(ctx, keeper.ValAddrs[1]).IsJailed()) - // Ensure that the last slashed signer set tx nonce is set properly - require.Equal(t, input.GravityKeeper.GetLastSlashedOutgoingTxBlockHeight(ctx), batch.Height) + // Ensure that the last slashed ougoing tx block height is set properly + require.Equal(t, gravityKeeper.GetLastSlashedOutgoingTxBlockHeight(ctx), batchExecuted.Height) + + // Check txs pruning behavior + + // move from outgoing store to completed + gravityKeeper.CompleteOutgoingTx(ctx, batchExecuted) + gravityKeeper.CompleteOutgoingTx(ctx, contractCallExecuted) + + require.Nil(t, gravityKeeper.GetOutgoingTx(ctx, batchExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, batchExecuted.GetStoreIndex())) + require.NotEmpty(t, gravityKeeper.GetEthereumSignatures(ctx, batchExecuted.GetStoreIndex())) + + require.Nil(t, gravityKeeper.GetOutgoingTx(ctx, contractCallExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, contractCallExecuted.GetStoreIndex())) + require.NotEmpty(t, gravityKeeper.GetEthereumSignatures(ctx, contractCallExecuted.GetStoreIndex())) + + // run pruning + gravity.BeginBlocker(ctx, gravityKeeper) + + require.Nil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, batchExecuted.GetStoreIndex())) + require.Empty(t, gravityKeeper.GetEthereumSignatures(ctx, batchExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetOutgoingTx(ctx, batchNotExecuted.GetStoreIndex())) + + require.Nil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, contractCallExecuted.GetStoreIndex())) + require.Empty(t, gravityKeeper.GetEthereumSignatures(ctx, contractCallExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetOutgoingTx(ctx, contractCallNotExecuted.GetStoreIndex())) + + // validator 3 should not have be slashed for not signing contract calls and batches because + // it is unbonding + require.False(t, input.StakingKeeper.Validator(ctx, keeper.ValAddrs[2]).IsJailed()) + + signerSetNotExecuted := &types.SignerSetTx{ + Nonce: 1, + Height: uint64(ctx.BlockHeight() - int64(params.UnbondSlashingSignerSetTxsWindow+1)), + } + signerSetExecuted := &types.SignerSetTx{ + Nonce: 2, + Height: uint64(ctx.BlockHeight() - int64(params.UnbondSlashingSignerSetTxsWindow)), + } + + // The second one executes + gravityKeeper.SetOutgoingTx(ctx, signerSetExecuted) + gravityKeeper.SetOutgoingTx(ctx, signerSetNotExecuted) + gravityKeeper.SignerSetExecuted(ctx, signerSetExecuted.GetNonce()) + require.EqualValues(t, 2, gravityKeeper.GetLatestSignerSetTxNonce(ctx)) + + // The first is not pruned by the executed handler + require.NotNil(t, gravityKeeper.GetOutgoingTx(ctx, signerSetNotExecuted.GetStoreIndex())) + require.Nil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, signerSetNotExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, signerSetExecuted.GetStoreIndex())) + + gravity.BeginBlocker(ctx, gravityKeeper) + gravity.EndBlocker(ctx, gravityKeeper) + + // unexecuted signer set should be pruned, executed should be completed, original outgoing tx + // not pruned. + require.Nil(t, gravityKeeper.GetOutgoingTx(ctx, signerSetNotExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetOutgoingTx(ctx, signerSetExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, signerSetExecuted.GetStoreIndex())) + + // validator 3 shouldn't be jailed yet + require.False(t, input.StakingKeeper.Validator(ctx, keeper.ValAddrs[2]).IsJailed()) + + // setting validator 3 to unbonding should have triggered a new signer set in begin blocker + require.EqualValues(t, 3, gravityKeeper.GetLatestSignerSetTxNonce(ctx)) + gravityKeeper.SignerSetExecuted(ctx, 3) + + // with another round of begin/end blockers, signer set 2 should be pruned, but not it's completed otx. + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + gravity.BeginBlocker(ctx, gravityKeeper) + gravity.EndBlocker(ctx, gravityKeeper) + + require.Nil(t, gravityKeeper.GetOutgoingTx(ctx, signerSetExecuted.GetStoreIndex())) + require.NotNil(t, gravityKeeper.GetCompletedOutgoingTx(ctx, signerSetExecuted.GetStoreIndex())) + require.EqualValues(t, 3, gravityKeeper.GetLatestSignerSetTxNonce(ctx)) + + // validator 3 should be slashed for not signing the signer set txs + require.True(t, input.StakingKeeper.Validator(ctx, keeper.ValAddrs[2]).IsJailed()) } func TestSignerSetTxEmission(t *testing.T) { diff --git a/module/x/gravity/client/cli/query.go b/module/x/gravity/client/cli/query.go index 2719989d4..732c75a74 100644 --- a/module/x/gravity/client/cli/query.go +++ b/module/x/gravity/client/cli/query.go @@ -23,18 +23,27 @@ func GetQueryCmd() *cobra.Command { gravityQueryCmd.AddCommand( CmdBatchTx(), CmdBatchTxConfirmations(), + CmdBatchTxConfirmationsByValidator(), CmdBatchTxFees(), CmdBatchTxs(), + CmdCompletedBatchTxs(), + CmdCompletedContractCallTxs(), + CmdCompletedSignerSetTxs(), CmdContractCallTx(), CmdContractCallTxConfirmations(), + CmdContractCallTxConfirmationsByValidator(), CmdContractCallTxs(), CmdDenomToERC20Params(), CmdERC20ToDenom(), + CmdEthereumEventVotes(), + CmdEthereumEventVotesByValidator(), + CmdLastObservedEthereumHeight(), CmdLastSubmittedEthereumEvent(), CmdLatestSignerSetTx(), CmdParams(), CmdSignerSetTx(), CmdSignerSetTxConfirmations(), + CmdSignerSetTxConfirmationsByValidator(), CmdSignerSetTxs(), CmdUnsignedBatchTxs(), CmdUnsignedContractCallTxs(), @@ -45,7 +54,6 @@ func GetQueryCmd() *cobra.Command { CmdDelegateKeysByEthereumSigner(), CmdDelegateKeysByOrchestrator(), CmdDelegateKeys(), - CmdLastObservedEthereumHeight(), ) return gravityQueryCmd @@ -342,7 +350,7 @@ func CmdBatchTxConfirmations() *cobra.Command { func CmdContractCallTxConfirmations() *cobra.Command { cmd := &cobra.Command{ Use: "contract-call-tx-ethereum-signatures [invalidation-scope] [invalidation-nonce]", - Args: cobra.MinimumNArgs(2), + Args: cobra.ExactArgs(2), Short: "query signatures for a given contract call transaction identified by invalidation nonce and invalidation scope", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, queryClient, err := newContextAndQueryClient(cmd) @@ -830,6 +838,239 @@ func CmdLastObservedEthereumHeight() *cobra.Command { return cmd } +func CmdCompletedBatchTxs() *cobra.Command { + cmd := &cobra.Command{ + Use: "completed-batch-txs", + Args: cobra.NoArgs, + Short: "query completed batch transactions that have not been pruned", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + res, err := queryClient.CompletedBatchTxs(cmd.Context(), &types.CompletedBatchTxsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdCompletedContractCallTxs() *cobra.Command { + cmd := &cobra.Command{ + Use: "completed-contract-call-txs", + Args: cobra.NoArgs, + Short: "query completed contract call transactions that have not been pruned", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + res, err := queryClient.CompletedContractCallTxs(cmd.Context(), &types.CompletedContractCallTxsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdCompletedSignerSetTxs() *cobra.Command { + cmd := &cobra.Command{ + Use: "completed-signer-set-txs", + Args: cobra.NoArgs, + Short: "query completed signer set transactions that have not been pruned", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + res, err := queryClient.CompletedSignerSetTxs(cmd.Context(), &types.CompletedSignerSetTxsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdBatchTxConfirmationsByValidator() *cobra.Command { + cmd := &cobra.Command{ + Use: "batch-tx-ethereum-signatures-by-validator [validator-address]", + Args: cobra.ExactArgs(1), + Short: "query batch tx signatures submitted by a given validator", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + val, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + + res, err := queryClient.BatchTxConfirmationsByValidator(cmd.Context(), &types.BatchTxConfirmationsByValidatorRequest{ + ValidatorAddress: val.String(), + }) + + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdContractCallTxConfirmationsByValidator() *cobra.Command { + cmd := &cobra.Command{ + Use: "contract-call-tx-ethereum-signatures-by-validator [validator-address]", + Args: cobra.ExactArgs(1), + Short: "query contract call tx signatures submitted by a given validator", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + val, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + + res, err := queryClient.ContractCallTxConfirmationsByValidator(cmd.Context(), &types.ContractCallTxConfirmationsByValidatorRequest{ + ValidatorAddress: val.String(), + }) + + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdSignerSetTxConfirmationsByValidator() *cobra.Command { + cmd := &cobra.Command{ + Use: "signer-set-tx-ethereum-signatures-by-validator [validator-address]", + Args: cobra.ExactArgs(1), + Short: "query signer set tx signatures submitted by a given validator", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + val, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + + res, err := queryClient.SignerSetTxConfirmationsByValidator(cmd.Context(), &types.SignerSetTxConfirmationsByValidatorRequest{ + ValidatorAddress: val.String(), + }) + + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdEthereumEventVotes() *cobra.Command { + cmd := &cobra.Command{ + Use: "ethereum-event-votes", + Args: cobra.NoArgs, + Short: "query all ethereum event votes that have not been pruned", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + res, err := queryClient.EthereumEventVoteRecords(cmd.Context(), &types.EthereumEventVoteRecordsRequest{ + Pagination: pageReq, + }) + + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "all ethereum event vote records") + return cmd +} + +func CmdEthereumEventVotesByValidator() *cobra.Command { + cmd := &cobra.Command{ + Use: "ethereum-event-votes-by-validator [validator-address]", + Args: cobra.ExactArgs(1), + Short: "query ethereum event votes for a given validator that have not been pruned", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, queryClient, err := newContextAndQueryClient(cmd) + if err != nil { + return err + } + + val, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + + res, err := queryClient.EthereumEventVotes(cmd.Context(), &types.EthereumEventVotesRequest{ + ValidatorAddress: val.String(), + }) + + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + func newContextAndQueryClient(cmd *cobra.Command) (client.Context, types.QueryClient, error) { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { diff --git a/module/x/gravity/handler_test.go b/module/x/gravity/handler_test.go index 098a17afb..0d6eac063 100644 --- a/module/x/gravity/handler_test.go +++ b/module/x/gravity/handler_test.go @@ -204,9 +204,13 @@ func TestMsgSubmitEthreumEventSendToCosmosMultiValidator(t *testing.T) { tokenETHAddr = common.HexToAddress("0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e") denom = types.GravityDenom(tokenETHAddr) myBlockTime = time.Date(2020, 9, 14, 15, 20, 10, 0, time.UTC) + eventVoteWindow = uint64(5) ) input := keeper.CreateTestEnv(t) ctx := input.Context + params := types.DefaultParams() + params.EthereumEventVoteWindow = eventVoteWindow + input.GravityKeeper.SetParams(ctx, *params) input.GravityKeeper.StakingKeeper = keeper.NewStakingKeeperMock(valAddr1, valAddr2, valAddr3) input.GravityKeeper.SetOrchestratorValidatorAddress(ctx, valAddr1, orchestratorAddr1) input.GravityKeeper.SetOrchestratorValidatorAddress(ctx, valAddr2, orchestratorAddr2) @@ -277,15 +281,31 @@ func TestMsgSubmitEthreumEventSendToCosmosMultiValidator(t *testing.T) { // when ctx = ctx.WithBlockTime(myBlockTime) _, err = h(ctx, ethClaim3Msg) - gravity.EndBlocker(ctx, input.GravityKeeper) require.NoError(t, err) + gravity.EndBlocker(ctx, input.GravityKeeper) - // and attestation persisted + // and attestations persisted + a1 = input.GravityKeeper.GetEthereumEventVoteRecord(ctx, myNonce, ethClaim1.Hash()) + a2 = input.GravityKeeper.GetEthereumEventVoteRecord(ctx, myNonce, ethClaim2.Hash()) a3 := input.GravityKeeper.GetEthereumEventVoteRecord(ctx, myNonce, ethClaim3.Hash()) + require.NotNil(t, a1) + require.NotNil(t, a2) require.NotNil(t, a3) - // and no additional added to the account - balance3 := input.BankKeeper.GetAllBalances(ctx, myCosmosAddr) - require.Equal(t, sdk.Coins{sdk.NewInt64Coin(denom, 12)}, balance3) + + // make observed ethereum height high enough to trigger pruning + input.GravityKeeper.SetLastObservedEthereumBlockHeight( + ctx, + input.GravityKeeper.GetLastObservedEthereumBlockHeight(ctx).EthereumHeight+eventVoteWindow+uint64(1), + ) + gravity.BeginBlocker(ctx, input.GravityKeeper) + + // and attestations pruned + a1 = input.GravityKeeper.GetEthereumEventVoteRecord(ctx, myNonce, ethClaim1.Hash()) + a2 = input.GravityKeeper.GetEthereumEventVoteRecord(ctx, myNonce, ethClaim2.Hash()) + a3 = input.GravityKeeper.GetEthereumEventVoteRecord(ctx, myNonce, ethClaim3.Hash()) + require.Nil(t, a1) + require.Nil(t, a2) + require.Nil(t, a3) } func TestMsgSetDelegateAddresses(t *testing.T) { diff --git a/module/x/gravity/keeper/batch.go b/module/x/gravity/keeper/batch.go index f31ab0e22..d28799b4b 100644 --- a/module/x/gravity/keeper/batch.go +++ b/module/x/gravity/keeper/batch.go @@ -3,9 +3,11 @@ package keeper import ( "encoding/binary" "fmt" + "sort" "strconv" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" @@ -75,13 +77,19 @@ func (k Keeper) batchTxExecuted(ctx sdk.Context, tokenContract common.Address, n batchTx, _ := otx.(*types.BatchTx) k.IterateOutgoingTxsByType(ctx, types.BatchTxPrefixByte, func(key []byte, otx types.OutgoingTx) bool { // If the iterated batches nonce is lower than the one that was just executed, cancel it - btx, _ := otx.(*types.BatchTx) + btx, ok := otx.(*types.BatchTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to batch tx for %s", otx)) + } + if (btx.BatchNonce < batchTx.BatchNonce) && (btx.TokenContract == batchTx.TokenContract) { + k.DeleteEthereumSignatures(ctx, btx.GetStoreIndex()) k.CancelBatchTx(ctx, btx) } return false }) - k.DeleteOutgoingTx(ctx, batchTx.GetStoreIndex()) + + k.CompleteOutgoingTx(ctx, batchTx) } // getBatchFeesByTokenType gets the fees the next batch of a given token type would @@ -152,29 +160,33 @@ func (k Keeper) getLastOutgoingBatchByTokenType(ctx sdk.Context, token common.Ad return lastBatch } -// SetLastSlashedOutgoingTxBlockHeight sets the latest slashed Batch block height -func (k Keeper) SetLastSlashedOutgoingTxBlockHeight(ctx sdk.Context, blockHeight uint64) { - ctx.KVStore(k.storeKey).Set([]byte{types.LastSlashedOutgoingTxBlockKey}, sdk.Uint64ToBigEndian(blockHeight)) -} - -// GetLastSlashedOutgoingTxBlockHeight returns the latest slashed Batch block -func (k Keeper) GetLastSlashedOutgoingTxBlockHeight(ctx sdk.Context) uint64 { - if bz := ctx.KVStore(k.storeKey).Get([]byte{types.LastSlashedOutgoingTxBlockKey}); bz == nil { - return 0 - } else { - return binary.BigEndian.Uint64(bz) - } -} - -func (k Keeper) GetUnSlashedOutgoingTxs(ctx sdk.Context, maxHeight uint64) (out []types.OutgoingTx) { - lastSlashed := k.GetLastSlashedOutgoingTxBlockHeight(ctx) - k.iterateOutgoingTxs(ctx, func(key []byte, otx types.OutgoingTx) bool { - if (otx.GetCosmosHeight() < maxHeight) && (otx.GetCosmosHeight() > lastSlashed) { - out = append(out, otx) +// GetUnsignedBatchTxs returns all batches for which the specified validator has not submitted confirmations in ascending nonce order +func (k Keeper) GetUnsignedBatchTxs(ctx sdk.Context, val sdk.ValAddress) []*types.BatchTx { + var unconfirmed []*types.BatchTx + k.IterateCompletedOutgoingTxsByType(ctx, types.BatchTxPrefixByte, func(_ []byte, cotx types.OutgoingTx) bool { + sig := k.getEthereumSignature(ctx, cotx.GetStoreIndex(), val) + if len(sig) == 0 { + batch, ok := cotx.(*types.BatchTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to batch tx for completed tx %s", cotx)) + } + unconfirmed = append(unconfirmed, batch) } return false }) - return + k.IterateOutgoingTxsByType(ctx, types.BatchTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { + sig := k.getEthereumSignature(ctx, otx.GetStoreIndex(), val) + if len(sig) == 0 { + batch, ok := otx.(*types.BatchTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to batch tx for %s", otx)) + } + unconfirmed = append(unconfirmed, batch) + } + return false + }) + + return orderBatchesByNonceAscending(unconfirmed) } func (k Keeper) incrementLastOutgoingBatchNonce(ctx sdk.Context) uint64 { @@ -189,3 +201,13 @@ func (k Keeper) incrementLastOutgoingBatchNonce(ctx sdk.Context) uint64 { store.Set([]byte{types.LastOutgoingBatchNonceKey}, bz) return newId } + +// orderBatchesByNonceAscending orders the batches by their BatchNonce in ascending order +func orderBatchesByNonceAscending(batches []*types.BatchTx) []*types.BatchTx { + sort.Slice(batches, func(i, j int) bool { + return batches[i].BatchNonce < batches[j].BatchNonce + }) + + return batches +} + diff --git a/module/x/gravity/keeper/batch_test.go b/module/x/gravity/keeper/batch_test.go index c5d6e512d..7974b5b65 100644 --- a/module/x/gravity/keeper/batch_test.go +++ b/module/x/gravity/keeper/batch_test.go @@ -380,3 +380,97 @@ func TestEmptyBatch(t *testing.T) { require.Nil(t, batchTx) } + +func TestGetUnconfirmedBatchTxs(t *testing.T) { + input, ctx := SetupFiveValChain(t) + gk := input.GravityKeeper + vals := input.StakingKeeper.GetAllValidators(ctx) + val1, err := sdk.ValAddressFromBech32(vals[0].OperatorAddress) + require.NoError(t, err) + val2, err := sdk.ValAddressFromBech32(vals[1].OperatorAddress) + require.NoError(t, err) + + blockheight := uint64(ctx.BlockHeight()) + sig := []byte("dummysig") + gk.SetCompletedOutgoingTx(ctx, &types.BatchTx{ + BatchNonce: 1, + Height: uint64(ctx.BlockHeight()), + }) + gk.SetOutgoingTx(ctx, &types.BatchTx{ + BatchNonce: 2, + Height: uint64(ctx.BlockHeight()), + }) + + // val1 signs both + // val2 signs one + gk.SetEthereumSignature( + ctx, + &types.BatchTxConfirmation{ + BatchNonce: 1, + Signature: sig, + }, + val1, + ) + gk.SetEthereumSignature( + ctx, + &types.BatchTxConfirmation{ + BatchNonce: 2, + Signature: sig, + }, + val1, + ) + gk.SetEthereumSignature( + ctx, + &types.BatchTxConfirmation{ + BatchNonce: 1, + Signature: sig, + }, + val2, + ) + + require.Empty(t, gk.GetUnsignedBatchTxs(ctx, val1)) + require.Equal(t, 1, len(gk.GetUnsignedBatchTxs(ctx, val2))) + + // Confirm ordering + val3, err := sdk.ValAddressFromBech32(vals[2].OperatorAddress) + require.NoError(t, err) + + addressA := "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + addressB := "0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" + gk.SetCompletedOutgoingTx(ctx, &types.BatchTx{ + TokenContract: addressB, + BatchNonce: 3, + Height: blockheight, + }) + gk.SetCompletedOutgoingTx(ctx, &types.BatchTx{ + TokenContract: addressA, + BatchNonce: 4, + Height: blockheight, + }) + gk.SetOutgoingTx(ctx, &types.BatchTx{ + TokenContract: addressB, + BatchNonce: 5, + Height: blockheight, + }) + gk.SetOutgoingTx(ctx, &types.BatchTx{ + TokenContract: addressA, + BatchNonce: 6, + Height: blockheight, + }) + gk.SetOutgoingTx(ctx, &types.BatchTx{ + TokenContract: addressB, + BatchNonce: 7, + Height: blockheight, + }) + + unconfirmed := gk.GetUnsignedBatchTxs(ctx, val3) + + require.EqualValues(t, 7, len(unconfirmed)) + require.EqualValues(t, unconfirmed[0].BatchNonce, 1) + require.EqualValues(t, unconfirmed[1].BatchNonce, 2) + require.EqualValues(t, unconfirmed[2].BatchNonce, 3) + require.EqualValues(t, unconfirmed[3].BatchNonce, 4) + require.EqualValues(t, unconfirmed[4].BatchNonce, 5) + require.EqualValues(t, unconfirmed[5].BatchNonce, 6) + require.EqualValues(t, unconfirmed[6].BatchNonce, 7) +} diff --git a/module/x/gravity/keeper/contract_call.go b/module/x/gravity/keeper/contract_call.go index 7ff0ed18d..78dd931cb 100644 --- a/module/x/gravity/keeper/contract_call.go +++ b/module/x/gravity/keeper/contract_call.go @@ -3,11 +3,42 @@ package keeper import ( "bytes" "encoding/hex" + "sort" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" ) +func (k Keeper) GetUnsignedContractCallTxs(ctx sdk.Context, val sdk.ValAddress) []*types.ContractCallTx { + var unconfirmed []*types.ContractCallTx + k.IterateCompletedOutgoingTxsByType(ctx, types.ContractCallTxPrefixByte, func(_ []byte, cotx types.OutgoingTx) bool { + sig := k.getEthereumSignature(ctx, cotx.GetStoreIndex(), val) + if len(sig) == 0 { + call, ok := cotx.(*types.ContractCallTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to contract call for completed tx %s", cotx)) + } + unconfirmed = append(unconfirmed, call) + } + return false + }) + + k.IterateOutgoingTxsByType(ctx, types.ContractCallTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { + sig := k.getEthereumSignature(ctx, otx.GetStoreIndex(), val) + if len(sig) == 0 { + call, ok := otx.(*types.ContractCallTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to contract call for %s", otx)) + } + unconfirmed = append(unconfirmed, call) + } + return false + }) + + return orderContractCallsByNonceAscending(unconfirmed) +} + func (k Keeper) contractCallExecuted(ctx sdk.Context, invalidationScope []byte, invalidationNonce uint64) { otx := k.GetOutgoingTx(ctx, types.MakeContractCallTxKey(invalidationScope, invalidationNonce)) if otx == nil { @@ -20,13 +51,27 @@ func (k Keeper) contractCallExecuted(ctx sdk.Context, invalidationScope []byte, completedCallTx, _ := otx.(*types.ContractCallTx) k.IterateOutgoingTxsByType(ctx, types.ContractCallTxPrefixByte, func(key []byte, otx types.OutgoingTx) bool { // If the iterated contract call's nonce is lower than the one that was just executed, delete it - cctx, _ := otx.(*types.ContractCallTx) + cctx, ok := otx.(*types.ContractCallTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to contract call tx for %s", otx)) + } + if (cctx.InvalidationNonce < completedCallTx.InvalidationNonce) && bytes.Equal(cctx.InvalidationScope, completedCallTx.InvalidationScope) { + k.DeleteEthereumSignatures(ctx, cctx.GetStoreIndex()) k.DeleteOutgoingTx(ctx, cctx.GetStoreIndex()) } return false }) - k.DeleteOutgoingTx(ctx, completedCallTx.GetStoreIndex()) + k.CompleteOutgoingTx(ctx, completedCallTx) +} + +// orderContractCallsByNonceAscending sorts a slice of contract calls by nonce in ascending order +func orderContractCallsByNonceAscending(calls []*types.ContractCallTx) []*types.ContractCallTx { + sort.SliceStable(calls, func(i, j int) bool { + return calls[i].InvalidationNonce < calls[j].InvalidationNonce + }) + + return calls } diff --git a/module/x/gravity/keeper/contract_call_test.go b/module/x/gravity/keeper/contract_call_test.go index f1708f741..3d36059e9 100644 --- a/module/x/gravity/keeper/contract_call_test.go +++ b/module/x/gravity/keeper/contract_call_test.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestContractCallTxExecuted(t *testing.T) { @@ -78,3 +79,63 @@ func TestContractCallTxExecuted(t *testing.T) { assert.Nil(t, otx1) assert.Nil(t, otx2) } + +func TestGetUnconfirmedContractCallTxs(t *testing.T) { + input, ctx := SetupFiveValChain(t) + gk := input.GravityKeeper + vals := input.StakingKeeper.GetAllValidators(ctx) + val1, err := sdk.ValAddressFromBech32(vals[0].OperatorAddress) + require.NoError(t, err) + val2, err := sdk.ValAddressFromBech32(vals[1].OperatorAddress) + require.NoError(t, err) + + scope := []byte("test") + address := common.HexToAddress("0x2a24af0501a534fca004ee1bd667b783f205a546") + payload := []byte("payload") + tokens := []types.ERC20Token{} + fees := []types.ERC20Token{} + sig := []byte("dummysig") + gk.CreateContractCallTx(ctx, 1, scope, address, payload, tokens, fees) + gk.SetCompletedOutgoingTx(ctx, &types.ContractCallTx{ + InvalidationNonce: 2, + InvalidationScope: scope, + Address: address.Hex(), + Payload: payload, + Tokens: tokens, + Fees: fees, + Height: uint64(ctx.BlockHeight()), + }) + + // val1 signs both + // val2 signs one + gk.SetEthereumSignature( + ctx, + &types.ContractCallTxConfirmation{ + InvalidationNonce: 1, + InvalidationScope: scope, + Signature: sig, + }, + val1, + ) + gk.SetEthereumSignature( + ctx, + &types.ContractCallTxConfirmation{ + InvalidationNonce: 2, + InvalidationScope: scope, + Signature: sig, + }, + val1, + ) + gk.SetEthereumSignature( + ctx, + &types.ContractCallTxConfirmation{ + InvalidationNonce: 2, + InvalidationScope: scope, + Signature: sig, + }, + val2, + ) + + require.Empty(t, gk.GetUnsignedContractCallTxs(ctx, val1)) + require.Equal(t, 1, len(gk.GetUnsignedContractCallTxs(ctx, val2))) +} diff --git a/module/x/gravity/keeper/ethereum_event_handler.go b/module/x/gravity/keeper/ethereum_event_handler.go index b349f857d..bbac12e0b 100644 --- a/module/x/gravity/keeper/ethereum_event_handler.go +++ b/module/x/gravity/keeper/ethereum_event_handler.go @@ -74,13 +74,7 @@ func (k Keeper) Handle(ctx sdk.Context, eve types.EthereumEvent) (err error) { return nil case *types.SignerSetTxExecutedEvent: - // TODO here we should check the contents of the validator set against - // the store, if they differ we should take some action to indicate to the - // user that bridge highjacking has occurred - k.setLastObservedSignerSetTx(ctx, types.SignerSetTx{ - Nonce: event.SignerSetTxNonce, - Signers: event.Members, - }) + k.SignerSetExecuted(ctx, event.GetEventNonce()) k.AfterSignerSetExecutedEvent(ctx, *event) return nil diff --git a/module/x/gravity/keeper/ethereum_event_vote.go b/module/x/gravity/keeper/ethereum_event_vote.go index 838f23886..23de821f3 100644 --- a/module/x/gravity/keeper/ethereum_event_vote.go +++ b/module/x/gravity/keeper/ethereum_event_vote.go @@ -8,6 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" ) @@ -50,7 +51,11 @@ func (k Keeper) recordEventVote( // Add the validator's vote to this EthereumEventVoteRecord eventVoteRecord.Votes = append(eventVoteRecord.Votes, val.String()) - k.setEthereumEventVoteRecord(ctx, event.GetEventNonce(), event.Hash(), eventVoteRecord) + // ignore "old" event votes but still record the nonce for the submitting validator + if event.GetEventNonce() > k.GetLastObservedEventNonce(ctx) { + k.setEthereumEventVoteRecord(ctx, event.GetEventNonce(), event.Hash(), eventVoteRecord) + } + k.setLastEventNonceByValidator(ctx, val, event.GetEventNonce()) return eventVoteRecord, nil @@ -140,6 +145,10 @@ func (k Keeper) setEthereumEventVoteRecord(ctx sdk.Context, eventNonce uint64, c ctx.KVStore(k.storeKey).Set(types.MakeEthereumEventVoteRecordKey(eventNonce, claimHash), k.cdc.MustMarshal(eventVoteRecord)) } +func (k Keeper) DeleteEthereumEventVoteRecord(ctx sdk.Context, eventNonce uint64, claimHash []byte) { + ctx.KVStore(k.storeKey).Delete(types.MakeEthereumEventVoteRecordKey(eventNonce, claimHash)) +} + // GetEthereumEventVoteRecord return a vote record given a nonce func (k Keeper) GetEthereumEventVoteRecord(ctx sdk.Context, eventNonce uint64, claimHash []byte) *types.EthereumEventVoteRecord { if bz := ctx.KVStore(k.storeKey).Get(types.MakeEthereumEventVoteRecordKey(eventNonce, claimHash)); bz == nil { @@ -154,7 +163,7 @@ func (k Keeper) GetEthereumEventVoteRecord(ctx sdk.Context, eventNonce uint64, c // GetEthereumEventVoteRecordMapping returns a mapping of eventnonce -> attestations at that nonce func (k Keeper) GetEthereumEventVoteRecordMapping(ctx sdk.Context) (out map[uint64][]*types.EthereumEventVoteRecord) { out = make(map[uint64][]*types.EthereumEventVoteRecord) - k.iterateEthereumEventVoteRecords(ctx, func(key []byte, eventVoteRecord *types.EthereumEventVoteRecord) bool { + k.IterateEthereumEventVoteRecords(ctx, func(key []byte, eventVoteRecord *types.EthereumEventVoteRecord) bool { event, err := types.UnpackEvent(eventVoteRecord.Event) if err != nil { panic(err) @@ -170,7 +179,7 @@ func (k Keeper) GetEthereumEventVoteRecordMapping(ctx sdk.Context) (out map[uint } // iterateEthereumEventVoteRecords iterates through all attestations -func (k Keeper) iterateEthereumEventVoteRecords(ctx sdk.Context, cb func([]byte, *types.EthereumEventVoteRecord) bool) { +func (k Keeper) IterateEthereumEventVoteRecords(ctx sdk.Context, cb func([]byte, *types.EthereumEventVoteRecord) bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{types.EthereumEventVoteRecordKey}) iter := store.Iterator(nil, nil) defer iter.Close() @@ -184,6 +193,24 @@ func (k Keeper) iterateEthereumEventVoteRecords(ctx sdk.Context, cb func([]byte, } } +func (k Keeper) PaginateEthereumEventVoteRecords(ctx sdk.Context, pageReq *query.PageRequest, cb func(key []byte, record *types.EthereumEventVoteRecord) bool) (*query.PageResponse, error) { + prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{types.EthereumEventVoteRecordKey}) + + return query.FilteredPaginate(prefixStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) { + if !accumulate { + return false, nil + } + + eevr := &types.EthereumEventVoteRecord{} + k.cdc.MustUnmarshal(value, eevr) + if accumulate { + return cb(key, eevr), nil + } + + return false, nil + }) +} + // GetLastObservedEventNonce returns the latest observed event nonce func (k Keeper) GetLastObservedEventNonce(ctx sdk.Context) uint64 { store := ctx.KVStore(k.storeKey) diff --git a/module/x/gravity/keeper/genesis.go b/module/x/gravity/keeper/genesis.go index 87fd441f8..f4fa2f2f2 100644 --- a/module/x/gravity/keeper/genesis.go +++ b/module/x/gravity/keeper/genesis.go @@ -12,7 +12,7 @@ import ( // InitGenesis starts a chain from a genesis state func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState) { - k.setParams(ctx, *data.Params) + k.SetParams(ctx, *data.Params) // reset pool transactions in state for _, tx := range data.UnbatchedSendToEthereumTxs { diff --git a/module/x/gravity/keeper/grpc_query.go b/module/x/gravity/keeper/grpc_query.go index 29affed19..219b07b81 100644 --- a/module/x/gravity/keeper/grpc_query.go +++ b/module/x/gravity/keeper/grpc_query.go @@ -203,67 +203,37 @@ func (k Keeper) ContractCallTxConfirmations(c context.Context, req *types.Contra return &types.ContractCallTxConfirmationsResponse{Signatures: out}, nil } +// UnsignedSignerSetTxs returns all signer set txs that have not been signed by the given validator func (k Keeper) UnsignedSignerSetTxs(c context.Context, req *types.UnsignedSignerSetTxsRequest) (*types.UnsignedSignerSetTxsResponse, error) { ctx := sdk.UnwrapSDKContext(c) val, err := k.getSignerValidator(ctx, req.Address) if err != nil { return nil, err } - var signerSets []*types.SignerSetTx - k.IterateOutgoingTxsByType(ctx, types.SignerSetTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { - sig := k.getEthereumSignature(ctx, otx.GetStoreIndex(), val) - if len(sig) == 0 { // it's pending - signerSet, ok := otx.(*types.SignerSetTx) - if !ok { - panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to signer set for %s", otx)) - } - signerSets = append(signerSets, signerSet) - } - return false - }) - return &types.UnsignedSignerSetTxsResponse{SignerSets: signerSets}, nil + + return &types.UnsignedSignerSetTxsResponse{SignerSets: k.GetUnsignedSignerSetTxs(ctx, val)}, nil } +// UnsignedBatchTxs returns all batch txs that have not been signed by the given validator func (k Keeper) UnsignedBatchTxs(c context.Context, req *types.UnsignedBatchTxsRequest) (*types.UnsignedBatchTxsResponse, error) { ctx := sdk.UnwrapSDKContext(c) val, err := k.getSignerValidator(ctx, req.Address) if err != nil { return nil, err } - var batches []*types.BatchTx - k.IterateOutgoingTxsByType(ctx, types.BatchTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { - sig := k.getEthereumSignature(ctx, otx.GetStoreIndex(), val) - if len(sig) == 0 { // it's pending - batch, ok := otx.(*types.BatchTx) - if !ok { - panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to batch tx for %s", otx)) - } - batches = append(batches, batch) - } - return false - }) - return &types.UnsignedBatchTxsResponse{Batches: batches}, nil + + return &types.UnsignedBatchTxsResponse{Batches: k.GetUnsignedBatchTxs(ctx, val)}, nil } +// UnsignedContractCallTxs returns all contract call txs that have not been signed by the given validator func (k Keeper) UnsignedContractCallTxs(c context.Context, req *types.UnsignedContractCallTxsRequest) (*types.UnsignedContractCallTxsResponse, error) { ctx := sdk.UnwrapSDKContext(c) val, err := k.getSignerValidator(ctx, req.Address) if err != nil { return nil, err } - var calls []*types.ContractCallTx - k.IterateOutgoingTxsByType(ctx, types.ContractCallTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { - sig := k.getEthereumSignature(ctx, otx.GetStoreIndex(), val) - if len(sig) == 0 { // it's pending - call, ok := otx.(*types.ContractCallTx) - if !ok { - panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to contract call for %s", otx)) - } - calls = append(calls, call) - } - return false - }) - return &types.UnsignedContractCallTxsResponse{Calls: calls}, nil + + return &types.UnsignedContractCallTxsResponse{Calls: k.GetUnsignedContractCallTxs(ctx, val)}, nil } func (k Keeper) LastSubmittedEthereumEvent(c context.Context, req *types.LastSubmittedEthereumEventRequest) (*types.LastSubmittedEthereumEventResponse, error) { @@ -471,3 +441,180 @@ func (k Keeper) LastObservedEthereumHeight(c context.Context, req *types.LastObs return res, nil } + +func (k Keeper) CompletedBatchTxs(c context.Context, req *types.CompletedBatchTxsRequest) (*types.CompletedBatchTxsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + var batches []*types.BatchTx + k.IterateCompletedOutgoingTxsByType(ctx, types.BatchTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { + batchTx := otx.(*types.BatchTx) + batches = append(batches, batchTx) + return false + }) + + res := &types.CompletedBatchTxsResponse{ + CompletedBatchTxs: batches, + } + return res, nil +} + +func (k Keeper) CompletedContractCallTxs(c context.Context, req *types.CompletedContractCallTxsRequest) (*types.CompletedContractCallTxsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + var contractCalls []*types.ContractCallTx + k.IterateCompletedOutgoingTxsByType(ctx, types.ContractCallTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { + contractCallTx := otx.(*types.ContractCallTx) + contractCalls = append(contractCalls, contractCallTx) + return false + }) + + res := &types.CompletedContractCallTxsResponse{ + CompletedContractCallTxs: contractCalls, + } + return res, nil +} + +func (k Keeper) CompletedSignerSetTxs(c context.Context, req *types.CompletedSignerSetTxsRequest) (*types.CompletedSignerSetTxsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + var signerSetCalls []*types.SignerSetTx + k.IterateCompletedOutgoingTxsByType(ctx, types.SignerSetTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { + signerSetTx := otx.(*types.SignerSetTx) + signerSetCalls = append(signerSetCalls, signerSetTx) + return false + }) + + res := &types.CompletedSignerSetTxsResponse{ + CompletedSignerSetTxs: signerSetCalls, + } + return res, nil +} + +func (k Keeper) BatchTxConfirmationsByValidator(c context.Context, req *types.BatchTxConfirmationsByValidatorRequest) (*types.BatchTxConfirmationsByValidatorResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + + var confirms []*types.BatchTxConfirmation + k.IterateBatchTxEthereumSignatures(ctx, func(contractAddress common.Address, nonce uint64, val sdk.ValAddress, sig []byte) bool { + if !val.Equals(valAddr) { + return false + } + + confirms = append(confirms, &types.BatchTxConfirmation{ + TokenContract: contractAddress.Hex(), + BatchNonce: nonce, + EthereumSigner: k.GetValidatorEthereumAddress(ctx, val).Hex(), + Signature: sig, + }) + return false + }) + + res := &types.BatchTxConfirmationsByValidatorResponse{ + BatchTxConfirmations: confirms, + } + return res, nil +} + +func (k Keeper) ContractCallTxConfirmationsByValidator(c context.Context, req *types.ContractCallTxConfirmationsByValidatorRequest) (*types.ContractCallTxConfirmationsByValidatorResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + + var confirms []*types.ContractCallTxConfirmation + k.IterateContractCallTxEthereumSignatures(ctx, func(invalidationScope []byte, invalidationNonce uint64, val sdk.ValAddress, sig []byte) bool { + if !val.Equals(valAddr) { + return false + } + + confirms = append(confirms, &types.ContractCallTxConfirmation{ + InvalidationScope: invalidationScope, + InvalidationNonce: invalidationNonce, + EthereumSigner: k.GetValidatorEthereumAddress(ctx, val).Hex(), + Signature: sig, + }) + return false + }) + + res := &types.ContractCallTxConfirmationsByValidatorResponse{ + ContractCallTxConfirmations: confirms, + } + return res, nil +} + +func (k Keeper) SignerSetTxConfirmationsByValidator(c context.Context, req *types.SignerSetTxConfirmationsByValidatorRequest) (*types.SignerSetTxConfirmationsByValidatorResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + + var confirms []*types.SignerSetTxConfirmation + k.IterateSignerSetTxEthereumSignatures(ctx, func(nonce uint64, val sdk.ValAddress, sig []byte) bool { + if !val.Equals(valAddr) { + return false + } + + confirms = append(confirms, &types.SignerSetTxConfirmation{ + SignerSetNonce: nonce, + EthereumSigner: k.GetValidatorEthereumAddress(ctx, val).Hex(), + Signature: sig, + }) + return false + }) + + res := &types.SignerSetTxConfirmationsByValidatorResponse{ + SignerSetTxConfirmations: confirms, + } + return res, nil +} + +func (k Keeper) EthereumEventVoteRecords(c context.Context, req *types.EthereumEventVoteRecordsRequest) (*types.EthereumEventVoteRecordsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + res := &types.EthereumEventVoteRecordsResponse{} + pageRes, err := k.PaginateEthereumEventVoteRecords(ctx, req.Pagination, func(key []byte, eventVoteRecord *types.EthereumEventVoteRecord) bool { + res.Records = append(res.Records, eventVoteRecord) + + return false + }) + if err != nil { + return nil, err + } + + res.Pagination = pageRes + + return res, nil +} + +func (k Keeper) EthereumEventVotes(c context.Context, req *types.EthereumEventVotesRequest) (*types.EthereumEventVotesResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + val, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + + var events []*cdctypes.Any + k.IterateEthereumEventVoteRecords(ctx, func(key []byte, eventVoteRecord *types.EthereumEventVoteRecord) bool { + for _, voter := range eventVoteRecord.Votes { + voterAddr, err := sdk.ValAddressFromBech32(voter) + if err != nil { + continue + } + if voterAddr.Equals(val) { + events = append(events, eventVoteRecord.Event) + return false + } + } + + return false + }) + + res := &types.EthereumEventVotesResponse{ + Events: events, + } + return res, nil +} diff --git a/module/x/gravity/keeper/grpc_query_test.go b/module/x/gravity/keeper/grpc_query_test.go index f1183250e..0efdbb3ec 100644 --- a/module/x/gravity/keeper/grpc_query_test.go +++ b/module/x/gravity/keeper/grpc_query_test.go @@ -4,6 +4,8 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" + "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/migrations/v1/keeper" "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/bytes" @@ -214,18 +216,144 @@ func TestKeeper_ContractCallTxs(t *testing.T) { }) } -// TODO(levi) ensure coverage for: -// ContractCallTx(context.Context, *ContractCallTxRequest) (*ContractCallTxResponse, error) -// ContractCallTxs(context.Context, *ContractCallTxsRequest) (*ContractCallTxsResponse, error) +func TestKeeper_UnsignedSignerSetTxs(t *testing.T) { + t.Run("read after there's something in state", func(t *testing.T) { + env, ctx := SetupFiveValChain(t) + gk := env.GravityKeeper + orchAddr := keeper.AccAddrs[0] + signer := orchAddr.String() + valAddr, err := sdk.ValAddressFromBech32(env.StakingKeeper.GetValidators(ctx, 5)[0].OperatorAddress) + require.NoError(t, err) + + { // setup + require.NotNil(t, gk.CreateSignerSetTx(env.Context)) + require.NotNil(t, gk.CreateSignerSetTx(env.Context)) + gk.SetCompletedOutgoingTx(ctx, &types.SignerSetTx{ + Nonce: 1, + Height: 0, + Signers: []*types.EthereumSigner{}, + }) + // should not be returned + gk.SetCompletedOutgoingTx(ctx, &types.BatchTx{ + BatchNonce: 1, + Height: 0, + }) + gk.SetOrchestratorValidatorAddress(ctx, valAddr, orchAddr) + gk.setEthereumOrchestratorAddress(ctx, common.HexToAddress("0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), orchAddr) + } + { // validate + req := &types.UnsignedSignerSetTxsRequest{ + Address: signer, + } + res, err := gk.UnsignedSignerSetTxs(sdk.WrapSDKContext(ctx), req) + require.NoError(t, err) + require.NotNil(t, res) + require.Len(t, res.SignerSets, 3) + } + }) +} + +func TestKeeper_UnsignedBatchTxs(t *testing.T) { + t.Run("read after there's something in state", func(t *testing.T) { + env, ctx := SetupFiveValChain(t) + gk := env.GravityKeeper + orchAddr := keeper.AccAddrs[0] + signer := orchAddr.String() + valAddr, err := sdk.ValAddressFromBech32(env.StakingKeeper.GetValidators(ctx, 5)[0].OperatorAddress) + require.NoError(t, err) + + // setup + { + gk.SetCompletedOutgoingTx(ctx, &types.BatchTx{ + BatchNonce: 999, + Height: 0, + }) + toComplete := &types.BatchTx{ + BatchNonce: 1000, + Timeout: 1000, + Transactions: nil, + TokenContract: "0x835973768750b3ED2D5c3EF5AdcD5eDb44d12aD4", + Height: 1000, + } + gk.SetOutgoingTx(ctx, toComplete) + gk.CompleteOutgoingTx(ctx, toComplete) + gk.SetOutgoingTx(ctx, &types.BatchTx{ + BatchNonce: 1001, + Timeout: 1000, + Transactions: nil, + TokenContract: "0x835973768750b3ED2D5c3EF5AdcD5eDb44d12aD4", + Height: 1001, + }) + // should not be returned + gk.SetCompletedOutgoingTx(ctx, &types.ContractCallTx{ + InvalidationNonce: 1, + InvalidationScope: []byte("an-invalidation-scope"), + Height: 0, + }) + gk.SetOrchestratorValidatorAddress(ctx, valAddr, orchAddr) + gk.setEthereumOrchestratorAddress(ctx, common.HexToAddress("0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), orchAddr) + } + { // validate + req := &types.UnsignedBatchTxsRequest{ + Address: signer, + } + res, err := gk.UnsignedBatchTxs(sdk.WrapSDKContext(ctx), req) + require.NoError(t, err) + require.NotNil(t, res) + require.Len(t, res.Batches, 3) + } + }) +} + +func TestKeeper_UnsignedContractCallTxs(t *testing.T) { + t.Run("read after there's something in state", func(t *testing.T) { + env, ctx := SetupFiveValChain(t) + gk := env.GravityKeeper + orchAddr := keeper.AccAddrs[0] + signer := orchAddr.String() + valAddr, err := sdk.ValAddressFromBech32(env.StakingKeeper.GetValidators(ctx, 5)[0].OperatorAddress) + require.NoError(t, err) + + { // setup + gk.SetOutgoingTx(ctx, &types.ContractCallTx{ + InvalidationNonce: 5, + InvalidationScope: []byte("an-invalidation-scope"), + // TODO + }) + gk.SetOutgoingTx(ctx, &types.ContractCallTx{ + InvalidationNonce: 6, + InvalidationScope: []byte("an-invalidation-scope"), + }) + gk.SetCompletedOutgoingTx(ctx, &types.ContractCallTx{ + InvalidationNonce: 1, + InvalidationScope: []byte("an-invalidation-scope"), + Height: 0, + }) + // should not be returned + gk.SetCompletedOutgoingTx(ctx, &types.BatchTx{ + BatchNonce: 1, + Height: 0, + }) + gk.SetOrchestratorValidatorAddress(ctx, valAddr, orchAddr) + gk.setEthereumOrchestratorAddress(ctx, common.HexToAddress("0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), orchAddr) + } + { // validate + req := &types.UnsignedContractCallTxsRequest{ + Address: signer, + } + res, err := gk.UnsignedContractCallTxs(sdk.WrapSDKContext(ctx), req) + require.NoError(t, err) + require.NotNil(t, res) + require.Len(t, res.Calls, 3) + } + }) +} +// TODO(levi) ensure coverage for: // SignerSetTxConfirmations(context.Context, *SignerSetTxConfirmationsRequest) (*SignerSetTxConfirmationsResponse, error) // BatchTxConfirmations(context.Context, *BatchTxConfirmationsRequest) (*BatchTxConfirmationsResponse, error) // ContractCallTxConfirmations(context.Context, *ContractCallTxConfirmationsRequest) (*ContractCallTxConfirmationsResponse, error) -// UnsignedSignerSetTxs(context.Context, *UnsignedSignerSetTxsRequest) (*UnsignedSignerSetTxsResponse, error) -// UnsignedBatchTxs(context.Context, *UnsignedBatchTxsRequest) (*UnsignedBatchTxsResponse, error) -// UnsignedContractCallTxs(context.Context, *UnsignedContractCallTxsRequest) (*UnsignedContractCallTxsResponse, error) - // BatchTxFees(context.Context, *BatchTxFeesRequest) (*BatchTxFeesResponse, error) // ERC20ToDenom(context.Context, *ERC20ToDenomRequest) (*ERC20ToDenomResponse, error) // DenomToERC20(context.Context, *DenomToERC20Request) (*DenomToERC20Response, error) diff --git a/module/x/gravity/keeper/keeper.go b/module/x/gravity/keeper/keeper.go index c49768878..4a71cc4ce 100644 --- a/module/x/gravity/keeper/keeper.go +++ b/module/x/gravity/keeper/keeper.go @@ -15,7 +15,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" @@ -129,12 +128,12 @@ func (k Keeper) GetLastUnbondingBlockHeight(ctx sdk.Context) uint64 { // ETHEREUM SIGNATURES // /////////////////////////////// -// getEthereumSignature returns a valset confirmation by a nonce and validator address +// getEthereumSignature returns an ethereum signature by a nonce and validator address func (k Keeper) getEthereumSignature(ctx sdk.Context, storeIndex []byte, validator sdk.ValAddress) []byte { return ctx.KVStore(k.storeKey).Get(types.MakeEthereumSignatureKey(storeIndex, validator)) } -// SetEthereumSignature sets a valset confirmation +// SetEthereumSignature sets an ethereum signature func (k Keeper) SetEthereumSignature(ctx sdk.Context, sig types.EthereumTxConfirmation, val sdk.ValAddress) []byte { key := types.MakeEthereumSignatureKey(sig.GetStoreIndex(), val) ctx.KVStore(k.storeKey).Set(key, sig.GetSignature()) @@ -151,6 +150,19 @@ func (k Keeper) GetEthereumSignatures(ctx sdk.Context, storeIndex []byte) map[st return signatures } +// DeleteEthereumSignatures deletes all ethereum signatures for a given outgoing tx by store index +func (k Keeper) DeleteEthereumSignatures(ctx sdk.Context, storeIndex []byte) { + var keys [][]byte + k.iterateEthereumSignatures(ctx, storeIndex, func(val sdk.ValAddress, h []byte) bool { + keys = append(keys, types.MakeEthereumSignatureKey(storeIndex, val)) + return false + }) + + for _, key := range keys { + ctx.KVStore(k.storeKey).Delete(key) + } +} + // iterateEthereumSignatures iterates through all valset confirms by nonce in ASC order func (k Keeper) iterateEthereumSignatures(ctx sdk.Context, storeIndex []byte, cb func(sdk.ValAddress, []byte) bool) { prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), append([]byte{types.EthereumSignatureKey}, storeIndex...)) @@ -165,6 +177,59 @@ func (k Keeper) iterateEthereumSignatures(ctx sdk.Context, storeIndex []byte, cb } } +func (k Keeper) IterateBatchTxEthereumSignatures(ctx sdk.Context, cb func(common.Address, uint64, sdk.ValAddress, []byte) bool) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, []byte{types.EthereumSignatureKey, types.BatchTxPrefixByte}) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + key := bytes.NewBuffer(iter.Key()) + key.Next(2) // trim prefix bytes + contractAddr := common.BytesToAddress(key.Next(20)) + nonce := binary.BigEndian.Uint64(key.Next(8)) + val := sdk.ValAddress(key.Next(20)) + + if cb(contractAddr, nonce, val, iter.Value()) { + break + } + } +} + +func (k Keeper) IterateContractCallTxEthereumSignatures(ctx sdk.Context, cb func([]byte, uint64, sdk.ValAddress, []byte) bool) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, []byte{types.EthereumSignatureKey, types.ContractCallTxPrefixByte}) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + key := bytes.NewBuffer(iter.Key()) + key.Next(2) // trim prefix bytes + invalidationScope := key.Next(32) + nonce := binary.BigEndian.Uint64(key.Next(8)) + val := sdk.ValAddress(key.Next(20)) + + if cb(invalidationScope, nonce, val, iter.Value()) { + break + } + } +} + +func (k Keeper) IterateSignerSetTxEthereumSignatures(ctx sdk.Context, cb func(uint64, sdk.ValAddress, []byte) bool) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, []byte{types.EthereumSignatureKey, types.SignerSetTxPrefixByte}) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + key := bytes.NewBuffer(iter.Key()) + key.Next(2) // trim prefix bytes + nonce := binary.BigEndian.Uint64(key.Next(8)) + val := sdk.ValAddress(key.Next(20)) + + if cb(nonce, val, iter.Value()) { + break + } + } +} + ///////////////////////// // ORC -> VAL ADDRESS // ///////////////////////// @@ -332,8 +397,8 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { return } -// setParams sets the parameters in the store -func (k Keeper) setParams(ctx sdk.Context, ps types.Params) { +// SetParams sets the parameters in the store +func (k Keeper) SetParams(ctx sdk.Context, ps types.Params) { k.paramSpace.SetParamSet(ctx, &ps) } @@ -402,14 +467,6 @@ func (k Keeper) getDelegateKeys(ctx sdk.Context) (out []*types.MsgDelegateKeys) return out } -// GetUnbondingvalidators returns UnbondingValidators. -// Adding here in gravity keeper as cdc is available inside endblocker. -func (k Keeper) GetUnbondingvalidators(unbondingVals []byte) stakingtypes.ValAddresses { - unbondingValidators := stakingtypes.ValAddresses{} - k.cdc.MustUnmarshal(unbondingVals, &unbondingValidators) - return unbondingValidators -} - // This gets the timeout height in Ethereum blocks for expiring old batches and contract calls. func (k Keeper) getTimeoutHeight(ctx sdk.Context) uint64 { params := k.GetParams(ctx) @@ -590,6 +647,107 @@ func (k Keeper) CreateContractCallTx(ctx sdk.Context, invalidationNonce uint64, return newContractCallTx } +func (k Keeper) CompleteOutgoingTx(ctx sdk.Context, otx types.OutgoingTx) { + k.SetCompletedOutgoingTx(ctx, otx) + + if k.GetOutgoingTx(ctx, otx.GetStoreIndex()) != nil { + k.DeleteOutgoingTx(ctx, otx.GetStoreIndex()) + } +} + +// SetCompletedOutgoingTx sets a completed outgoing tx +func (k Keeper) SetCompletedOutgoingTx(ctx sdk.Context, outgoing types.OutgoingTx) { + any, err := types.PackOutgoingTx(outgoing) + if err != nil { + panic(err) + } + ctx.KVStore(k.storeKey).Set( + types.MakeCompletedOutgoingTxKey(outgoing.GetStoreIndex()), + k.cdc.MustMarshal(any), + ) +} + +// GetCompletedOutgoingTx gets a completed outgoing tx +func (k Keeper) GetCompletedOutgoingTx(ctx sdk.Context, storeIndex []byte) (out types.OutgoingTx) { + if err := k.cdc.UnmarshalInterface(ctx.KVStore(k.storeKey).Get(types.MakeCompletedOutgoingTxKey(storeIndex)), &out); err != nil { + panic(err) + } + return out +} + +// IterateOutgoingTxs iterates over a specific type of outgoing transaction denoted by the chosen prefix byte +func (k Keeper) IterateCompletedOutgoingTxs(ctx sdk.Context, cb func(key []byte, outgoing types.OutgoingTx) bool) { + prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{types.CompletedOutgoingTxKey}) + iter := prefixStore.ReverseIterator(nil, nil) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var any cdctypes.Any + k.cdc.MustUnmarshal(iter.Value(), &any) + var otx types.OutgoingTx + if err := k.cdc.UnpackAny(&any, &otx); err != nil { + panic(err) + } + if cb(iter.Key(), otx) { + break + } + } +} + +// IterateCompletedOutgoingTxsByType iterates over a specific type of completed outgoing transaction denoted by the chosen prefix byte +func (k Keeper) IterateCompletedOutgoingTxsByType(ctx sdk.Context, prefixByte byte, cb func(key []byte, outgoing types.OutgoingTx) (stop bool)) { + prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.MakeCompletedOutgoingTxKey([]byte{prefixByte})) + iter := prefixStore.ReverseIterator(nil, nil) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var any cdctypes.Any + k.cdc.MustUnmarshal(iter.Value(), &any) + var cotx types.OutgoingTx + if err := k.cdc.UnpackAny(&any, &cotx); err != nil { + panic(err) + } + if cb(iter.Key(), cotx) { + break + } + } +} + +// DeleteCompletedOutgoingTx deletes a given outgoingtx +func (k Keeper) DeleteCompletedOutgoingTx(ctx sdk.Context, storeIndex []byte) { + k.DeleteEthereumSignatures(ctx, storeIndex) + ctx.KVStore(k.storeKey).Delete(types.MakeCompletedOutgoingTxKey(storeIndex)) +} + +// SetLastSlashedOutgoingTxBlockHeight sets the latest slashed Batch block height +func (k Keeper) SetLastSlashedOutgoingTxBlockHeight(ctx sdk.Context, blockHeight uint64) { + ctx.KVStore(k.storeKey).Set([]byte{types.LastSlashedOutgoingTxBlockKey}, sdk.Uint64ToBigEndian(blockHeight)) +} + +// GetLastSlashedOutgoingTxBlockHeight returns the latest slashed Batch block +func (k Keeper) GetLastSlashedOutgoingTxBlockHeight(ctx sdk.Context) uint64 { + if bz := ctx.KVStore(k.storeKey).Get([]byte{types.LastSlashedOutgoingTxBlockKey}); bz == nil { + return 0 + } else { + return binary.BigEndian.Uint64(bz) + } +} + +func (k Keeper) GetUnslashedOutgoingTxs(ctx sdk.Context, maxHeight uint64) (out []types.OutgoingTx) { + lastSlashed := k.GetLastSlashedOutgoingTxBlockHeight(ctx) + k.iterateOutgoingTxs(ctx, func(key []byte, otx types.OutgoingTx) bool { + if (otx.GetCosmosHeight() < maxHeight) && (otx.GetCosmosHeight() > lastSlashed) { + out = append(out, otx) + } + return false + }) + k.IterateCompletedOutgoingTxs(ctx, func(key []byte, cotx types.OutgoingTx) bool { + if (cotx.GetCosmosHeight() < maxHeight) && (cotx.GetCosmosHeight() > lastSlashed) { + out = append(out, cotx) + } + return false + }) + return +} + ////////////////////////////////////// // Observed Ethereum/Cosmos heights // ////////////////////////////////////// @@ -680,7 +838,7 @@ func (k Keeper) MigrateGravityContract(ctx sdk.Context, newBridgeAddress string, // Reset all ethereum event nonces to zero k.setLastObservedEventNonce(ctx, 0) - k.iterateEthereumEventVoteRecords(ctx, func(_ []byte, voteRecord *types.EthereumEventVoteRecord) bool { + k.IterateEthereumEventVoteRecords(ctx, func(_ []byte, voteRecord *types.EthereumEventVoteRecord) bool { for _, vote := range voteRecord.Votes { val, err := sdk.ValAddressFromBech32(vote) @@ -722,5 +880,5 @@ func (k Keeper) MigrateGravityContract(ctx sdk.Context, newBridgeAddress string, // Update the bridge contract address params := k.GetParams(ctx) params.BridgeEthereumAddress = newBridgeAddress - k.setParams(ctx, params) + k.SetParams(ctx, params) } diff --git a/module/x/gravity/keeper/keeper_test.go b/module/x/gravity/keeper/keeper_test.go index b0453b29e..066a48e48 100644 --- a/module/x/gravity/keeper/keeper_test.go +++ b/module/x/gravity/keeper/keeper_test.go @@ -7,6 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -80,7 +81,7 @@ func TestAttestationIterator(t *testing.T) { input.GravityKeeper.setEthereumEventVoteRecord(ctx, dep2.EventNonce, dep2.Hash(), att2) var atts []*types.EthereumEventVoteRecord - input.GravityKeeper.iterateEthereumEventVoteRecords(ctx, func(_ []byte, att *types.EthereumEventVoteRecord) bool { + input.GravityKeeper.IterateEthereumEventVoteRecords(ctx, func(_ []byte, att *types.EthereumEventVoteRecord) bool { atts = append(atts, att) return false }) @@ -235,7 +236,7 @@ func TestLastSlashedValsetNonce(t *testing.T) { // lastSlashedValsetNonce should be zero initially. lastSlashedValsetNonce := k.GetLastSlashedOutgoingTxBlockHeight(ctx) assert.Equal(t, uint64(0), lastSlashedValsetNonce) - unslashedValsets := k.GetUnSlashedOutgoingTxs(ctx, uint64(12)) + unslashedValsets := k.GetUnslashedOutgoingTxs(ctx, uint64(12)) assert.Equal(t, 9, len(unslashedValsets)) // check if last Slashed Valset nonce is set properly or not @@ -244,19 +245,19 @@ func TestLastSlashedValsetNonce(t *testing.T) { assert.Equal(t, uint64(3), lastSlashedValsetNonce) // when maxHeight < lastSlashedValsetNonce, len(unslashedValsets) should be zero - unslashedValsets = k.GetUnSlashedOutgoingTxs(ctx, uint64(2)) + unslashedValsets = k.GetUnslashedOutgoingTxs(ctx, uint64(2)) assert.Equal(t, 0, len(unslashedValsets)) // when maxHeight == lastSlashedValsetNonce, len(unslashedValsets) should be zero - unslashedValsets = k.GetUnSlashedOutgoingTxs(ctx, uint64(3)) + unslashedValsets = k.GetUnslashedOutgoingTxs(ctx, uint64(3)) assert.Equal(t, 0, len(unslashedValsets)) // when maxHeight > lastSlashedValsetNonce && maxHeight <= latestValsetNonce - unslashedValsets = k.GetUnSlashedOutgoingTxs(ctx, uint64(6)) + unslashedValsets = k.GetUnslashedOutgoingTxs(ctx, uint64(6)) assert.Equal(t, 2, len(unslashedValsets)) // when maxHeight > latestValsetNonce - unslashedValsets = k.GetUnSlashedOutgoingTxs(ctx, uint64(15)) + unslashedValsets = k.GetUnslashedOutgoingTxs(ctx, uint64(15)) assert.Equal(t, 6, len(unslashedValsets)) } @@ -668,6 +669,118 @@ func TestKeeper_Migration(t *testing.T) { } +func TestEthereumSignatureIterators(t *testing.T) { + input := CreateTestEnv(t) + ctx := input.Context + k := input.GravityKeeper + + // add some signatures to the store + valAddr, err := sdk.ValAddressFromBech32("cosmosvaloper1jpz0ahls2chajf78nkqczdwwuqcu97w6z3plt4") + require.NoError(t, err) + signer := common.HexToAddress("0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") + k.setValidatorEthereumAddress(ctx, valAddr, signer) + b1 := &types.BatchTxConfirmation{ + TokenContract: "0x1111111111111111111111111111111111111111", + BatchNonce: 1, + EthereumSigner: signer.Hex(), + Signature: []byte("batch-signature-1"), + } + b2 := &types.BatchTxConfirmation{ + TokenContract: "0x2222222222222222222222222222222222222222", + BatchNonce: 2, + EthereumSigner: signer.Hex(), + Signature: []byte("batch-signature-2"), + } + k.SetEthereumSignature(ctx, b1, valAddr) + k.SetEthereumSignature(ctx, b2, valAddr) + + iterationCount := 0 + var batchSigs []*types.BatchTxConfirmation + k.IterateBatchTxEthereumSignatures(ctx, func(contractAddr common.Address, nonce uint64, val sdk.ValAddress, sig []byte) bool { + iterationCount++ + batchSigs = append(batchSigs, &types.BatchTxConfirmation{ + TokenContract: contractAddr.Hex(), + BatchNonce: nonce, + EthereumSigner: k.GetValidatorEthereumAddress(ctx, valAddr).Hex(), + Signature: sig, + }) + return false + }) + + require.Len(t, batchSigs, 2) + require.Equal(t, iterationCount, len(batchSigs)) + require.Equal(t, batchSigs[0], b1) + require.Equal(t, batchSigs[1], b2) + + // ContractCallTxConfirmations + + scope := crypto.Keccak256Hash([]byte("test-scope")).Bytes() + cc1 := &types.ContractCallTxConfirmation{ + InvalidationScope: scope, + InvalidationNonce: 1, + EthereumSigner: signer.Hex(), + Signature: []byte("contract-call-signature-1"), + } + cc2 := &types.ContractCallTxConfirmation{ + InvalidationScope: scope, + InvalidationNonce: 2, + EthereumSigner: signer.Hex(), + Signature: []byte("contract-call-signature-2"), + } + k.SetEthereumSignature(ctx, cc1, valAddr) + k.SetEthereumSignature(ctx, cc2, valAddr) + + iterationCount = 0 + var ccSigs []*types.ContractCallTxConfirmation + k.IterateContractCallTxEthereumSignatures(ctx, func(invalidationScope []byte, invalidationNonce uint64, val sdk.ValAddress, sig []byte) bool { + iterationCount++ + ccSigs = append(ccSigs, &types.ContractCallTxConfirmation{ + InvalidationScope: invalidationScope, + InvalidationNonce: invalidationNonce, + EthereumSigner: k.GetValidatorEthereumAddress(ctx, valAddr).Hex(), + Signature: sig, + }) + return false + }) + + require.Len(t, ccSigs, 2) + require.Equal(t, iterationCount, len(ccSigs)) + require.Equal(t, ccSigs[0], cc1) + require.Equal(t, ccSigs[1], cc2) + + // SignerSetTxConfirmations + + ss1 := &types.SignerSetTxConfirmation{ + SignerSetNonce: 1, + EthereumSigner: signer.Hex(), + Signature: []byte("signer-set-signature-1"), + } + ss2 := &types.SignerSetTxConfirmation{ + SignerSetNonce: 2, + EthereumSigner: signer.Hex(), + Signature: []byte("signer-set-signature-2"), + } + k.SetEthereumSignature(ctx, ss1, valAddr) + k.SetEthereumSignature(ctx, ss2, valAddr) + + iterationCount = 0 + var ssSigs []*types.SignerSetTxConfirmation + k.IterateSignerSetTxEthereumSignatures(ctx, func(nonce uint64, val sdk.ValAddress, sig []byte) bool { + iterationCount++ + ssSigs = append(ssSigs, &types.SignerSetTxConfirmation{ + SignerSetNonce: nonce, + EthereumSigner: k.GetValidatorEthereumAddress(ctx, valAddr).Hex(), + Signature: sig, + }) + return false + }) + + require.Len(t, ssSigs, 2) + require.Equal(t, iterationCount, len(ssSigs)) + require.Equal(t, ssSigs[0], ss1) + require.Equal(t, ssSigs[1], ss2) +} + // TODO(levi) review/ensure coverage for: // PaginateOutgoingTxsByType // GetUnbondingvalidators(unbondingVals []byte) stakingtypes.ValAddresses diff --git a/module/x/gravity/keeper/signer_set.go b/module/x/gravity/keeper/signer_set.go new file mode 100644 index 000000000..c0d5a0caf --- /dev/null +++ b/module/x/gravity/keeper/signer_set.go @@ -0,0 +1,69 @@ +package keeper + +import ( + "sort" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" +) + +// TODO here we should check the contents of the validator set against +// the store, if they differ we should take some action to indicate to the +// user that bridge highjacking has occurred +func (k Keeper) SignerSetExecuted(ctx sdk.Context, nonce uint64) { + otx := k.GetOutgoingTx(ctx, types.MakeSignerSetTxKey(nonce)) + if otx == nil { + k.Logger(ctx).Error("Failed to clean signer sets", + "signer set nonce", nonce) + return + } + + sstx, ok := otx.(*types.SignerSetTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to signer set for outgoing tx %s", otx)) + } + + k.setLastObservedSignerSetTx(ctx, *sstx) + + // We don't use CompleteOutgoingTx here so that BeginBlocker can handle + // pruning of old signer set txs + k.SetCompletedOutgoingTx(ctx, sstx) +} + +func (k Keeper) GetUnsignedSignerSetTxs(ctx sdk.Context, val sdk.ValAddress) []*types.SignerSetTx { + var unconfirmed []*types.SignerSetTx + k.IterateCompletedOutgoingTxsByType(ctx, types.SignerSetTxPrefixByte, func(_ []byte, cotx types.OutgoingTx) bool { + sig := k.getEthereumSignature(ctx, cotx.GetStoreIndex(), val) + if len(sig) == 0 { + signerSet, ok := cotx.(*types.SignerSetTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to signer set for completed tx %s", cotx)) + } + unconfirmed = append(unconfirmed, signerSet) + } + return false + }) + k.IterateOutgoingTxsByType(ctx, types.SignerSetTxPrefixByte, func(_ []byte, otx types.OutgoingTx) bool { + sig := k.getEthereumSignature(ctx, otx.GetStoreIndex(), val) + if len(sig) == 0 { + signerSet, ok := otx.(*types.SignerSetTx) + if !ok { + panic(sdkerrors.Wrapf(types.ErrInvalid, "couldn't cast to signer set for %s", otx)) + } + unconfirmed = append(unconfirmed, signerSet) + } + return false + }) + + return orderSignerSetsByNonceAscending(unconfirmed) +} + +// orderSignerSetsByNonceAscending orders the batches by their BatchNonce in ascending order +func orderSignerSetsByNonceAscending(txs []*types.SignerSetTx) []*types.SignerSetTx { + sort.Slice(txs, func(i, j int) bool { + return txs[i].Nonce < txs[j].Nonce + }) + + return txs +} diff --git a/module/x/gravity/keeper/signer_set_test.go b/module/x/gravity/keeper/signer_set_test.go new file mode 100644 index 000000000..db6089d8a --- /dev/null +++ b/module/x/gravity/keeper/signer_set_test.go @@ -0,0 +1,85 @@ +package keeper + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/peggyjv/gravity-bridge/module/v3/x/gravity/types" +) + +func TestSignerSetTxExecuted(t *testing.T) { + input := CreateTestEnv(t) + ctx := input.Context.WithBlockHeight(100) + + input.GravityKeeper.CreateSignerSetTx( + ctx, + ) + + sstx := input.GravityKeeper.GetOutgoingTx(ctx, types.MakeSignerSetTxKey(1)).(*types.SignerSetTx) + + assert.NotNil(t, sstx) + + input.GravityKeeper.SignerSetExecuted(ctx, 1) + + otx := input.GravityKeeper.GetOutgoingTx(ctx, types.MakeSignerSetTxKey(1)) + + assert.NotNil(t, otx) + + cotx := input.GravityKeeper.GetCompletedOutgoingTx(ctx, sstx.GetStoreIndex()) + + assert.NotNil(t, cotx) + assert.Equal(t, uint64(1), input.GravityKeeper.GetLatestSignerSetTxNonce(ctx)) +} + +func TestGetUnconfirmedSignerSetTxs(t *testing.T) { + input, ctx := SetupFiveValChain(t) + gk := input.GravityKeeper + vals := input.StakingKeeper.GetAllValidators(ctx) + val1, err := sdk.ValAddressFromBech32(vals[0].OperatorAddress) + require.NoError(t, err) + val2, err := sdk.ValAddressFromBech32(vals[1].OperatorAddress) + require.NoError(t, err) + + gk.CreateSignerSetTx(ctx) + gk.SetCompletedOutgoingTx(ctx, &types.SignerSetTx{ + Nonce: 2, + Height: 0, + Signers: []*types.EthereumSigner{}, + }) + + // val1 signs both + // val2 signs one + gk.SetEthereumSignature( + ctx, + &types.SignerSetTxConfirmation{ + SignerSetNonce: 1, + EthereumSigner: "", + Signature: []byte("dummysig"), + }, + val1, + ) + gk.SetEthereumSignature( + ctx, + &types.SignerSetTxConfirmation{ + SignerSetNonce: 2, + EthereumSigner: "", + Signature: []byte("dummysig"), + }, + val1, + ) + gk.SetEthereumSignature( + ctx, + &types.SignerSetTxConfirmation{ + SignerSetNonce: 2, + EthereumSigner: "", + Signature: []byte("dummysig"), + }, + val2, + ) + + require.Empty(t, gk.GetUnsignedSignerSetTxs(ctx, val1)) + require.Equal(t, 1, len(gk.GetUnsignedSignerSetTxs(ctx, val2))) +} diff --git a/module/x/gravity/keeper/slashing.go b/module/x/gravity/keeper/slashing.go new file mode 100644 index 000000000..80fe55930 --- /dev/null +++ b/module/x/gravity/keeper/slashing.go @@ -0,0 +1,102 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +type ValidatorSlashingInfo struct { + Validator stakingtypes.Validator + Exists bool + SigningInfo slashingtypes.ValidatorSigningInfo + ConsAddress sdk.ConsAddress +} + +// GetUnbondingValidatorSlashingInfos returns the information needed for slashing for each unbonding validator +func (k Keeper) GetUnbondingValidatorSlashingInfos(ctx sdk.Context) ([]stakingtypes.Validator, []ValidatorSlashingInfo) { + blockTime := ctx.BlockTime().Add(k.StakingKeeper.GetParams(ctx).UnbondingTime) + blockHeight := ctx.BlockHeight() + + var unbondingValInfos []ValidatorSlashingInfo + var unbondingValidators []stakingtypes.Validator + unbondingValIterator := k.StakingKeeper.ValidatorQueueIterator(ctx, blockTime, blockHeight) + defer unbondingValIterator.Close() + for ; unbondingValIterator.Valid(); unbondingValIterator.Next() { + unbondingValidatorsAddr := stakingtypes.ValAddresses{} + k.cdc.MustUnmarshal(unbondingValIterator.Value(), &unbondingValidatorsAddr) + for _, valAddr := range unbondingValidatorsAddr.Addresses { + addr, err := sdk.ValAddressFromBech32(valAddr) + if err != nil { + panic(fmt.Sprintf("failed to bech32 decode validator address: %s", err)) + } + + validator, _ := k.StakingKeeper.GetValidator(ctx, addr) + unbondingValidators = append(unbondingValidators, validator) + unbondingValInfos = append(unbondingValInfos, k.GetValidatorSlashingInfo(ctx, validator)) + } + } + + return unbondingValidators, unbondingValInfos +} + +// GetBondedValidatorSlashingInfos returns the information needed for slashing for each bonded validator +func (k Keeper) GetBondedValidatorSlashingInfos(ctx sdk.Context) ([]stakingtypes.Validator, []ValidatorSlashingInfo) { + var bondedValInfos []ValidatorSlashingInfo + bondedValidators := k.StakingKeeper.GetBondedValidatorsByPower(ctx) + for _, validator := range bondedValidators { + bondedValInfos = append(bondedValInfos, k.GetValidatorSlashingInfo(ctx, validator)) + } + + return bondedValidators, bondedValInfos +} + +// GetValidatorInfo returns the consensus key address, signing info, and whether or not the validator exists, for the purposes of slashing/jailing +func (k Keeper) GetValidatorSlashingInfo(ctx sdk.Context, validator stakingtypes.Validator) ValidatorSlashingInfo { + consensusKeyAddress, err := validator.GetConsAddr() + if err != nil { + panic(fmt.Sprintf("failed to get consensus address: %s", err)) + } + signingInfo, exists := k.SlashingKeeper.GetValidatorSigningInfo(ctx, consensusKeyAddress) + + return ValidatorSlashingInfo{validator, exists, signingInfo, consensusKeyAddress} +} + +// SlashAndJail slashes the validator and sets the validator to jailed if they are not already jailed +func (k Keeper) SlashAndJail(ctx sdk.Context, validator stakingtypes.Validator, reason string) { + // Retrieve the validator afresh in case it has been jailed since the first retrieval + validator, _ = k.StakingKeeper.GetValidator(ctx, validator.GetOperator()) + if validator.IsJailed() { + return + } + + consensusKeyAddress, err := validator.GetConsAddr() + if err != nil { + panic(fmt.Sprintf("failed to get consensus address: %s", err)) + } + + params := k.GetParams(ctx) + power := validator.ConsensusPower(k.PowerReduction) + + k.StakingKeeper.Slash( + ctx, + consensusKeyAddress, + ctx.BlockHeight(), + power, + // TODO: Differentiate between otx types for slashing fraction in future slashing rework + params.SlashFractionBatch, + ) + k.StakingKeeper.Jail(ctx, consensusKeyAddress) + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + slashingtypes.EventTypeSlash, + sdk.NewAttribute(slashingtypes.AttributeKeyAddress, consensusKeyAddress.String()), + sdk.NewAttribute(slashingtypes.AttributeKeyJailed, consensusKeyAddress.String()), + sdk.NewAttribute(slashingtypes.AttributeKeyReason, reason), + sdk.NewAttribute(slashingtypes.AttributeKeyPower, fmt.Sprintf("%d", power)), + ), + ) +} diff --git a/module/x/gravity/keeper/test_common.go b/module/x/gravity/keeper/test_common.go index cdec2eb74..2f77aff34 100644 --- a/module/x/gravity/keeper/test_common.go +++ b/module/x/gravity/keeper/test_common.go @@ -185,9 +185,9 @@ var ( ContractSourceHash: "62328f7bc12efb28f86111d08c29b39285680a906ea0e524e0209d6f6657b713", BridgeEthereumAddress: "0x8858eeb3dfffa017d4bce9801d340d36cf895ccf", BridgeChainId: 11, - SignedBatchesWindow: 10, + ConfirmedOutgoingTxWindow: 10, SignedSignerSetTxsWindow: 10, - UnbondSlashingSignerSetTxsWindow: 15, + UnbondSlashingSignerSetTxsWindow: 10, EthereumSignaturesWindow: 10, TargetEthTxTimeout: 60001, AverageBlockTime: 5000, @@ -441,7 +441,7 @@ func CreateTestEnv(t *testing.T) TestInput { ), ) - k.setParams(ctx, TestingGravityParams) + k.SetParams(ctx, TestingGravityParams) return TestInput{ GravityKeeper: k, diff --git a/module/x/gravity/types/events.go b/module/x/gravity/types/events.go index 6dec3443a..08f75da45 100644 --- a/module/x/gravity/types/events.go +++ b/module/x/gravity/types/events.go @@ -31,5 +31,8 @@ const ( AttributeKeyContractCallFees = "contract_call_fees" AttributeKeyContractCallAddress = "contract_call_address" AttributeKeyEthTxTimeout = "eth_tx_timeout" - AttributeMissingBridgeBatchSig = "missing_bridge_batch_signature" + + // slashing reasons + AttributeMissingSignerSetSignature = "missing_signer_set_signature" + AttributeMissingSignature = "missing_signature" ) diff --git a/module/x/gravity/types/genesis.go b/module/x/gravity/types/genesis.go index aa2215b5e..162ae2310 100644 --- a/module/x/gravity/types/genesis.go +++ b/module/x/gravity/types/genesis.go @@ -65,6 +65,12 @@ var ( // ParamStoreUnbondSlashingSignerSetTxsWindow stores unbond slashing valset window ParamStoreUnbondSlashingSignerSetTxsWindow = []byte("UnbondSlashingSignerSetTxsWindow") + // ParamStoreEventVoteWindow stores the event vote window + ParamStoreEventVoteWindow = []byte("EventVoteWindow") + + // ParamStoreUnbondSlashingSignerSetTxsWindow stores unbond slashing valset window + ParamStoreConfirmedOutgoingTxWindow = []byte("ConfirmedOutgoingTxWindow") + // Ensure that params implements the proper interface _ paramtypes.ParamSet = &Params{} ) @@ -134,6 +140,10 @@ func DefaultParams() *Params { SlashFractionEthereumSignature: sdk.NewDec(1).Quo(sdk.NewDec(1000)), SlashFractionConflictingEthereumSignature: sdk.NewDec(1).Quo(sdk.NewDec(1000)), UnbondSlashingSignerSetTxsWindow: 10000, + + // EthereumEventWindow's units are ethereum blocks. Ethereum block time is ~12 seconds, about twice as long as Sommelier. + EthereumEventVoteWindow: 5000, + ConfirmedOutgoingTxWindow: 10000, } } @@ -184,6 +194,12 @@ func (p Params) ValidateBasic() error { if err := validateUnbondSlashingSignerSetTxsWindow(p.UnbondSlashingSignerSetTxsWindow); err != nil { return sdkerrors.Wrap(err, "unbond slashing signersettx window") } + if err := validateEthereumEventVoteWindow(p.EthereumEventVoteWindow); err != nil { + return sdkerrors.Wrap(err, "event vote window") + } + if err := validateConfirmedOutgoingTxWindow(p.ConfirmedOutgoingTxWindow); err != nil { + return sdkerrors.Wrap(err, "confirmed outgoing tx window") + } return nil } @@ -212,6 +228,8 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(ParamsStoreSlashFractionEthereumSignature, &p.SlashFractionEthereumSignature, validateSlashFractionEthereumSignature), paramtypes.NewParamSetPair(ParamsStoreSlashFractionConflictingEthereumSignature, &p.SlashFractionConflictingEthereumSignature, validateSlashFractionConflictingEthereumSignature), paramtypes.NewParamSetPair(ParamStoreUnbondSlashingSignerSetTxsWindow, &p.UnbondSlashingSignerSetTxsWindow, validateUnbondSlashingSignerSetTxsWindow), + paramtypes.NewParamSetPair(ParamStoreEventVoteWindow, &p.EthereumEventVoteWindow, validateEthereumEventVoteWindow), + paramtypes.NewParamSetPair(ParamStoreConfirmedOutgoingTxWindow, &p.ConfirmedOutgoingTxWindow, validateConfirmedOutgoingTxWindow), } } @@ -360,6 +378,13 @@ func validateSlashFractionConflictingEthereumSignature(i interface{}) error { return nil } +func validateEthereumEventVoteWindow(i interface{}) error { + if _, ok := i.(uint64); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + func strToFixByteArray(s string) ([32]byte, error) { var out [32]byte if len([]byte(s)) > 32 { @@ -376,3 +401,11 @@ func byteArrayToFixByteArray(b []byte) (out [32]byte, err error) { copy(out[:], b) return out, nil } + +func validateConfirmedOutgoingTxWindow(i interface{}) error { + // TODO: do we want to set some bounds on this value? + if _, ok := i.(uint64); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} diff --git a/module/x/gravity/types/genesis.pb.go b/module/x/gravity/types/genesis.pb.go index 238fa4679..836cd4c24 100644 --- a/module/x/gravity/types/genesis.pb.go +++ b/module/x/gravity/types/genesis.pb.go @@ -103,6 +103,8 @@ type Params struct { SlashFractionEthereumSignature github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,15,opt,name=slash_fraction_ethereum_signature,json=slashFractionEthereumSignature,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_ethereum_signature"` SlashFractionConflictingEthereumSignature github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,16,opt,name=slash_fraction_conflicting_ethereum_signature,json=slashFractionConflictingEthereumSignature,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_conflicting_ethereum_signature"` UnbondSlashingSignerSetTxsWindow uint64 `protobuf:"varint,17,opt,name=unbond_slashing_signer_set_txs_window,json=unbondSlashingSignerSetTxsWindow,proto3" json:"unbond_slashing_signer_set_txs_window,omitempty"` + EthereumEventVoteWindow uint64 `protobuf:"varint,18,opt,name=ethereum_event_vote_window,json=ethereumEventVoteWindow,proto3" json:"ethereum_event_vote_window,omitempty"` + ConfirmedOutgoingTxWindow uint64 `protobuf:"varint,19,opt,name=confirmed_outgoing_tx_window,json=confirmedOutgoingTxWindow,proto3" json:"confirmed_outgoing_tx_window,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -215,6 +217,20 @@ func (m *Params) GetUnbondSlashingSignerSetTxsWindow() uint64 { return 0 } +func (m *Params) GetEthereumEventVoteWindow() uint64 { + if m != nil { + return m.EthereumEventVoteWindow + } + return 0 +} + +func (m *Params) GetConfirmedOutgoingTxWindow() uint64 { + if m != nil { + return m.ConfirmedOutgoingTxWindow + } + return 0 +} + // GenesisState struct // TODO: this need to be audited and potentially simplified using the new // interfaces @@ -381,64 +397,67 @@ func init() { func init() { proto.RegisterFile("gravity/v1/genesis.proto", fileDescriptor_387b0aba880adb60) } var fileDescriptor_387b0aba880adb60 = []byte{ - // 910 bytes of a gzipped FileDescriptorProto + // 945 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0xb6, 0xa9, 0x1b, 0xda, 0xb1, 0x4d, 0xca, 0xe0, 0xc0, 0xd6, 0x29, 0xae, 0x09, 0xa2, 0x0a, - 0x88, 0xec, 0x26, 0xae, 0x04, 0x22, 0xfc, 0xa8, 0xcd, 0x0f, 0x50, 0x21, 0x28, 0x5a, 0x1b, 0x90, - 0xb8, 0x60, 0x18, 0xef, 0x9c, 0x8c, 0x97, 0xd8, 0x33, 0xd1, 0xce, 0xac, 0x6b, 0xdf, 0xf1, 0x08, - 0x7d, 0x16, 0x1e, 0x81, 0xab, 0x5e, 0xf6, 0x12, 0x21, 0x54, 0xa1, 0xe4, 0x45, 0xd0, 0xfc, 0xac, - 0xff, 0x52, 0x6e, 0x72, 0xb5, 0x9e, 0xf9, 0xbe, 0xef, 0x9c, 0x6f, 0xce, 0xf1, 0x9c, 0x41, 0x01, - 0xcf, 0xe8, 0x38, 0xd5, 0xd3, 0x68, 0xbc, 0x17, 0x71, 0x10, 0xa0, 0x52, 0x15, 0x9e, 0x65, 0x52, - 0x4b, 0x8c, 0x3c, 0x12, 0x8e, 0xf7, 0x9a, 0x0d, 0x2e, 0xb9, 0xb4, 0xdb, 0x91, 0xf9, 0xe5, 0x18, - 0xcd, 0x25, 0xad, 0x27, 0x3b, 0x64, 0x63, 0x01, 0x19, 0x29, 0xee, 0x43, 0x36, 0x6f, 0x73, 0x29, - 0xf9, 0x10, 0x22, 0xbb, 0xea, 0xe7, 0x27, 0x11, 0x15, 0x5e, 0xb1, 0xf5, 0xe7, 0x0d, 0xb4, 0xf6, - 0x3d, 0xcd, 0xe8, 0x48, 0xe1, 0xb7, 0x51, 0x91, 0x9a, 0xa4, 0x2c, 0x28, 0xb7, 0xcb, 0xdb, 0x37, - 0xe3, 0x9b, 0x7e, 0xe7, 0x11, 0xc3, 0xbb, 0xa8, 0x91, 0x48, 0xa1, 0x33, 0x9a, 0x68, 0xa2, 0x64, - 0x9e, 0x25, 0x40, 0x06, 0x54, 0x0d, 0x82, 0x57, 0x2c, 0x11, 0x17, 0x58, 0xd7, 0x42, 0x5f, 0x53, - 0x35, 0xc0, 0x1f, 0xa1, 0xb7, 0xfa, 0x59, 0xca, 0x38, 0x10, 0xd0, 0x03, 0xc8, 0x20, 0x1f, 0x11, - 0xca, 0x58, 0x06, 0x4a, 0x05, 0x15, 0x2b, 0xda, 0x70, 0xf0, 0xb1, 0x47, 0x1f, 0x3a, 0x10, 0xdf, - 0x43, 0xeb, 0x5e, 0x97, 0x0c, 0x68, 0x2a, 0x8c, 0x9b, 0xeb, 0xed, 0xf2, 0x76, 0x25, 0xae, 0xbb, - 0xed, 0x43, 0xb3, 0xfb, 0x88, 0xe1, 0x2f, 0xd0, 0x1d, 0x95, 0x72, 0x01, 0x8c, 0xd8, 0x4f, 0x46, - 0x14, 0x68, 0xa2, 0x27, 0x8a, 0x3c, 0x49, 0x05, 0x93, 0x4f, 0x82, 0x35, 0x2b, 0x0a, 0x1c, 0xa7, - 0x6b, 0x29, 0x5d, 0xd0, 0xbd, 0x89, 0xfa, 0xc9, 0xe2, 0xb8, 0x83, 0x36, 0xbc, 0xbe, 0x4f, 0x75, - 0x32, 0x80, 0x99, 0xf0, 0x55, 0x2b, 0x7c, 0xc3, 0x81, 0x07, 0x0e, 0xf3, 0x9a, 0xcf, 0x50, 0x73, - 0x76, 0x18, 0x83, 0x53, 0x9d, 0x67, 0x73, 0xe1, 0x0d, 0x97, 0xb1, 0x60, 0x74, 0x67, 0x04, 0xaf, - 0xde, 0x43, 0x1b, 0x9a, 0x66, 0x1c, 0xb4, 0xa9, 0x08, 0xd1, 0x13, 0xa2, 0xd3, 0x11, 0xc8, 0x5c, - 0x07, 0xc8, 0x0a, 0xb1, 0x03, 0x8f, 0xf5, 0xa0, 0x37, 0xe9, 0x39, 0x04, 0x7f, 0x88, 0x30, 0x1d, - 0x43, 0x46, 0x39, 0x90, 0xfe, 0x50, 0x26, 0xa7, 0x56, 0x12, 0x54, 0x2d, 0xff, 0x96, 0x47, 0x0e, - 0x0c, 0x60, 0x04, 0xf8, 0x73, 0xb4, 0x59, 0xb0, 0x67, 0x36, 0x17, 0x64, 0x35, 0xe7, 0xcf, 0x53, - 0x8a, 0xba, 0xcf, 0xe5, 0x02, 0xdd, 0x51, 0x43, 0xaa, 0x06, 0xe4, 0xc4, 0xb4, 0x32, 0x95, 0x62, - 0xb9, 0xb2, 0x41, 0xbd, 0x5d, 0xde, 0xae, 0x1d, 0x84, 0xcf, 0x5e, 0xdc, 0x2d, 0xfd, 0xfd, 0xe2, - 0xee, 0x3d, 0x9e, 0xea, 0x41, 0xde, 0x0f, 0x13, 0x39, 0x8a, 0x12, 0xa9, 0x46, 0x52, 0xf9, 0xcf, - 0x8e, 0x62, 0xa7, 0x91, 0x9e, 0x9e, 0x81, 0x0a, 0x8f, 0x20, 0x89, 0x03, 0x1b, 0xf3, 0x4b, 0x1f, - 0x72, 0xa1, 0x11, 0xf8, 0x57, 0xd4, 0x58, 0xc9, 0x67, 0x3b, 0x11, 0xbc, 0x76, 0xa5, 0x3c, 0x78, - 0x29, 0x8f, 0xed, 0x1b, 0x9e, 0xa2, 0x77, 0x56, 0x32, 0x5c, 0x6e, 0x5f, 0xb0, 0x7e, 0xa5, 0x74, - 0xad, 0xa5, 0x74, 0xc7, 0xab, 0x3d, 0xc7, 0x4f, 0xcb, 0x68, 0x67, 0x25, 0x77, 0x22, 0xc5, 0xc9, - 0x30, 0x4d, 0x74, 0x2a, 0xf8, 0xcb, 0x7c, 0xdc, 0xba, 0x92, 0x8f, 0xf7, 0x97, 0x7c, 0x1c, 0xce, - 0x53, 0x5c, 0xb6, 0xf4, 0x18, 0xbd, 0x97, 0x8b, 0xbe, 0x14, 0x8c, 0x58, 0x8d, 0xb1, 0xf1, 0xf2, - 0xab, 0xf3, 0xba, 0xfd, 0xa3, 0xb4, 0x1d, 0xb9, 0xeb, 0xb9, 0x97, 0xaf, 0xd0, 0x7e, 0xe5, 0xf7, - 0x7f, 0xda, 0xa5, 0xad, 0x3f, 0x2a, 0xa8, 0xf6, 0x95, 0x1b, 0x62, 0x5d, 0x4d, 0x35, 0xe0, 0x0f, - 0xd0, 0xda, 0x99, 0x1d, 0x2a, 0x76, 0x8c, 0x54, 0x3b, 0x38, 0x9c, 0x0f, 0xb5, 0xd0, 0x8d, 0x9b, - 0xd8, 0x33, 0xf0, 0x27, 0xe8, 0xf6, 0x90, 0x2a, 0x4d, 0x64, 0x5f, 0x41, 0x36, 0x06, 0x46, 0x60, - 0x0c, 0x42, 0x13, 0x21, 0x45, 0x02, 0x76, 0xb8, 0x54, 0xe2, 0x37, 0x0d, 0xe1, 0xb1, 0xc7, 0x8f, - 0x0d, 0xfc, 0x9d, 0x41, 0xf1, 0xc7, 0xa8, 0x26, 0x73, 0xcd, 0xa5, 0x39, 0x87, 0x9e, 0xa8, 0xe0, - 0x5a, 0xfb, 0xda, 0x76, 0xb5, 0xd3, 0x08, 0xdd, 0xb8, 0x0b, 0x8b, 0x71, 0x17, 0x3e, 0x14, 0xd3, - 0xb8, 0x5a, 0x30, 0x7b, 0x13, 0x85, 0xf7, 0x51, 0xdd, 0xb4, 0x22, 0xcd, 0x46, 0xd4, 0xd4, 0xcc, - 0xcc, 0xa3, 0xff, 0x57, 0x2e, 0x53, 0x71, 0x1f, 0x6d, 0xce, 0x5a, 0xe7, 0xac, 0x8e, 0xa5, 0x06, - 0x92, 0x41, 0x22, 0x33, 0xa6, 0x82, 0x9b, 0x36, 0xd2, 0xbb, 0x8b, 0x07, 0x2e, 0xfa, 0x60, 0x9d, - 0xff, 0x28, 0x35, 0xc4, 0x96, 0x3b, 0x9f, 0x13, 0x2b, 0x80, 0xc2, 0x0f, 0x50, 0x9d, 0xc1, 0x10, - 0x38, 0xd5, 0x40, 0x4e, 0x61, 0xaa, 0x02, 0x64, 0xa3, 0x6e, 0x2e, 0x46, 0xfd, 0x56, 0xf1, 0x23, - 0xcf, 0xf9, 0x06, 0xa6, 0x2a, 0xae, 0xb1, 0x85, 0x15, 0x7e, 0x80, 0xd6, 0x21, 0x4b, 0x3a, 0xbb, - 0x44, 0x4b, 0xc2, 0x40, 0xc8, 0x91, 0x0a, 0xaa, 0x36, 0x46, 0xb0, 0xe4, 0x2c, 0x3e, 0xec, 0xec, - 0xf6, 0xe4, 0x91, 0x21, 0xc4, 0x75, 0x2b, 0xf0, 0x2b, 0x85, 0x7f, 0x41, 0xad, 0x5c, 0xb8, 0xc1, - 0xc8, 0x88, 0x02, 0xc1, 0x4c, 0xa8, 0xd9, 0xc9, 0x4d, 0xb9, 0x6b, 0x36, 0x60, 0x73, 0x31, 0x60, - 0x17, 0x04, 0xeb, 0xc9, 0xe2, 0xc0, 0x71, 0x73, 0x16, 0x61, 0x19, 0xe8, 0x4d, 0xd4, 0xd6, 0x3e, - 0xaa, 0x2d, 0xa6, 0xc7, 0x0d, 0x74, 0xdd, 0x1a, 0xf0, 0x2f, 0x8f, 0x5b, 0x98, 0x5d, 0x6b, 0xdf, - 0x3f, 0x33, 0x6e, 0x71, 0xf0, 0xc3, 0xb3, 0xf3, 0x56, 0xf9, 0xf9, 0x79, 0xab, 0xfc, 0xef, 0x79, - 0xab, 0xfc, 0xf4, 0xa2, 0x55, 0x7a, 0x7e, 0xd1, 0x2a, 0xfd, 0x75, 0xd1, 0x2a, 0xfd, 0xfc, 0xe9, - 0xc2, 0xa5, 0x39, 0x03, 0xce, 0xa7, 0xbf, 0x8d, 0x8b, 0x37, 0x72, 0xc7, 0xbd, 0x1e, 0xd1, 0x48, - 0xb2, 0x7c, 0x08, 0xd1, 0xf8, 0x7e, 0x34, 0x29, 0x20, 0x77, 0x9b, 0xfa, 0x6b, 0xb6, 0xef, 0xf7, - 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x74, 0xfe, 0x63, 0x78, 0x9d, 0x07, 0x00, 0x00, + 0x14, 0x8e, 0x69, 0x1a, 0xc8, 0xd8, 0x26, 0x65, 0xea, 0xd0, 0x8d, 0x13, 0x5c, 0x13, 0x44, 0x15, + 0x10, 0xd9, 0x4d, 0x5c, 0x09, 0x44, 0xca, 0x4f, 0x9b, 0xc4, 0x40, 0x85, 0x20, 0x68, 0x6d, 0x40, + 0xe2, 0x82, 0x61, 0xbc, 0x73, 0xb2, 0x5e, 0x62, 0xcf, 0x44, 0x3b, 0xb3, 0xae, 0x7d, 0xc7, 0x23, + 0xf4, 0x59, 0x78, 0x02, 0x2e, 0x7b, 0xd9, 0x4b, 0x84, 0x50, 0x85, 0x92, 0x17, 0x41, 0xf3, 0xb3, + 0xf6, 0xda, 0x4d, 0x6f, 0x72, 0xb5, 0x9e, 0xf9, 0xbe, 0xef, 0x9c, 0x6f, 0xce, 0xf1, 0x9c, 0x41, + 0x5e, 0x9c, 0xd2, 0x51, 0xa2, 0x26, 0xc1, 0x68, 0x3f, 0x88, 0x81, 0x83, 0x4c, 0xa4, 0x7f, 0x9e, + 0x0a, 0x25, 0x30, 0x72, 0x88, 0x3f, 0xda, 0xaf, 0xd7, 0x62, 0x11, 0x0b, 0xb3, 0x1d, 0xe8, 0x5f, + 0x96, 0x51, 0x9f, 0xd3, 0x3a, 0xb2, 0x45, 0xd6, 0x0b, 0xc8, 0x50, 0xc6, 0x2e, 0x64, 0x7d, 0x23, + 0x16, 0x22, 0x1e, 0x40, 0x60, 0x56, 0xbd, 0xec, 0x34, 0xa0, 0xdc, 0x29, 0xb6, 0xff, 0x5a, 0x45, + 0x2b, 0x3f, 0xd0, 0x94, 0x0e, 0x25, 0x7e, 0x07, 0xe5, 0xa9, 0x49, 0xc2, 0xbc, 0x52, 0xb3, 0xb4, + 0xb3, 0x1a, 0xae, 0xba, 0x9d, 0xc7, 0x0c, 0xef, 0xa1, 0x5a, 0x24, 0xb8, 0x4a, 0x69, 0xa4, 0x88, + 0x14, 0x59, 0x1a, 0x01, 0xe9, 0x53, 0xd9, 0xf7, 0x5e, 0x33, 0x44, 0x9c, 0x63, 0x1d, 0x03, 0x7d, + 0x43, 0x65, 0x1f, 0x7f, 0x8c, 0xee, 0xf4, 0xd2, 0x84, 0xc5, 0x40, 0x40, 0xf5, 0x21, 0x85, 0x6c, + 0x48, 0x28, 0x63, 0x29, 0x48, 0xe9, 0x2d, 0x1b, 0xd1, 0xba, 0x85, 0xdb, 0x0e, 0x7d, 0x64, 0x41, + 0x7c, 0x0f, 0xad, 0x39, 0x5d, 0xd4, 0xa7, 0x09, 0xd7, 0x6e, 0x6e, 0x36, 0x4b, 0x3b, 0xcb, 0x61, + 0xd5, 0x6e, 0x1f, 0xe9, 0xdd, 0xc7, 0x0c, 0x7f, 0x81, 0xb6, 0x64, 0x12, 0x73, 0x60, 0xc4, 0x7c, + 0x52, 0x22, 0x41, 0x11, 0x35, 0x96, 0xe4, 0x49, 0xc2, 0x99, 0x78, 0xe2, 0xad, 0x18, 0x91, 0x67, + 0x39, 0x1d, 0x43, 0xe9, 0x80, 0xea, 0x8e, 0xe5, 0xcf, 0x06, 0xc7, 0x2d, 0xb4, 0xee, 0xf4, 0x3d, + 0xaa, 0xa2, 0x3e, 0x4c, 0x85, 0xaf, 0x1b, 0xe1, 0x6d, 0x0b, 0x1e, 0x5a, 0xcc, 0x69, 0x3e, 0x43, + 0xf5, 0xe9, 0x61, 0x34, 0x4e, 0x55, 0x96, 0xce, 0x84, 0x6f, 0xd8, 0x8c, 0x39, 0xa3, 0x33, 0x25, + 0x38, 0xf5, 0x3e, 0x5a, 0x57, 0x34, 0x8d, 0x41, 0xe9, 0x8a, 0x10, 0x35, 0x26, 0x2a, 0x19, 0x82, + 0xc8, 0x94, 0x87, 0x8c, 0x10, 0x5b, 0xb0, 0xad, 0xfa, 0xdd, 0x71, 0xd7, 0x22, 0xf8, 0x23, 0x84, + 0xe9, 0x08, 0x52, 0x1a, 0x03, 0xe9, 0x0d, 0x44, 0x74, 0x66, 0x24, 0x5e, 0xd9, 0xf0, 0x6f, 0x39, + 0xe4, 0x50, 0x03, 0x5a, 0x80, 0x3f, 0x47, 0x9b, 0x39, 0x7b, 0x6a, 0xb3, 0x20, 0xab, 0x58, 0x7f, + 0x8e, 0x92, 0xd7, 0x7d, 0x26, 0xe7, 0x68, 0x4b, 0x0e, 0xa8, 0xec, 0x93, 0x53, 0xdd, 0xca, 0x44, + 0xf0, 0xf9, 0xca, 0x7a, 0xd5, 0x66, 0x69, 0xa7, 0x72, 0xe8, 0x3f, 0x7b, 0x71, 0x77, 0xe9, 0x9f, + 0x17, 0x77, 0xef, 0xc5, 0x89, 0xea, 0x67, 0x3d, 0x3f, 0x12, 0xc3, 0x20, 0x12, 0x72, 0x28, 0xa4, + 0xfb, 0xec, 0x4a, 0x76, 0x16, 0xa8, 0xc9, 0x39, 0x48, 0xff, 0x18, 0xa2, 0xd0, 0x33, 0x31, 0xbf, + 0x72, 0x21, 0x0b, 0x8d, 0xc0, 0xbf, 0xa1, 0xda, 0x42, 0x3e, 0xd3, 0x09, 0xef, 0xcd, 0x6b, 0xe5, + 0xc1, 0x73, 0x79, 0x4c, 0xdf, 0xf0, 0x04, 0xbd, 0xbb, 0x90, 0xe1, 0xe5, 0xf6, 0x79, 0x6b, 0xd7, + 0x4a, 0xd7, 0x98, 0x4b, 0xd7, 0x5e, 0xec, 0x39, 0x7e, 0x5a, 0x42, 0xbb, 0x0b, 0xb9, 0x23, 0xc1, + 0x4f, 0x07, 0x49, 0xa4, 0x12, 0x1e, 0x5f, 0xe5, 0xe3, 0xd6, 0xb5, 0x7c, 0x7c, 0x30, 0xe7, 0xe3, + 0x68, 0x96, 0xe2, 0x65, 0x4b, 0x27, 0xe8, 0xfd, 0x8c, 0xf7, 0x04, 0x67, 0xc4, 0x68, 0xb4, 0x8d, + 0xab, 0xaf, 0xce, 0x5b, 0xe6, 0x8f, 0xd2, 0xb4, 0xe4, 0x8e, 0xe3, 0x5e, 0x71, 0x85, 0x1e, 0x14, + 0xae, 0x03, 0x8c, 0x80, 0x2b, 0x32, 0x12, 0x0a, 0xf2, 0x28, 0xd8, 0x44, 0xb9, 0x93, 0x33, 0xda, + 0x9a, 0xf0, 0x93, 0x50, 0xe0, 0xc4, 0x5f, 0xa2, 0x2d, 0x5d, 0x90, 0x24, 0x1d, 0x02, 0x23, 0x22, + 0x53, 0xb1, 0xd0, 0x86, 0xd4, 0x38, 0x97, 0xdf, 0x36, 0xf2, 0x8d, 0x29, 0xe7, 0xc4, 0x51, 0xba, + 0x63, 0x1b, 0xe0, 0x60, 0xf9, 0x8f, 0x7f, 0x9b, 0x4b, 0xdb, 0x7f, 0x2e, 0xa3, 0xca, 0xd7, 0x76, + 0x84, 0x76, 0x14, 0x55, 0x80, 0x3f, 0x44, 0x2b, 0xe7, 0x66, 0xa4, 0x99, 0x21, 0x56, 0x6e, 0x61, + 0x7f, 0x36, 0x52, 0x7d, 0x3b, 0xec, 0x42, 0xc7, 0xc0, 0x9f, 0xa2, 0x8d, 0x01, 0x95, 0x8a, 0x88, + 0x9e, 0x84, 0x74, 0x04, 0xcc, 0x9d, 0x82, 0x0b, 0x1e, 0x81, 0x19, 0x6d, 0xcb, 0xe1, 0xdb, 0x9a, + 0x70, 0xe2, 0x70, 0x73, 0x86, 0xef, 0x35, 0x8a, 0x3f, 0x41, 0x95, 0x82, 0x69, 0xe9, 0xdd, 0x68, + 0xde, 0xd8, 0x29, 0xb7, 0x6a, 0xbe, 0x1d, 0xb6, 0x7e, 0x3e, 0x6c, 0xfd, 0x47, 0x7c, 0x12, 0x96, + 0xc5, 0xd4, 0xbb, 0xc4, 0x07, 0xa8, 0xea, 0xce, 0x44, 0x75, 0xc7, 0xf4, 0x34, 0x7c, 0xb5, 0x72, + 0x9e, 0x8a, 0x7b, 0x68, 0xf3, 0xaa, 0x82, 0xa7, 0x10, 0x89, 0x94, 0x49, 0x6f, 0xd5, 0x44, 0x7a, + 0xaf, 0x78, 0xe0, 0xf6, 0x62, 0xf5, 0x43, 0xc3, 0x9d, 0x4d, 0xa9, 0x05, 0x40, 0xe2, 0x87, 0xa8, + 0xca, 0x60, 0x00, 0x31, 0x55, 0x40, 0xce, 0x60, 0x22, 0x3d, 0x64, 0xa2, 0x6e, 0x16, 0xa3, 0x7e, + 0x27, 0xe3, 0x63, 0xc7, 0xf9, 0x16, 0x26, 0x32, 0xac, 0xb0, 0xc2, 0x0a, 0x3f, 0x44, 0x6b, 0x90, + 0x46, 0xad, 0x3d, 0xa2, 0x04, 0x61, 0xc0, 0xc5, 0x50, 0x7a, 0x65, 0x13, 0xc3, 0x9b, 0x73, 0x16, + 0x1e, 0xb5, 0xf6, 0xba, 0xe2, 0x58, 0x13, 0xc2, 0xaa, 0x11, 0xb8, 0x95, 0xc4, 0xbf, 0xa2, 0x46, + 0xc6, 0xed, 0x58, 0x66, 0x44, 0x02, 0x67, 0x3a, 0xd4, 0xf4, 0xe4, 0xba, 0xdc, 0x15, 0x13, 0xb0, + 0x5e, 0x0c, 0xd8, 0x01, 0xce, 0xba, 0x22, 0x3f, 0x70, 0x58, 0x9f, 0x46, 0x98, 0x07, 0xba, 0x63, + 0xb9, 0x7d, 0x80, 0x2a, 0xc5, 0xf4, 0xb8, 0x86, 0x6e, 0x1a, 0x03, 0xee, 0xdd, 0xb3, 0x0b, 0xbd, + 0x6b, 0xec, 0xbb, 0x47, 0xce, 0x2e, 0x0e, 0x7f, 0x7c, 0x76, 0xd1, 0x28, 0x3d, 0xbf, 0x68, 0x94, + 0xfe, 0xbb, 0x68, 0x94, 0x9e, 0x5e, 0x36, 0x96, 0x9e, 0x5f, 0x36, 0x96, 0xfe, 0xbe, 0x6c, 0x2c, + 0xfd, 0xf2, 0xa0, 0x70, 0x65, 0xcf, 0x21, 0x8e, 0x27, 0xbf, 0x8f, 0xf2, 0x17, 0x7a, 0xd7, 0xbe, + 0x5d, 0xc1, 0x50, 0xb0, 0x6c, 0x00, 0xc1, 0xe8, 0x7e, 0x30, 0xce, 0x21, 0x7b, 0x97, 0x7b, 0x2b, + 0xa6, 0xef, 0xf7, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xbb, 0x30, 0xf8, 0x1b, 0x08, 0x00, + 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -461,6 +480,20 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ConfirmedOutgoingTxWindow != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.ConfirmedOutgoingTxWindow)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + if m.EthereumEventVoteWindow != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.EthereumEventVoteWindow)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } if m.UnbondSlashingSignerSetTxsWindow != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.UnbondSlashingSignerSetTxsWindow)) i-- @@ -791,6 +824,12 @@ func (m *Params) Size() (n int) { if m.UnbondSlashingSignerSetTxsWindow != 0 { n += 2 + sovGenesis(uint64(m.UnbondSlashingSignerSetTxsWindow)) } + if m.EthereumEventVoteWindow != 0 { + n += 2 + sovGenesis(uint64(m.EthereumEventVoteWindow)) + } + if m.ConfirmedOutgoingTxWindow != 0 { + n += 2 + sovGenesis(uint64(m.ConfirmedOutgoingTxWindow)) + } return n } @@ -1278,6 +1317,44 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EthereumEventVoteWindow", wireType) + } + m.EthereumEventVoteWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EthereumEventVoteWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConfirmedOutgoingTxWindow", wireType) + } + m.ConfirmedOutgoingTxWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConfirmedOutgoingTxWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/module/x/gravity/types/key.go b/module/x/gravity/types/key.go index e179513fe..f1608da0a 100644 --- a/module/x/gravity/types/key.go +++ b/module/x/gravity/types/key.go @@ -62,6 +62,9 @@ const ( // EthereumHeightVoteKey indexes the latest heights observed by each validator EthereumHeightVoteKey + + // CompletedOutgoingTxKey indexes the completed outgoing txs + CompletedOutgoingTxKey ) //////////////////// @@ -117,6 +120,11 @@ func MakeOutgoingTxKey(storeIndex []byte) []byte { return append([]byte{OutgoingTxKey}, storeIndex...) } +// MakeCompletedOutgoingTxKey returns the store index passed with a prefix +func MakeCompletedOutgoingTxKey(storeIndex []byte) []byte { + return append([]byte{CompletedOutgoingTxKey}, storeIndex...) +} + ////////////////////// // Send To Ethereum // ////////////////////// diff --git a/module/x/gravity/types/query.pb.go b/module/x/gravity/types/query.pb.go index ece134a0b..4a5da8bb7 100644 --- a/module/x/gravity/types/query.pb.go +++ b/module/x/gravity/types/query.pb.go @@ -6,12 +6,14 @@ package types import ( context "context" fmt "fmt" + types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -2388,2199 +2390,2234 @@ func (m *LastObservedEthereumHeightResponse) GetLastObservedEthereumHeight() *La return nil } -func init() { - proto.RegisterType((*ParamsRequest)(nil), "gravity.v1.ParamsRequest") - proto.RegisterType((*ParamsResponse)(nil), "gravity.v1.ParamsResponse") - proto.RegisterType((*SignerSetTxRequest)(nil), "gravity.v1.SignerSetTxRequest") - proto.RegisterType((*LatestSignerSetTxRequest)(nil), "gravity.v1.LatestSignerSetTxRequest") - proto.RegisterType((*SignerSetTxResponse)(nil), "gravity.v1.SignerSetTxResponse") - proto.RegisterType((*BatchTxRequest)(nil), "gravity.v1.BatchTxRequest") - proto.RegisterType((*BatchTxResponse)(nil), "gravity.v1.BatchTxResponse") - proto.RegisterType((*ContractCallTxRequest)(nil), "gravity.v1.ContractCallTxRequest") - proto.RegisterType((*ContractCallTxResponse)(nil), "gravity.v1.ContractCallTxResponse") - proto.RegisterType((*SignerSetTxConfirmationsRequest)(nil), "gravity.v1.SignerSetTxConfirmationsRequest") - proto.RegisterType((*SignerSetTxConfirmationsResponse)(nil), "gravity.v1.SignerSetTxConfirmationsResponse") - proto.RegisterType((*SignerSetTxsRequest)(nil), "gravity.v1.SignerSetTxsRequest") - proto.RegisterType((*SignerSetTxsResponse)(nil), "gravity.v1.SignerSetTxsResponse") - proto.RegisterType((*BatchTxsRequest)(nil), "gravity.v1.BatchTxsRequest") - proto.RegisterType((*BatchTxsResponse)(nil), "gravity.v1.BatchTxsResponse") - proto.RegisterType((*ContractCallTxsRequest)(nil), "gravity.v1.ContractCallTxsRequest") - proto.RegisterType((*ContractCallTxsResponse)(nil), "gravity.v1.ContractCallTxsResponse") - proto.RegisterType((*UnsignedSignerSetTxsRequest)(nil), "gravity.v1.UnsignedSignerSetTxsRequest") - proto.RegisterType((*UnsignedSignerSetTxsResponse)(nil), "gravity.v1.UnsignedSignerSetTxsResponse") - proto.RegisterType((*UnsignedBatchTxsRequest)(nil), "gravity.v1.UnsignedBatchTxsRequest") - proto.RegisterType((*UnsignedBatchTxsResponse)(nil), "gravity.v1.UnsignedBatchTxsResponse") - proto.RegisterType((*UnsignedContractCallTxsRequest)(nil), "gravity.v1.UnsignedContractCallTxsRequest") - proto.RegisterType((*UnsignedContractCallTxsResponse)(nil), "gravity.v1.UnsignedContractCallTxsResponse") - proto.RegisterType((*BatchTxFeesRequest)(nil), "gravity.v1.BatchTxFeesRequest") - proto.RegisterType((*BatchTxFeesResponse)(nil), "gravity.v1.BatchTxFeesResponse") - proto.RegisterType((*ContractCallTxConfirmationsRequest)(nil), "gravity.v1.ContractCallTxConfirmationsRequest") - proto.RegisterType((*ContractCallTxConfirmationsResponse)(nil), "gravity.v1.ContractCallTxConfirmationsResponse") - proto.RegisterType((*BatchTxConfirmationsRequest)(nil), "gravity.v1.BatchTxConfirmationsRequest") - proto.RegisterType((*BatchTxConfirmationsResponse)(nil), "gravity.v1.BatchTxConfirmationsResponse") - proto.RegisterType((*LastSubmittedEthereumEventRequest)(nil), "gravity.v1.LastSubmittedEthereumEventRequest") - proto.RegisterType((*LastSubmittedEthereumEventResponse)(nil), "gravity.v1.LastSubmittedEthereumEventResponse") - proto.RegisterType((*ERC20ToDenomRequest)(nil), "gravity.v1.ERC20ToDenomRequest") - proto.RegisterType((*ERC20ToDenomResponse)(nil), "gravity.v1.ERC20ToDenomResponse") - proto.RegisterType((*DenomToERC20ParamsRequest)(nil), "gravity.v1.DenomToERC20ParamsRequest") - proto.RegisterType((*DenomToERC20ParamsResponse)(nil), "gravity.v1.DenomToERC20ParamsResponse") - proto.RegisterType((*DenomToERC20Request)(nil), "gravity.v1.DenomToERC20Request") - proto.RegisterType((*DenomToERC20Response)(nil), "gravity.v1.DenomToERC20Response") - proto.RegisterType((*DelegateKeysByValidatorRequest)(nil), "gravity.v1.DelegateKeysByValidatorRequest") - proto.RegisterType((*DelegateKeysByValidatorResponse)(nil), "gravity.v1.DelegateKeysByValidatorResponse") - proto.RegisterType((*DelegateKeysByEthereumSignerRequest)(nil), "gravity.v1.DelegateKeysByEthereumSignerRequest") - proto.RegisterType((*DelegateKeysByEthereumSignerResponse)(nil), "gravity.v1.DelegateKeysByEthereumSignerResponse") - proto.RegisterType((*DelegateKeysByOrchestratorRequest)(nil), "gravity.v1.DelegateKeysByOrchestratorRequest") - proto.RegisterType((*DelegateKeysByOrchestratorResponse)(nil), "gravity.v1.DelegateKeysByOrchestratorResponse") - proto.RegisterType((*DelegateKeysRequest)(nil), "gravity.v1.DelegateKeysRequest") - proto.RegisterType((*DelegateKeysResponse)(nil), "gravity.v1.DelegateKeysResponse") - proto.RegisterType((*BatchedSendToEthereumsRequest)(nil), "gravity.v1.BatchedSendToEthereumsRequest") - proto.RegisterType((*BatchedSendToEthereumsResponse)(nil), "gravity.v1.BatchedSendToEthereumsResponse") - proto.RegisterType((*UnbatchedSendToEthereumsRequest)(nil), "gravity.v1.UnbatchedSendToEthereumsRequest") - proto.RegisterType((*UnbatchedSendToEthereumsResponse)(nil), "gravity.v1.UnbatchedSendToEthereumsResponse") - proto.RegisterType((*LastObservedEthereumHeightRequest)(nil), "gravity.v1.LastObservedEthereumHeightRequest") - proto.RegisterType((*LastObservedEthereumHeightResponse)(nil), "gravity.v1.LastObservedEthereumHeightResponse") +type CompletedBatchTxsRequest struct { } -func init() { proto.RegisterFile("gravity/v1/query.proto", fileDescriptor_29a9d4192703013c) } - -var fileDescriptor_29a9d4192703013c = []byte{ - // 1842 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x49, 0x73, 0xdb, 0xc8, - 0x15, 0x26, 0x34, 0x96, 0x3d, 0x7a, 0xb2, 0xb6, 0x16, 0x6d, 0xcb, 0x94, 0x4c, 0xda, 0x2d, 0x8f, - 0xad, 0xb1, 0x22, 0x52, 0x92, 0xab, 0xb2, 0x6f, 0x23, 0xd9, 0x9e, 0xa4, 0x66, 0xbc, 0x84, 0xf4, - 0x4c, 0xd9, 0xa9, 0xa4, 0x10, 0x90, 0xe8, 0x01, 0x11, 0x91, 0x68, 0x19, 0x00, 0x99, 0x61, 0xaa, - 0x52, 0x95, 0x4a, 0xaa, 0x72, 0xc8, 0x21, 0x35, 0x87, 0x5c, 0x72, 0xcf, 0x29, 0xd7, 0xfc, 0x89, - 0x39, 0xce, 0x31, 0xa7, 0x2c, 0xf6, 0x1f, 0x49, 0xa1, 0x17, 0xb0, 0x1b, 0x6c, 0x80, 0xb4, 0xa2, - 0x9c, 0x6c, 0xbe, 0xe5, 0x7b, 0x0b, 0x5e, 0xbf, 0x7e, 0xaf, 0x05, 0x57, 0xbd, 0xd0, 0x19, 0xfa, - 0xf1, 0xa8, 0x31, 0x3c, 0x68, 0xbc, 0x1a, 0x90, 0x70, 0x54, 0x3f, 0x0d, 0x69, 0x4c, 0x11, 0x08, - 0x7a, 0x7d, 0x78, 0x50, 0xb9, 0xd7, 0xa1, 0x51, 0x9f, 0x46, 0x8d, 0xb6, 0x13, 0x11, 0x2e, 0xd4, - 0x18, 0x1e, 0xb4, 0x49, 0xec, 0x1c, 0x34, 0x4e, 0x1d, 0xcf, 0x0f, 0x9c, 0xd8, 0xa7, 0x01, 0xd7, - 0xab, 0x54, 0x55, 0x59, 0x29, 0xd5, 0xa1, 0xbe, 0xe4, 0x97, 0x3d, 0xea, 0x51, 0xf6, 0xdf, 0x46, - 0xf2, 0x3f, 0x41, 0xdd, 0xf2, 0x28, 0xf5, 0x7a, 0xa4, 0xe1, 0x9c, 0xfa, 0x0d, 0x27, 0x08, 0x68, - 0xcc, 0x20, 0x23, 0xc1, 0xdd, 0x50, 0x7c, 0xf4, 0x48, 0x40, 0x22, 0xdf, 0xc8, 0x11, 0x0e, 0x73, - 0xce, 0x15, 0x85, 0xd3, 0x8f, 0x3c, 0xa1, 0x80, 0x57, 0x60, 0xe9, 0x99, 0x13, 0x3a, 0xfd, 0xa8, - 0x49, 0x5e, 0x0d, 0x48, 0x14, 0xe3, 0x23, 0x58, 0x96, 0x84, 0xe8, 0x94, 0x06, 0x11, 0x41, 0xfb, - 0x70, 0xf1, 0x94, 0x51, 0x36, 0xac, 0x9b, 0xd6, 0xce, 0xe2, 0x21, 0xaa, 0x8f, 0x53, 0x51, 0xe7, - 0xb2, 0x47, 0x17, 0xbe, 0xfc, 0x67, 0xad, 0xd4, 0x14, 0x72, 0xf8, 0xfb, 0x80, 0x5a, 0xbe, 0x17, - 0x90, 0xb0, 0x45, 0xe2, 0xe7, 0x9f, 0x0b, 0x64, 0xb4, 0x03, 0xab, 0x11, 0xa3, 0xda, 0x11, 0x89, - 0xed, 0x80, 0x06, 0x1d, 0xc2, 0x10, 0x2f, 0x34, 0x97, 0x23, 0x29, 0xfd, 0x24, 0xa1, 0xe2, 0x0a, - 0x6c, 0x7c, 0xec, 0xc4, 0x24, 0x8a, 0x27, 0x51, 0xf0, 0x63, 0x58, 0xd7, 0xa8, 0xc2, 0xc9, 0xaf, - 0x03, 0x8c, 0xc1, 0x85, 0xa3, 0xd7, 0x54, 0x47, 0x55, 0xa5, 0x85, 0xd4, 0x1e, 0x7e, 0x01, 0xcb, - 0x47, 0x4e, 0xdc, 0xe9, 0x8e, 0xdd, 0x7c, 0x0f, 0x96, 0x63, 0x7a, 0x42, 0x02, 0xbb, 0x43, 0x83, - 0x38, 0x74, 0x3a, 0x1c, 0x6d, 0xa1, 0xb9, 0xc4, 0xa8, 0xc7, 0x82, 0x88, 0x6a, 0xb0, 0xd8, 0x4e, - 0x14, 0x45, 0x20, 0x73, 0x2c, 0x10, 0x60, 0x24, 0x1e, 0xc4, 0x77, 0x61, 0x25, 0x45, 0x16, 0x4e, - 0xbe, 0x0f, 0xf3, 0x4c, 0x40, 0xf8, 0xb7, 0xae, 0xfa, 0x27, 0x65, 0xb9, 0x04, 0x1e, 0xc0, 0x15, - 0x69, 0xea, 0xd8, 0xe9, 0xf5, 0xc6, 0xee, 0xed, 0x01, 0xf2, 0x83, 0xa1, 0xd3, 0xf3, 0x5d, 0x56, - 0x12, 0x76, 0xd4, 0xa1, 0xa7, 0x3c, 0x8f, 0x97, 0x9b, 0x6b, 0x2a, 0xa7, 0x95, 0x30, 0x26, 0xc4, - 0x55, 0x6f, 0x35, 0x71, 0xee, 0x74, 0x0b, 0xae, 0x66, 0xcd, 0x0a, 0xdf, 0xbf, 0x05, 0xd0, 0xa3, - 0x9e, 0xdf, 0xb1, 0x3b, 0x4e, 0xaf, 0x27, 0x02, 0xa8, 0xa8, 0x01, 0x64, 0xf4, 0x16, 0x98, 0x74, - 0xf2, 0x03, 0x7f, 0x04, 0x35, 0x25, 0xfb, 0xc7, 0x34, 0xf8, 0xcc, 0x0f, 0xfb, 0xbc, 0xa0, 0xdf, - 0xbe, 0x36, 0x3c, 0xb8, 0x99, 0x0f, 0x26, 0x7c, 0x3d, 0xe6, 0xc5, 0xe0, 0xc4, 0x83, 0x90, 0x24, - 0x55, 0xfb, 0xce, 0xce, 0xe2, 0xe1, 0x76, 0x4e, 0x31, 0xa8, 0x08, 0x4d, 0x45, 0x0d, 0xff, 0x5c, - 0x2b, 0xb4, 0xd4, 0xd3, 0x47, 0x00, 0xe3, 0x33, 0x2e, 0xf2, 0x70, 0xa7, 0xce, 0x0f, 0x79, 0x3d, - 0x39, 0xe4, 0x75, 0xde, 0x35, 0xc4, 0x51, 0xaf, 0x3f, 0x73, 0x3c, 0x22, 0x74, 0x9b, 0x8a, 0x26, - 0xfe, 0x8b, 0x05, 0x65, 0x1d, 0x5f, 0x38, 0xff, 0x4d, 0x58, 0x1c, 0xa7, 0x42, 0x7a, 0x9f, 0x5b, - 0xca, 0x90, 0xa6, 0x27, 0x42, 0x1f, 0x6a, 0xae, 0xcd, 0x31, 0xd7, 0xee, 0x4e, 0x75, 0x8d, 0x9b, - 0xd5, 0x7c, 0x7b, 0x99, 0x96, 0xee, 0xb9, 0x87, 0xfd, 0x47, 0x0b, 0x56, 0xc7, 0xd8, 0x22, 0xe4, - 0x3d, 0xb8, 0xc4, 0xaa, 0x3e, 0xfd, 0x58, 0xc6, 0x93, 0x21, 0x65, 0xce, 0x2f, 0xce, 0x5f, 0x64, - 0xab, 0xfd, 0xdc, 0xc3, 0xfd, 0xb3, 0x05, 0xd7, 0x26, 0x4c, 0xa4, 0x7d, 0x75, 0x3e, 0x39, 0x4b, - 0x32, 0xe6, 0xa2, 0xc3, 0xc4, 0x05, 0xcf, 0x2f, 0xf0, 0x6f, 0xc0, 0xe6, 0x27, 0x01, 0xab, 0x1c, - 0xd7, 0x54, 0xe3, 0x1b, 0x70, 0xc9, 0x71, 0xdd, 0x90, 0x44, 0x91, 0xe8, 0x7d, 0xf2, 0x27, 0x7e, - 0x01, 0x5b, 0x66, 0xc5, 0xff, 0xb5, 0x78, 0xf1, 0x7d, 0xb8, 0x26, 0x91, 0xb3, 0xb5, 0x97, 0xef, - 0xce, 0x8f, 0x61, 0x63, 0x52, 0xe9, 0x4c, 0x45, 0x85, 0xbf, 0x0d, 0x55, 0x09, 0x95, 0x53, 0x13, - 0xf9, 0x6e, 0xb4, 0xa0, 0x96, 0xab, 0x7b, 0xd6, 0x8f, 0x8d, 0xcb, 0x80, 0x84, 0x93, 0x8f, 0x08, - 0x49, 0xaf, 0xe7, 0x21, 0xac, 0x6b, 0x54, 0x01, 0x6f, 0xc3, 0x85, 0xcf, 0x48, 0x1a, 0xe9, 0x75, - 0xad, 0x26, 0x64, 0x35, 0x1c, 0x53, 0x3f, 0x38, 0xda, 0x4f, 0x2e, 0xea, 0xbf, 0xfd, 0xab, 0xb6, - 0xe3, 0xf9, 0x71, 0x77, 0xd0, 0xae, 0x77, 0x68, 0xbf, 0x21, 0x26, 0x14, 0xfe, 0xcf, 0x5e, 0xe4, - 0x9e, 0x34, 0xe2, 0xd1, 0x29, 0x89, 0x98, 0x42, 0xd4, 0x64, 0xc0, 0xf8, 0x77, 0x16, 0x60, 0xdd, - 0x4f, 0x63, 0x1f, 0xff, 0xff, 0xde, 0x4e, 0x7d, 0xd8, 0x2e, 0xf4, 0x41, 0x24, 0xe3, 0x91, 0xa1, - 0xfd, 0xdf, 0xc9, 0x4f, 0x78, 0xee, 0x0d, 0x40, 0x60, 0x53, 0xe4, 0xda, 0x18, 0x6b, 0x66, 0x02, - 0xb0, 0xb2, 0x13, 0x80, 0x61, 0x92, 0x98, 0x33, 0x4c, 0x12, 0xd8, 0x86, 0x2d, 0xb3, 0x19, 0x11, - 0xce, 0x0f, 0x0c, 0xe1, 0xd4, 0x0c, 0xb5, 0x9c, 0x1b, 0xc7, 0xf7, 0xe0, 0xd6, 0xc7, 0x4e, 0x14, - 0xb7, 0x06, 0xed, 0xbe, 0x1f, 0xc7, 0xc4, 0x7d, 0x18, 0x77, 0x49, 0x48, 0x06, 0xfd, 0x87, 0x43, - 0x12, 0xc4, 0xd3, 0xab, 0xfb, 0x21, 0xe0, 0x22, 0x75, 0xe1, 0x65, 0x0d, 0x16, 0x49, 0x42, 0xd0, - 0xb3, 0xc1, 0x48, 0xfc, 0xe3, 0xed, 0xc2, 0xfa, 0xc3, 0xe6, 0xf1, 0xe1, 0xfe, 0x73, 0xfa, 0x80, - 0x04, 0xb4, 0x2f, 0xed, 0x96, 0x61, 0x9e, 0x84, 0x9d, 0xc3, 0x7d, 0x61, 0x95, 0xff, 0xc0, 0x2f, - 0xa1, 0xac, 0x0b, 0x0b, 0x2b, 0x65, 0x98, 0x77, 0x13, 0x82, 0x94, 0x66, 0x3f, 0xd0, 0x2e, 0xac, - 0xf1, 0xe2, 0xb5, 0x69, 0xe8, 0xb3, 0x26, 0x47, 0x5c, 0x96, 0xeb, 0x77, 0x9b, 0xab, 0x9c, 0xf1, - 0x34, 0xa5, 0xe3, 0x03, 0xb8, 0xce, 0x30, 0x9f, 0x53, 0x66, 0x41, 0x9b, 0x7e, 0xcd, 0xf8, 0xf8, - 0xaf, 0x16, 0x54, 0x4c, 0x3a, 0xc2, 0xa9, 0x1b, 0x00, 0xc9, 0x41, 0xb3, 0x55, 0xcd, 0x85, 0x84, - 0xc2, 0x74, 0x12, 0x36, 0x0b, 0xca, 0x0e, 0x9c, 0x3e, 0x11, 0x25, 0xb0, 0xc0, 0x28, 0x4f, 0x9c, - 0x3e, 0x41, 0xb7, 0xe0, 0x32, 0x67, 0x47, 0xa3, 0x7e, 0x9b, 0xf6, 0x36, 0xde, 0x61, 0x02, 0x8b, - 0x8c, 0xd6, 0x62, 0xa4, 0xa4, 0x90, 0xb8, 0x88, 0x4b, 0x3a, 0x7e, 0xdf, 0xe9, 0x45, 0x1b, 0x17, - 0x58, 0x7a, 0x97, 0x18, 0xf5, 0x81, 0x20, 0x26, 0x19, 0x56, 0xbd, 0x2c, 0x8e, 0xe9, 0x25, 0x94, - 0x75, 0xe1, 0x71, 0x86, 0x27, 0xbf, 0xc7, 0xdb, 0x65, 0xf8, 0x31, 0x54, 0x1f, 0x90, 0x1e, 0xf1, - 0x9c, 0x98, 0x7c, 0x44, 0x46, 0xd1, 0xd1, 0xe8, 0x53, 0x7e, 0x8e, 0x69, 0x28, 0x5d, 0xda, 0x85, - 0xb5, 0xa1, 0xa4, 0xd9, 0x7a, 0xd9, 0xad, 0xa6, 0x8c, 0x0f, 0x44, 0xfd, 0x0d, 0xa0, 0x96, 0x0b, - 0xa7, 0x14, 0x5f, 0xdc, 0xcd, 0x20, 0x01, 0x89, 0xbb, 0x02, 0x03, 0x1d, 0x40, 0x99, 0x86, 0x49, - 0x9f, 0x8f, 0x43, 0xcd, 0x26, 0xff, 0x1a, 0xeb, 0x2a, 0x4f, 0x9a, 0x7d, 0x02, 0xdb, 0xba, 0x59, - 0x59, 0xf7, 0xfc, 0x06, 0x93, 0xa1, 0xdc, 0x85, 0x15, 0x22, 0x18, 0x36, 0xbf, 0xce, 0x84, 0xf9, - 0x65, 0xa2, 0xc9, 0xe3, 0x3f, 0x58, 0x70, 0xbb, 0x18, 0x50, 0x04, 0xf3, 0x36, 0xc9, 0x39, 0x4b, - 0x60, 0x9f, 0xc2, 0x2d, 0xdd, 0x8f, 0xa7, 0x8a, 0x90, 0x0c, 0x2b, 0x0f, 0xd7, 0xca, 0xc7, 0xfd, - 0x35, 0xe0, 0x22, 0xdc, 0xb3, 0x44, 0x67, 0x48, 0xee, 0x9c, 0x31, 0xb9, 0x57, 0x92, 0xd2, 0x1f, - 0xdb, 0x96, 0xb7, 0xe5, 0x8b, 0xa4, 0xc8, 0x55, 0xb2, 0x70, 0xe2, 0x87, 0xb0, 0xe4, 0x0a, 0xba, - 0x7d, 0x42, 0x46, 0xb2, 0xab, 0x6e, 0xaa, 0x5d, 0xf5, 0x71, 0xe4, 0x69, 0xba, 0x97, 0x5d, 0xe5, - 0x17, 0x7e, 0x04, 0x37, 0x58, 0xdb, 0x25, 0x6e, 0x8b, 0x04, 0xee, 0x73, 0x2a, 0xbf, 0x65, 0xa4, - 0xac, 0x91, 0x11, 0x09, 0x5c, 0x92, 0x0d, 0x72, 0x89, 0x53, 0x65, 0xd2, 0xba, 0x50, 0xcd, 0xc3, - 0x49, 0x6f, 0xb3, 0xb5, 0x44, 0xc5, 0x8e, 0xa9, 0x2d, 0x83, 0x36, 0x4e, 0x11, 0xba, 0x7e, 0x73, - 0x25, 0xd2, 0xf1, 0xf0, 0x17, 0x56, 0x32, 0xa5, 0xb4, 0xcf, 0xc1, 0xe9, 0xcc, 0x74, 0x3c, 0x77, - 0xe6, 0xe9, 0xf8, 0xef, 0x16, 0xdc, 0xcc, 0x77, 0xe9, 0x7c, 0xe3, 0x3f, 0xbf, 0xe1, 0x79, 0x9b, - 0x5f, 0xa7, 0x4f, 0xdb, 0x11, 0x09, 0x87, 0xe3, 0xeb, 0xf0, 0x47, 0xc4, 0xf7, 0xba, 0xf2, 0x3a, - 0xc5, 0x7f, 0xb2, 0xf8, 0xad, 0x99, 0x27, 0x25, 0x82, 0xeb, 0xc2, 0x8d, 0x9e, 0x13, 0xc5, 0x36, - 0x15, 0x62, 0x69, 0x88, 0x76, 0x97, 0x09, 0x8a, 0xd5, 0xe3, 0x3d, 0x35, 0x50, 0xfe, 0x34, 0x22, - 0x01, 0x8f, 0x7a, 0xb4, 0x73, 0x22, 0x50, 0x2b, 0xbd, 0x5c, 0x8b, 0x87, 0xff, 0x29, 0xc3, 0xfc, - 0x4f, 0x92, 0x00, 0xd1, 0x07, 0x70, 0x91, 0x5f, 0x60, 0xe8, 0xfa, 0xe4, 0x4b, 0x8e, 0xf0, 0xbf, - 0x52, 0x31, 0xb1, 0xb8, 0xd3, 0xb8, 0x84, 0x9e, 0xc1, 0xa2, 0x32, 0xc7, 0xa3, 0x6a, 0xde, 0x80, - 0x2f, 0xc0, 0x6a, 0xb9, 0xfc, 0x14, 0xf1, 0x67, 0xb0, 0x36, 0xf1, 0xe4, 0x83, 0x6e, 0x4f, 0x86, - 0x7d, 0x36, 0xf4, 0x07, 0x70, 0x49, 0x0c, 0x49, 0xa8, 0x62, 0xda, 0x02, 0x04, 0xd2, 0xa6, 0x91, - 0x97, 0xa2, 0xbc, 0x84, 0x65, 0x7d, 0x72, 0x44, 0xb7, 0x0a, 0xc6, 0x78, 0x81, 0x89, 0x8b, 0x44, - 0x52, 0xe8, 0x16, 0x5c, 0x56, 0xf7, 0x29, 0x94, 0x17, 0x53, 0xfa, 0x7d, 0x6e, 0xe6, 0x0b, 0xa4, - 0xa0, 0x1f, 0xc2, 0xbb, 0x72, 0x2b, 0x42, 0xa6, 0xd0, 0x52, 0xb0, 0x2d, 0x33, 0x53, 0xf9, 0x38, - 0x2b, 0x99, 0xbd, 0x06, 0x15, 0x84, 0x95, 0xc2, 0x6e, 0x17, 0xca, 0xa4, 0xe8, 0xbf, 0x82, 0x8d, - 0xbc, 0x17, 0x1d, 0xb4, 0x3b, 0xc3, 0xab, 0x4d, 0x6a, 0xef, 0x6b, 0xb3, 0x09, 0xa7, 0x86, 0x4f, - 0xa0, 0x6c, 0x1a, 0xbc, 0xd1, 0xdd, 0x29, 0xc3, 0x75, 0x6a, 0x70, 0x67, 0xba, 0x60, 0x6a, 0xec, - 0xb7, 0x16, 0x6c, 0x16, 0x2c, 0x2f, 0xa8, 0x3e, 0xdb, 0x82, 0x92, 0xda, 0x6e, 0xcc, 0x2c, 0xaf, - 0xc6, 0x6b, 0x5a, 0xde, 0xf5, 0x78, 0x0b, 0xde, 0x05, 0xf4, 0x78, 0x8b, 0xde, 0x01, 0x70, 0x09, - 0xd9, 0xb0, 0x9a, 0x5d, 0xcd, 0xd1, 0xb6, 0x49, 0x3f, 0x5b, 0x8c, 0xb7, 0x8b, 0x85, 0x52, 0x03, - 0xf1, 0xf8, 0xc1, 0x20, 0x5b, 0x9c, 0xf7, 0x4c, 0x10, 0x39, 0x45, 0xba, 0x3b, 0x93, 0x6c, 0x6a, - 0xf5, 0x37, 0x50, 0xc9, 0x5f, 0x86, 0xd0, 0x9e, 0xde, 0xb0, 0xa6, 0xec, 0x5c, 0x95, 0xfa, 0xac, - 0xe2, 0x6a, 0xe3, 0x55, 0xd6, 0x7f, 0xbd, 0xf1, 0x4e, 0xbe, 0x16, 0x54, 0x6a, 0xb9, 0x7c, 0xb5, - 0xf3, 0xa8, 0x9b, 0x96, 0xde, 0x79, 0x0c, 0x0b, 0x9b, 0xde, 0x79, 0x4c, 0x4b, 0x1a, 0x2e, 0x21, - 0x02, 0x68, 0x72, 0x5f, 0x42, 0xda, 0x2d, 0x96, 0xbb, 0x83, 0x55, 0xee, 0x4c, 0x13, 0x53, 0x7d, - 0x57, 0xf9, 0xba, 0xef, 0x86, 0x55, 0x48, 0xf7, 0xdd, 0xb4, 0xfe, 0xe0, 0x12, 0x7a, 0x05, 0x57, - 0xcd, 0x13, 0x19, 0x7a, 0x7f, 0x22, 0x9b, 0x79, 0x83, 0x54, 0xe5, 0xde, 0x2c, 0xa2, 0x6a, 0x07, - 0xcc, 0x1b, 0x83, 0x50, 0xa6, 0x3e, 0x0b, 0xe7, 0x37, 0xbd, 0x03, 0x4e, 0x9b, 0xac, 0xf8, 0x19, - 0xca, 0x59, 0xad, 0xf4, 0x33, 0x54, 0xbc, 0xce, 0xe9, 0x67, 0x68, 0xca, 0xae, 0x86, 0x4b, 0xe8, - 0xf7, 0x16, 0x6c, 0x15, 0x6d, 0x42, 0xa8, 0x91, 0x8f, 0x67, 0x5c, 0xc2, 0x2a, 0xfb, 0xb3, 0x2b, - 0xa8, 0x27, 0x39, 0x7f, 0x5d, 0xd1, 0x4f, 0xf2, 0xd4, 0x75, 0x49, 0x3f, 0xc9, 0xd3, 0xb7, 0x20, - 0x59, 0xbb, 0x63, 0xb9, 0x6c, 0xed, 0x4e, 0xec, 0x32, 0xd9, 0xda, 0x9d, 0xdc, 0x6a, 0xc6, 0xdd, - 0xc9, 0x3c, 0x02, 0x4e, 0x76, 0xa7, 0xc2, 0x11, 0x76, 0xb2, 0x3b, 0x15, 0xcf, 0xb2, 0xb8, 0x74, - 0xf4, 0xc9, 0x97, 0xaf, 0xab, 0xd6, 0x57, 0xaf, 0xab, 0xd6, 0xbf, 0x5f, 0x57, 0xad, 0x2f, 0xde, - 0x54, 0x4b, 0x5f, 0xbd, 0xa9, 0x96, 0xfe, 0xf1, 0xa6, 0x5a, 0xfa, 0xe9, 0x77, 0x94, 0xe7, 0xc6, - 0x53, 0xe2, 0x79, 0xa3, 0x5f, 0x0e, 0xe5, 0xdf, 0x27, 0xf7, 0xda, 0xa1, 0xef, 0x7a, 0xa4, 0xd1, - 0xa7, 0xee, 0xa0, 0x47, 0x1a, 0xc3, 0xfb, 0x8d, 0xcf, 0x25, 0x8b, 0xbf, 0x43, 0xb6, 0x2f, 0xb2, - 0x3f, 0x55, 0xde, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x3f, 0x6e, 0x95, 0x9b, 0x1d, - 0x00, 0x00, +func (m *CompletedBatchTxsRequest) Reset() { *m = CompletedBatchTxsRequest{} } +func (m *CompletedBatchTxsRequest) String() string { return proto.CompactTextString(m) } +func (*CompletedBatchTxsRequest) ProtoMessage() {} +func (*CompletedBatchTxsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{51} +} +func (m *CompletedBatchTxsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompletedBatchTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompletedBatchTxsRequest.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 *CompletedBatchTxsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompletedBatchTxsRequest.Merge(m, src) +} +func (m *CompletedBatchTxsRequest) XXX_Size() int { + return m.Size() +} +func (m *CompletedBatchTxsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CompletedBatchTxsRequest.DiscardUnknown(m) } -// 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 +var xxx_messageInfo_CompletedBatchTxsRequest proto.InternalMessageInfo -// 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 { - // Module parameters query - Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) - // get info on individual outgoing data - SignerSetTx(ctx context.Context, in *SignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) - LatestSignerSetTx(ctx context.Context, in *LatestSignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) - BatchTx(ctx context.Context, in *BatchTxRequest, opts ...grpc.CallOption) (*BatchTxResponse, error) - ContractCallTx(ctx context.Context, in *ContractCallTxRequest, opts ...grpc.CallOption) (*ContractCallTxResponse, error) - // get collections of outgoing traffic from the bridge - SignerSetTxs(ctx context.Context, in *SignerSetTxsRequest, opts ...grpc.CallOption) (*SignerSetTxsResponse, error) - BatchTxs(ctx context.Context, in *BatchTxsRequest, opts ...grpc.CallOption) (*BatchTxsResponse, error) - ContractCallTxs(ctx context.Context, in *ContractCallTxsRequest, opts ...grpc.CallOption) (*ContractCallTxsResponse, error) - // TODO: can/should we group these into one endpoint? - SignerSetTxConfirmations(ctx context.Context, in *SignerSetTxConfirmationsRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsResponse, error) - BatchTxConfirmations(ctx context.Context, in *BatchTxConfirmationsRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsResponse, error) - ContractCallTxConfirmations(ctx context.Context, in *ContractCallTxConfirmationsRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsResponse, error) - // pending ethereum signature queries for orchestrators to figure out which - // signatures they are missing - // TODO: can/should we group this into one endpoint? - UnsignedSignerSetTxs(ctx context.Context, in *UnsignedSignerSetTxsRequest, opts ...grpc.CallOption) (*UnsignedSignerSetTxsResponse, error) - UnsignedBatchTxs(ctx context.Context, in *UnsignedBatchTxsRequest, opts ...grpc.CallOption) (*UnsignedBatchTxsResponse, error) - UnsignedContractCallTxs(ctx context.Context, in *UnsignedContractCallTxsRequest, opts ...grpc.CallOption) (*UnsignedContractCallTxsResponse, error) - LastSubmittedEthereumEvent(ctx context.Context, in *LastSubmittedEthereumEventRequest, opts ...grpc.CallOption) (*LastSubmittedEthereumEventResponse, error) - // Queries the fees for all pending batches, results are returned in sdk.Coin - // (fee_amount_int)(contract_address) style - BatchTxFees(ctx context.Context, in *BatchTxFeesRequest, opts ...grpc.CallOption) (*BatchTxFeesResponse, error) - // Query for info about denoms tracked by gravity - ERC20ToDenom(ctx context.Context, in *ERC20ToDenomRequest, opts ...grpc.CallOption) (*ERC20ToDenomResponse, error) - // DenomToERC20Params implements a query that allows ERC-20 parameter - // information to be retrieved by a Cosmos base denomination. - DenomToERC20Params(ctx context.Context, in *DenomToERC20ParamsRequest, opts ...grpc.CallOption) (*DenomToERC20ParamsResponse, error) - // Query for info about denoms tracked by gravity - DenomToERC20(ctx context.Context, in *DenomToERC20Request, opts ...grpc.CallOption) (*DenomToERC20Response, error) - // Query for batch send to ethereums - BatchedSendToEthereums(ctx context.Context, in *BatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*BatchedSendToEthereumsResponse, error) - // Query for unbatched send to ethereums - UnbatchedSendToEthereums(ctx context.Context, in *UnbatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*UnbatchedSendToEthereumsResponse, error) - // delegate keys - DelegateKeysByValidator(ctx context.Context, in *DelegateKeysByValidatorRequest, opts ...grpc.CallOption) (*DelegateKeysByValidatorResponse, error) - DelegateKeysByEthereumSigner(ctx context.Context, in *DelegateKeysByEthereumSignerRequest, opts ...grpc.CallOption) (*DelegateKeysByEthereumSignerResponse, error) - DelegateKeysByOrchestrator(ctx context.Context, in *DelegateKeysByOrchestratorRequest, opts ...grpc.CallOption) (*DelegateKeysByOrchestratorResponse, error) - DelegateKeys(ctx context.Context, in *DelegateKeysRequest, opts ...grpc.CallOption) (*DelegateKeysResponse, error) - LastObservedEthereumHeight(ctx context.Context, in *LastObservedEthereumHeightRequest, opts ...grpc.CallOption) (*LastObservedEthereumHeightResponse, error) +type CompletedBatchTxsResponse struct { + CompletedBatchTxs []*BatchTx `protobuf:"bytes,1,rep,name=completed_batch_txs,json=completedBatchTxs,proto3" json:"completed_batch_txs,omitempty"` } -type queryClient struct { - cc grpc1.ClientConn +func (m *CompletedBatchTxsResponse) Reset() { *m = CompletedBatchTxsResponse{} } +func (m *CompletedBatchTxsResponse) String() string { return proto.CompactTextString(m) } +func (*CompletedBatchTxsResponse) ProtoMessage() {} +func (*CompletedBatchTxsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{52} } - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} +func (m *CompletedBatchTxsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *queryClient) Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) { - out := new(ParamsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err +func (m *CompletedBatchTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompletedBatchTxsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil } - -func (c *queryClient) SignerSetTx(ctx context.Context, in *SignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) { - out := new(SignerSetTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/SignerSetTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedBatchTxsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompletedBatchTxsResponse.Merge(m, src) } - -func (c *queryClient) LatestSignerSetTx(ctx context.Context, in *LatestSignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) { - out := new(SignerSetTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/LatestSignerSetTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedBatchTxsResponse) XXX_Size() int { + return m.Size() } - -func (c *queryClient) BatchTx(ctx context.Context, in *BatchTxRequest, opts ...grpc.CallOption) (*BatchTxResponse, error) { - out := new(BatchTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedBatchTxsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CompletedBatchTxsResponse.DiscardUnknown(m) } -func (c *queryClient) ContractCallTx(ctx context.Context, in *ContractCallTxRequest, opts ...grpc.CallOption) (*ContractCallTxResponse, error) { - out := new(ContractCallTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/ContractCallTx", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_CompletedBatchTxsResponse proto.InternalMessageInfo + +func (m *CompletedBatchTxsResponse) GetCompletedBatchTxs() []*BatchTx { + if m != nil { + return m.CompletedBatchTxs } - return out, nil + return nil } -func (c *queryClient) SignerSetTxs(ctx context.Context, in *SignerSetTxsRequest, opts ...grpc.CallOption) (*SignerSetTxsResponse, error) { - out := new(SignerSetTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/SignerSetTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type CompletedContractCallTxsRequest struct { } -func (c *queryClient) BatchTxs(ctx context.Context, in *BatchTxsRequest, opts ...grpc.CallOption) (*BatchTxsResponse, error) { - out := new(BatchTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTxs", in, out, opts...) - if err != nil { - return nil, err +func (m *CompletedContractCallTxsRequest) Reset() { *m = CompletedContractCallTxsRequest{} } +func (m *CompletedContractCallTxsRequest) String() string { return proto.CompactTextString(m) } +func (*CompletedContractCallTxsRequest) ProtoMessage() {} +func (*CompletedContractCallTxsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{53} +} +func (m *CompletedContractCallTxsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompletedContractCallTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompletedContractCallTxsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *CompletedContractCallTxsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompletedContractCallTxsRequest.Merge(m, src) +} +func (m *CompletedContractCallTxsRequest) XXX_Size() int { + return m.Size() +} +func (m *CompletedContractCallTxsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CompletedContractCallTxsRequest.DiscardUnknown(m) } -func (c *queryClient) ContractCallTxs(ctx context.Context, in *ContractCallTxsRequest, opts ...grpc.CallOption) (*ContractCallTxsResponse, error) { - out := new(ContractCallTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/ContractCallTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_CompletedContractCallTxsRequest proto.InternalMessageInfo + +type CompletedContractCallTxsResponse struct { + CompletedContractCallTxs []*ContractCallTx `protobuf:"bytes,1,rep,name=completed_contract_call_txs,json=completedContractCallTxs,proto3" json:"completed_contract_call_txs,omitempty"` } -func (c *queryClient) SignerSetTxConfirmations(ctx context.Context, in *SignerSetTxConfirmationsRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsResponse, error) { - out := new(SignerSetTxConfirmationsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/SignerSetTxConfirmations", in, out, opts...) - if err != nil { - return nil, err +func (m *CompletedContractCallTxsResponse) Reset() { *m = CompletedContractCallTxsResponse{} } +func (m *CompletedContractCallTxsResponse) String() string { return proto.CompactTextString(m) } +func (*CompletedContractCallTxsResponse) ProtoMessage() {} +func (*CompletedContractCallTxsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{54} +} +func (m *CompletedContractCallTxsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompletedContractCallTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompletedContractCallTxsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *CompletedContractCallTxsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompletedContractCallTxsResponse.Merge(m, src) +} +func (m *CompletedContractCallTxsResponse) XXX_Size() int { + return m.Size() +} +func (m *CompletedContractCallTxsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CompletedContractCallTxsResponse.DiscardUnknown(m) } -func (c *queryClient) BatchTxConfirmations(ctx context.Context, in *BatchTxConfirmationsRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsResponse, error) { - out := new(BatchTxConfirmationsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTxConfirmations", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_CompletedContractCallTxsResponse proto.InternalMessageInfo + +func (m *CompletedContractCallTxsResponse) GetCompletedContractCallTxs() []*ContractCallTx { + if m != nil { + return m.CompletedContractCallTxs } - return out, nil + return nil } -func (c *queryClient) ContractCallTxConfirmations(ctx context.Context, in *ContractCallTxConfirmationsRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsResponse, error) { - out := new(ContractCallTxConfirmationsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/ContractCallTxConfirmations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type CompletedSignerSetTxsRequest struct { } -func (c *queryClient) UnsignedSignerSetTxs(ctx context.Context, in *UnsignedSignerSetTxsRequest, opts ...grpc.CallOption) (*UnsignedSignerSetTxsResponse, error) { - out := new(UnsignedSignerSetTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnsignedSignerSetTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedSignerSetTxsRequest) Reset() { *m = CompletedSignerSetTxsRequest{} } +func (m *CompletedSignerSetTxsRequest) String() string { return proto.CompactTextString(m) } +func (*CompletedSignerSetTxsRequest) ProtoMessage() {} +func (*CompletedSignerSetTxsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{55} } - -func (c *queryClient) UnsignedBatchTxs(ctx context.Context, in *UnsignedBatchTxsRequest, opts ...grpc.CallOption) (*UnsignedBatchTxsResponse, error) { - out := new(UnsignedBatchTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnsignedBatchTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedSignerSetTxsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *queryClient) UnsignedContractCallTxs(ctx context.Context, in *UnsignedContractCallTxsRequest, opts ...grpc.CallOption) (*UnsignedContractCallTxsResponse, error) { - out := new(UnsignedContractCallTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnsignedContractCallTxs", in, out, opts...) - if err != nil { - return nil, err +func (m *CompletedSignerSetTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompletedSignerSetTxsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil } - -func (c *queryClient) LastSubmittedEthereumEvent(ctx context.Context, in *LastSubmittedEthereumEventRequest, opts ...grpc.CallOption) (*LastSubmittedEthereumEventResponse, error) { - out := new(LastSubmittedEthereumEventResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/LastSubmittedEthereumEvent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedSignerSetTxsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompletedSignerSetTxsRequest.Merge(m, src) } - -func (c *queryClient) BatchTxFees(ctx context.Context, in *BatchTxFeesRequest, opts ...grpc.CallOption) (*BatchTxFeesResponse, error) { - out := new(BatchTxFeesResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTxFees", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedSignerSetTxsRequest) XXX_Size() int { + return m.Size() } - -func (c *queryClient) ERC20ToDenom(ctx context.Context, in *ERC20ToDenomRequest, opts ...grpc.CallOption) (*ERC20ToDenomResponse, error) { - out := new(ERC20ToDenomResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/ERC20ToDenom", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CompletedSignerSetTxsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CompletedSignerSetTxsRequest.DiscardUnknown(m) } -func (c *queryClient) DenomToERC20Params(ctx context.Context, in *DenomToERC20ParamsRequest, opts ...grpc.CallOption) (*DenomToERC20ParamsResponse, error) { - out := new(DenomToERC20ParamsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/DenomToERC20Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var xxx_messageInfo_CompletedSignerSetTxsRequest proto.InternalMessageInfo + +type CompletedSignerSetTxsResponse struct { + CompletedSignerSetTxs []*SignerSetTx `protobuf:"bytes,1,rep,name=completed_signer_set_txs,json=completedSignerSetTxs,proto3" json:"completed_signer_set_txs,omitempty"` } -func (c *queryClient) DenomToERC20(ctx context.Context, in *DenomToERC20Request, opts ...grpc.CallOption) (*DenomToERC20Response, error) { - out := new(DenomToERC20Response) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/DenomToERC20", in, out, opts...) - if err != nil { - return nil, err +func (m *CompletedSignerSetTxsResponse) Reset() { *m = CompletedSignerSetTxsResponse{} } +func (m *CompletedSignerSetTxsResponse) String() string { return proto.CompactTextString(m) } +func (*CompletedSignerSetTxsResponse) ProtoMessage() {} +func (*CompletedSignerSetTxsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{56} +} +func (m *CompletedSignerSetTxsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompletedSignerSetTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompletedSignerSetTxsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *CompletedSignerSetTxsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompletedSignerSetTxsResponse.Merge(m, src) +} +func (m *CompletedSignerSetTxsResponse) XXX_Size() int { + return m.Size() +} +func (m *CompletedSignerSetTxsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CompletedSignerSetTxsResponse.DiscardUnknown(m) } -func (c *queryClient) BatchedSendToEthereums(ctx context.Context, in *BatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*BatchedSendToEthereumsResponse, error) { - out := new(BatchedSendToEthereumsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchedSendToEthereums", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_CompletedSignerSetTxsResponse proto.InternalMessageInfo + +func (m *CompletedSignerSetTxsResponse) GetCompletedSignerSetTxs() []*SignerSetTx { + if m != nil { + return m.CompletedSignerSetTxs } - return out, nil + return nil } -func (c *queryClient) UnbatchedSendToEthereums(ctx context.Context, in *UnbatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*UnbatchedSendToEthereumsResponse, error) { - out := new(UnbatchedSendToEthereumsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnbatchedSendToEthereums", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type BatchTxConfirmationsByValidatorRequest struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } -func (c *queryClient) DelegateKeysByValidator(ctx context.Context, in *DelegateKeysByValidatorRequest, opts ...grpc.CallOption) (*DelegateKeysByValidatorResponse, error) { - out := new(DelegateKeysByValidatorResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeysByValidator", in, out, opts...) - if err != nil { - return nil, err +func (m *BatchTxConfirmationsByValidatorRequest) Reset() { + *m = BatchTxConfirmationsByValidatorRequest{} +} +func (m *BatchTxConfirmationsByValidatorRequest) String() string { return proto.CompactTextString(m) } +func (*BatchTxConfirmationsByValidatorRequest) ProtoMessage() {} +func (*BatchTxConfirmationsByValidatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{57} +} +func (m *BatchTxConfirmationsByValidatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchTxConfirmationsByValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchTxConfirmationsByValidatorRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *BatchTxConfirmationsByValidatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchTxConfirmationsByValidatorRequest.Merge(m, src) +} +func (m *BatchTxConfirmationsByValidatorRequest) XXX_Size() int { + return m.Size() +} +func (m *BatchTxConfirmationsByValidatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BatchTxConfirmationsByValidatorRequest.DiscardUnknown(m) } -func (c *queryClient) DelegateKeysByEthereumSigner(ctx context.Context, in *DelegateKeysByEthereumSignerRequest, opts ...grpc.CallOption) (*DelegateKeysByEthereumSignerResponse, error) { - out := new(DelegateKeysByEthereumSignerResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeysByEthereumSigner", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_BatchTxConfirmationsByValidatorRequest proto.InternalMessageInfo + +func (m *BatchTxConfirmationsByValidatorRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress } - return out, nil + return "" } -func (c *queryClient) DelegateKeysByOrchestrator(ctx context.Context, in *DelegateKeysByOrchestratorRequest, opts ...grpc.CallOption) (*DelegateKeysByOrchestratorResponse, error) { - out := new(DelegateKeysByOrchestratorResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeysByOrchestrator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type BatchTxConfirmationsByValidatorResponse struct { + BatchTxConfirmations []*BatchTxConfirmation `protobuf:"bytes,1,rep,name=batch_tx_confirmations,json=batchTxConfirmations,proto3" json:"batch_tx_confirmations,omitempty"` } -func (c *queryClient) DelegateKeys(ctx context.Context, in *DelegateKeysRequest, opts ...grpc.CallOption) (*DelegateKeysResponse, error) { - out := new(DelegateKeysResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeys", in, out, opts...) - if err != nil { - return nil, err +func (m *BatchTxConfirmationsByValidatorResponse) Reset() { + *m = BatchTxConfirmationsByValidatorResponse{} +} +func (m *BatchTxConfirmationsByValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*BatchTxConfirmationsByValidatorResponse) ProtoMessage() {} +func (*BatchTxConfirmationsByValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{58} +} +func (m *BatchTxConfirmationsByValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchTxConfirmationsByValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchTxConfirmationsByValidatorResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *BatchTxConfirmationsByValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchTxConfirmationsByValidatorResponse.Merge(m, src) +} +func (m *BatchTxConfirmationsByValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *BatchTxConfirmationsByValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BatchTxConfirmationsByValidatorResponse.DiscardUnknown(m) } -func (c *queryClient) LastObservedEthereumHeight(ctx context.Context, in *LastObservedEthereumHeightRequest, opts ...grpc.CallOption) (*LastObservedEthereumHeightResponse, error) { - out := new(LastObservedEthereumHeightResponse) - err := c.cc.Invoke(ctx, "/gravity.v1.Query/LastObservedEthereumHeight", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_BatchTxConfirmationsByValidatorResponse proto.InternalMessageInfo + +func (m *BatchTxConfirmationsByValidatorResponse) GetBatchTxConfirmations() []*BatchTxConfirmation { + if m != nil { + return m.BatchTxConfirmations } - return out, nil + return nil } -// QueryServer is the server API for Query service. -type QueryServer interface { - // Module parameters query - Params(context.Context, *ParamsRequest) (*ParamsResponse, error) - // get info on individual outgoing data - SignerSetTx(context.Context, *SignerSetTxRequest) (*SignerSetTxResponse, error) - LatestSignerSetTx(context.Context, *LatestSignerSetTxRequest) (*SignerSetTxResponse, error) - BatchTx(context.Context, *BatchTxRequest) (*BatchTxResponse, error) - ContractCallTx(context.Context, *ContractCallTxRequest) (*ContractCallTxResponse, error) - // get collections of outgoing traffic from the bridge - SignerSetTxs(context.Context, *SignerSetTxsRequest) (*SignerSetTxsResponse, error) - BatchTxs(context.Context, *BatchTxsRequest) (*BatchTxsResponse, error) - ContractCallTxs(context.Context, *ContractCallTxsRequest) (*ContractCallTxsResponse, error) - // TODO: can/should we group these into one endpoint? - SignerSetTxConfirmations(context.Context, *SignerSetTxConfirmationsRequest) (*SignerSetTxConfirmationsResponse, error) - BatchTxConfirmations(context.Context, *BatchTxConfirmationsRequest) (*BatchTxConfirmationsResponse, error) - ContractCallTxConfirmations(context.Context, *ContractCallTxConfirmationsRequest) (*ContractCallTxConfirmationsResponse, error) - // pending ethereum signature queries for orchestrators to figure out which - // signatures they are missing - // TODO: can/should we group this into one endpoint? - UnsignedSignerSetTxs(context.Context, *UnsignedSignerSetTxsRequest) (*UnsignedSignerSetTxsResponse, error) - UnsignedBatchTxs(context.Context, *UnsignedBatchTxsRequest) (*UnsignedBatchTxsResponse, error) - UnsignedContractCallTxs(context.Context, *UnsignedContractCallTxsRequest) (*UnsignedContractCallTxsResponse, error) - LastSubmittedEthereumEvent(context.Context, *LastSubmittedEthereumEventRequest) (*LastSubmittedEthereumEventResponse, error) - // Queries the fees for all pending batches, results are returned in sdk.Coin - // (fee_amount_int)(contract_address) style - BatchTxFees(context.Context, *BatchTxFeesRequest) (*BatchTxFeesResponse, error) - // Query for info about denoms tracked by gravity - ERC20ToDenom(context.Context, *ERC20ToDenomRequest) (*ERC20ToDenomResponse, error) - // DenomToERC20Params implements a query that allows ERC-20 parameter - // information to be retrieved by a Cosmos base denomination. - DenomToERC20Params(context.Context, *DenomToERC20ParamsRequest) (*DenomToERC20ParamsResponse, error) - // Query for info about denoms tracked by gravity - DenomToERC20(context.Context, *DenomToERC20Request) (*DenomToERC20Response, error) - // Query for batch send to ethereums - BatchedSendToEthereums(context.Context, *BatchedSendToEthereumsRequest) (*BatchedSendToEthereumsResponse, error) - // Query for unbatched send to ethereums - UnbatchedSendToEthereums(context.Context, *UnbatchedSendToEthereumsRequest) (*UnbatchedSendToEthereumsResponse, error) - // delegate keys - DelegateKeysByValidator(context.Context, *DelegateKeysByValidatorRequest) (*DelegateKeysByValidatorResponse, error) - DelegateKeysByEthereumSigner(context.Context, *DelegateKeysByEthereumSignerRequest) (*DelegateKeysByEthereumSignerResponse, error) - DelegateKeysByOrchestrator(context.Context, *DelegateKeysByOrchestratorRequest) (*DelegateKeysByOrchestratorResponse, error) - DelegateKeys(context.Context, *DelegateKeysRequest) (*DelegateKeysResponse, error) - LastObservedEthereumHeight(context.Context, *LastObservedEthereumHeightRequest) (*LastObservedEthereumHeightResponse, error) +type ContractCallTxConfirmationsByValidatorRequest struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +func (m *ContractCallTxConfirmationsByValidatorRequest) Reset() { + *m = ContractCallTxConfirmationsByValidatorRequest{} } - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +func (m *ContractCallTxConfirmationsByValidatorRequest) String() string { + return proto.CompactTextString(m) } -func (*UnimplementedQueryServer) SignerSetTx(ctx context.Context, req *SignerSetTxRequest) (*SignerSetTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignerSetTx not implemented") +func (*ContractCallTxConfirmationsByValidatorRequest) ProtoMessage() {} +func (*ContractCallTxConfirmationsByValidatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{59} } -func (*UnimplementedQueryServer) LatestSignerSetTx(ctx context.Context, req *LatestSignerSetTxRequest) (*SignerSetTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LatestSignerSetTx not implemented") +func (m *ContractCallTxConfirmationsByValidatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) BatchTx(ctx context.Context, req *BatchTxRequest) (*BatchTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTx not implemented") +func (m *ContractCallTxConfirmationsByValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContractCallTxConfirmationsByValidatorRequest.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 (*UnimplementedQueryServer) ContractCallTx(ctx context.Context, req *ContractCallTxRequest) (*ContractCallTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContractCallTx not implemented") +func (m *ContractCallTxConfirmationsByValidatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContractCallTxConfirmationsByValidatorRequest.Merge(m, src) } -func (*UnimplementedQueryServer) SignerSetTxs(ctx context.Context, req *SignerSetTxsRequest) (*SignerSetTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignerSetTxs not implemented") +func (m *ContractCallTxConfirmationsByValidatorRequest) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) BatchTxs(ctx context.Context, req *BatchTxsRequest) (*BatchTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTxs not implemented") +func (m *ContractCallTxConfirmationsByValidatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ContractCallTxConfirmationsByValidatorRequest.DiscardUnknown(m) } -func (*UnimplementedQueryServer) ContractCallTxs(ctx context.Context, req *ContractCallTxsRequest) (*ContractCallTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContractCallTxs not implemented") + +var xxx_messageInfo_ContractCallTxConfirmationsByValidatorRequest proto.InternalMessageInfo + +func (m *ContractCallTxConfirmationsByValidatorRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" } -func (*UnimplementedQueryServer) SignerSetTxConfirmations(ctx context.Context, req *SignerSetTxConfirmationsRequest) (*SignerSetTxConfirmationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignerSetTxConfirmations not implemented") + +type ContractCallTxConfirmationsByValidatorResponse struct { + ContractCallTxConfirmations []*ContractCallTxConfirmation `protobuf:"bytes,2,rep,name=contract_call_tx_confirmations,json=contractCallTxConfirmations,proto3" json:"contract_call_tx_confirmations,omitempty"` } -func (*UnimplementedQueryServer) BatchTxConfirmations(ctx context.Context, req *BatchTxConfirmationsRequest) (*BatchTxConfirmationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTxConfirmations not implemented") + +func (m *ContractCallTxConfirmationsByValidatorResponse) Reset() { + *m = ContractCallTxConfirmationsByValidatorResponse{} } -func (*UnimplementedQueryServer) ContractCallTxConfirmations(ctx context.Context, req *ContractCallTxConfirmationsRequest) (*ContractCallTxConfirmationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContractCallTxConfirmations not implemented") +func (m *ContractCallTxConfirmationsByValidatorResponse) String() string { + return proto.CompactTextString(m) } -func (*UnimplementedQueryServer) UnsignedSignerSetTxs(ctx context.Context, req *UnsignedSignerSetTxsRequest) (*UnsignedSignerSetTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsignedSignerSetTxs not implemented") +func (*ContractCallTxConfirmationsByValidatorResponse) ProtoMessage() {} +func (*ContractCallTxConfirmationsByValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{60} } -func (*UnimplementedQueryServer) UnsignedBatchTxs(ctx context.Context, req *UnsignedBatchTxsRequest) (*UnsignedBatchTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsignedBatchTxs not implemented") +func (m *ContractCallTxConfirmationsByValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) UnsignedContractCallTxs(ctx context.Context, req *UnsignedContractCallTxsRequest) (*UnsignedContractCallTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsignedContractCallTxs not implemented") +func (m *ContractCallTxConfirmationsByValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContractCallTxConfirmationsByValidatorResponse.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 (*UnimplementedQueryServer) LastSubmittedEthereumEvent(ctx context.Context, req *LastSubmittedEthereumEventRequest) (*LastSubmittedEthereumEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LastSubmittedEthereumEvent not implemented") +func (m *ContractCallTxConfirmationsByValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContractCallTxConfirmationsByValidatorResponse.Merge(m, src) } -func (*UnimplementedQueryServer) BatchTxFees(ctx context.Context, req *BatchTxFeesRequest) (*BatchTxFeesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTxFees not implemented") +func (m *ContractCallTxConfirmationsByValidatorResponse) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) ERC20ToDenom(ctx context.Context, req *ERC20ToDenomRequest) (*ERC20ToDenomResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ERC20ToDenom not implemented") +func (m *ContractCallTxConfirmationsByValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ContractCallTxConfirmationsByValidatorResponse.DiscardUnknown(m) } -func (*UnimplementedQueryServer) DenomToERC20Params(ctx context.Context, req *DenomToERC20ParamsRequest) (*DenomToERC20ParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomToERC20Params not implemented") + +var xxx_messageInfo_ContractCallTxConfirmationsByValidatorResponse proto.InternalMessageInfo + +func (m *ContractCallTxConfirmationsByValidatorResponse) GetContractCallTxConfirmations() []*ContractCallTxConfirmation { + if m != nil { + return m.ContractCallTxConfirmations + } + return nil } -func (*UnimplementedQueryServer) DenomToERC20(ctx context.Context, req *DenomToERC20Request) (*DenomToERC20Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomToERC20 not implemented") + +type SignerSetTxConfirmationsByValidatorRequest struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } -func (*UnimplementedQueryServer) BatchedSendToEthereums(ctx context.Context, req *BatchedSendToEthereumsRequest) (*BatchedSendToEthereumsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchedSendToEthereums not implemented") + +func (m *SignerSetTxConfirmationsByValidatorRequest) Reset() { + *m = SignerSetTxConfirmationsByValidatorRequest{} } -func (*UnimplementedQueryServer) UnbatchedSendToEthereums(ctx context.Context, req *UnbatchedSendToEthereumsRequest) (*UnbatchedSendToEthereumsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnbatchedSendToEthereums not implemented") +func (m *SignerSetTxConfirmationsByValidatorRequest) String() string { + return proto.CompactTextString(m) } -func (*UnimplementedQueryServer) DelegateKeysByValidator(ctx context.Context, req *DelegateKeysByValidatorRequest) (*DelegateKeysByValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByValidator not implemented") +func (*SignerSetTxConfirmationsByValidatorRequest) ProtoMessage() {} +func (*SignerSetTxConfirmationsByValidatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{61} } -func (*UnimplementedQueryServer) DelegateKeysByEthereumSigner(ctx context.Context, req *DelegateKeysByEthereumSignerRequest) (*DelegateKeysByEthereumSignerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByEthereumSigner not implemented") +func (m *SignerSetTxConfirmationsByValidatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) DelegateKeysByOrchestrator(ctx context.Context, req *DelegateKeysByOrchestratorRequest) (*DelegateKeysByOrchestratorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByOrchestrator not implemented") +func (m *SignerSetTxConfirmationsByValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignerSetTxConfirmationsByValidatorRequest.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 (*UnimplementedQueryServer) DelegateKeys(ctx context.Context, req *DelegateKeysRequest) (*DelegateKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeys not implemented") +func (m *SignerSetTxConfirmationsByValidatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignerSetTxConfirmationsByValidatorRequest.Merge(m, src) } -func (*UnimplementedQueryServer) LastObservedEthereumHeight(ctx context.Context, req *LastObservedEthereumHeightRequest) (*LastObservedEthereumHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LastObservedEthereumHeight not implemented") +func (m *SignerSetTxConfirmationsByValidatorRequest) XXX_Size() int { + return m.Size() } - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) +func (m *SignerSetTxConfirmationsByValidatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SignerSetTxConfirmationsByValidatorRequest.DiscardUnknown(m) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*ParamsRequest)) +var xxx_messageInfo_SignerSetTxConfirmationsByValidatorRequest proto.InternalMessageInfo + +func (m *SignerSetTxConfirmationsByValidatorRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress } - return interceptor(ctx, in, info, handler) + return "" } -func _Query_SignerSetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignerSetTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SignerSetTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/SignerSetTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SignerSetTx(ctx, req.(*SignerSetTxRequest)) - } - return interceptor(ctx, in, info, handler) +type SignerSetTxConfirmationsByValidatorResponse struct { + SignerSetTxConfirmations []*SignerSetTxConfirmation `protobuf:"bytes,3,rep,name=signer_set_tx_confirmations,json=signerSetTxConfirmations,proto3" json:"signer_set_tx_confirmations,omitempty"` } -func _Query_LatestSignerSetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LatestSignerSetTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LatestSignerSetTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/LatestSignerSetTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LatestSignerSetTx(ctx, req.(*LatestSignerSetTxRequest)) +func (m *SignerSetTxConfirmationsByValidatorResponse) Reset() { + *m = SignerSetTxConfirmationsByValidatorResponse{} +} +func (m *SignerSetTxConfirmationsByValidatorResponse) String() string { + return proto.CompactTextString(m) +} +func (*SignerSetTxConfirmationsByValidatorResponse) ProtoMessage() {} +func (*SignerSetTxConfirmationsByValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{62} +} +func (m *SignerSetTxConfirmationsByValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignerSetTxConfirmationsByValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignerSetTxConfirmationsByValidatorResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *SignerSetTxConfirmationsByValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignerSetTxConfirmationsByValidatorResponse.Merge(m, src) +} +func (m *SignerSetTxConfirmationsByValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *SignerSetTxConfirmationsByValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SignerSetTxConfirmationsByValidatorResponse.DiscardUnknown(m) } -func _Query_BatchTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/BatchTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTx(ctx, req.(*BatchTxRequest)) +var xxx_messageInfo_SignerSetTxConfirmationsByValidatorResponse proto.InternalMessageInfo + +func (m *SignerSetTxConfirmationsByValidatorResponse) GetSignerSetTxConfirmations() []*SignerSetTxConfirmation { + if m != nil { + return m.SignerSetTxConfirmations } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_ContractCallTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ContractCallTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ContractCallTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/ContractCallTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ContractCallTx(ctx, req.(*ContractCallTxRequest)) - } - return interceptor(ctx, in, info, handler) +type EthereumEventVoteRecordsRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func _Query_SignerSetTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignerSetTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SignerSetTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/SignerSetTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SignerSetTxs(ctx, req.(*SignerSetTxsRequest)) +func (m *EthereumEventVoteRecordsRequest) Reset() { *m = EthereumEventVoteRecordsRequest{} } +func (m *EthereumEventVoteRecordsRequest) String() string { return proto.CompactTextString(m) } +func (*EthereumEventVoteRecordsRequest) ProtoMessage() {} +func (*EthereumEventVoteRecordsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{63} +} +func (m *EthereumEventVoteRecordsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthereumEventVoteRecordsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthereumEventVoteRecordsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *EthereumEventVoteRecordsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthereumEventVoteRecordsRequest.Merge(m, src) +} +func (m *EthereumEventVoteRecordsRequest) XXX_Size() int { + return m.Size() +} +func (m *EthereumEventVoteRecordsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EthereumEventVoteRecordsRequest.DiscardUnknown(m) } -func _Query_BatchTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/BatchTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTxs(ctx, req.(*BatchTxsRequest)) +var xxx_messageInfo_EthereumEventVoteRecordsRequest proto.InternalMessageInfo + +func (m *EthereumEventVoteRecordsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_ContractCallTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ContractCallTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ContractCallTxs(ctx, in) +type EthereumEventVoteRecordsResponse struct { + Records []*EthereumEventVoteRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *EthereumEventVoteRecordsResponse) Reset() { *m = EthereumEventVoteRecordsResponse{} } +func (m *EthereumEventVoteRecordsResponse) String() string { return proto.CompactTextString(m) } +func (*EthereumEventVoteRecordsResponse) ProtoMessage() {} +func (*EthereumEventVoteRecordsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{64} +} +func (m *EthereumEventVoteRecordsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthereumEventVoteRecordsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthereumEventVoteRecordsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/ContractCallTxs", +} +func (m *EthereumEventVoteRecordsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthereumEventVoteRecordsResponse.Merge(m, src) +} +func (m *EthereumEventVoteRecordsResponse) XXX_Size() int { + return m.Size() +} +func (m *EthereumEventVoteRecordsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EthereumEventVoteRecordsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EthereumEventVoteRecordsResponse proto.InternalMessageInfo + +func (m *EthereumEventVoteRecordsResponse) GetRecords() []*EthereumEventVoteRecord { + if m != nil { + return m.Records } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ContractCallTxs(ctx, req.(*ContractCallTxsRequest)) + return nil +} + +func (m *EthereumEventVoteRecordsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_SignerSetTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignerSetTxConfirmationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SignerSetTxConfirmations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/SignerSetTxConfirmations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SignerSetTxConfirmations(ctx, req.(*SignerSetTxConfirmationsRequest)) - } - return interceptor(ctx, in, info, handler) +type EthereumEventVotesRequest struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } -func _Query_BatchTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxConfirmationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTxConfirmations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/BatchTxConfirmations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTxConfirmations(ctx, req.(*BatchTxConfirmationsRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *EthereumEventVotesRequest) Reset() { *m = EthereumEventVotesRequest{} } +func (m *EthereumEventVotesRequest) String() string { return proto.CompactTextString(m) } +func (*EthereumEventVotesRequest) ProtoMessage() {} +func (*EthereumEventVotesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{65} } - -func _Query_ContractCallTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ContractCallTxConfirmationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ContractCallTxConfirmations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/ContractCallTxConfirmations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ContractCallTxConfirmations(ctx, req.(*ContractCallTxConfirmationsRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *EthereumEventVotesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func _Query_UnsignedSignerSetTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsignedSignerSetTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnsignedSignerSetTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/UnsignedSignerSetTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnsignedSignerSetTxs(ctx, req.(*UnsignedSignerSetTxsRequest)) +func (m *EthereumEventVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthereumEventVotesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) } - -func _Query_UnsignedBatchTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsignedBatchTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnsignedBatchTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/UnsignedBatchTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnsignedBatchTxs(ctx, req.(*UnsignedBatchTxsRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *EthereumEventVotesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthereumEventVotesRequest.Merge(m, src) } - -func _Query_UnsignedContractCallTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsignedContractCallTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnsignedContractCallTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/UnsignedContractCallTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnsignedContractCallTxs(ctx, req.(*UnsignedContractCallTxsRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *EthereumEventVotesRequest) XXX_Size() int { + return m.Size() } - -func _Query_LastSubmittedEthereumEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LastSubmittedEthereumEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LastSubmittedEthereumEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/LastSubmittedEthereumEvent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LastSubmittedEthereumEvent(ctx, req.(*LastSubmittedEthereumEventRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *EthereumEventVotesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EthereumEventVotesRequest.DiscardUnknown(m) } -func _Query_BatchTxFees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxFeesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTxFees(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/BatchTxFees", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTxFees(ctx, req.(*BatchTxFeesRequest)) - } - return interceptor(ctx, in, info, handler) -} +var xxx_messageInfo_EthereumEventVotesRequest proto.InternalMessageInfo -func _Query_ERC20ToDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ERC20ToDenomRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ERC20ToDenom(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/ERC20ToDenom", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ERC20ToDenom(ctx, req.(*ERC20ToDenomRequest)) +func (m *EthereumEventVotesRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress } - return interceptor(ctx, in, info, handler) + return "" } -func _Query_DenomToERC20Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DenomToERC20ParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DenomToERC20Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/DenomToERC20Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomToERC20Params(ctx, req.(*DenomToERC20ParamsRequest)) - } - return interceptor(ctx, in, info, handler) +type EthereumEventVotesResponse struct { + Events []*types1.Any `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` } -func _Query_DenomToERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DenomToERC20Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DenomToERC20(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/DenomToERC20", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomToERC20(ctx, req.(*DenomToERC20Request)) - } - return interceptor(ctx, in, info, handler) +func (m *EthereumEventVotesResponse) Reset() { *m = EthereumEventVotesResponse{} } +func (m *EthereumEventVotesResponse) String() string { return proto.CompactTextString(m) } +func (*EthereumEventVotesResponse) ProtoMessage() {} +func (*EthereumEventVotesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29a9d4192703013c, []int{66} } - -func _Query_BatchedSendToEthereums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchedSendToEthereumsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchedSendToEthereums(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/BatchedSendToEthereums", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchedSendToEthereums(ctx, req.(*BatchedSendToEthereumsRequest)) +func (m *EthereumEventVotesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthereumEventVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthereumEventVotesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *EthereumEventVotesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthereumEventVotesResponse.Merge(m, src) +} +func (m *EthereumEventVotesResponse) XXX_Size() int { + return m.Size() +} +func (m *EthereumEventVotesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EthereumEventVotesResponse.DiscardUnknown(m) } -func _Query_UnbatchedSendToEthereums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnbatchedSendToEthereumsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnbatchedSendToEthereums(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/UnbatchedSendToEthereums", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnbatchedSendToEthereums(ctx, req.(*UnbatchedSendToEthereumsRequest)) +var xxx_messageInfo_EthereumEventVotesResponse proto.InternalMessageInfo + +func (m *EthereumEventVotesResponse) GetEvents() []*types1.Any { + if m != nil { + return m.Events } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_DelegateKeysByValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysByValidatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegateKeysByValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/DelegateKeysByValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeysByValidator(ctx, req.(*DelegateKeysByValidatorRequest)) - } - return interceptor(ctx, in, info, handler) +func init() { + proto.RegisterType((*ParamsRequest)(nil), "gravity.v1.ParamsRequest") + proto.RegisterType((*ParamsResponse)(nil), "gravity.v1.ParamsResponse") + proto.RegisterType((*SignerSetTxRequest)(nil), "gravity.v1.SignerSetTxRequest") + proto.RegisterType((*LatestSignerSetTxRequest)(nil), "gravity.v1.LatestSignerSetTxRequest") + proto.RegisterType((*SignerSetTxResponse)(nil), "gravity.v1.SignerSetTxResponse") + proto.RegisterType((*BatchTxRequest)(nil), "gravity.v1.BatchTxRequest") + proto.RegisterType((*BatchTxResponse)(nil), "gravity.v1.BatchTxResponse") + proto.RegisterType((*ContractCallTxRequest)(nil), "gravity.v1.ContractCallTxRequest") + proto.RegisterType((*ContractCallTxResponse)(nil), "gravity.v1.ContractCallTxResponse") + proto.RegisterType((*SignerSetTxConfirmationsRequest)(nil), "gravity.v1.SignerSetTxConfirmationsRequest") + proto.RegisterType((*SignerSetTxConfirmationsResponse)(nil), "gravity.v1.SignerSetTxConfirmationsResponse") + proto.RegisterType((*SignerSetTxsRequest)(nil), "gravity.v1.SignerSetTxsRequest") + proto.RegisterType((*SignerSetTxsResponse)(nil), "gravity.v1.SignerSetTxsResponse") + proto.RegisterType((*BatchTxsRequest)(nil), "gravity.v1.BatchTxsRequest") + proto.RegisterType((*BatchTxsResponse)(nil), "gravity.v1.BatchTxsResponse") + proto.RegisterType((*ContractCallTxsRequest)(nil), "gravity.v1.ContractCallTxsRequest") + proto.RegisterType((*ContractCallTxsResponse)(nil), "gravity.v1.ContractCallTxsResponse") + proto.RegisterType((*UnsignedSignerSetTxsRequest)(nil), "gravity.v1.UnsignedSignerSetTxsRequest") + proto.RegisterType((*UnsignedSignerSetTxsResponse)(nil), "gravity.v1.UnsignedSignerSetTxsResponse") + proto.RegisterType((*UnsignedBatchTxsRequest)(nil), "gravity.v1.UnsignedBatchTxsRequest") + proto.RegisterType((*UnsignedBatchTxsResponse)(nil), "gravity.v1.UnsignedBatchTxsResponse") + proto.RegisterType((*UnsignedContractCallTxsRequest)(nil), "gravity.v1.UnsignedContractCallTxsRequest") + proto.RegisterType((*UnsignedContractCallTxsResponse)(nil), "gravity.v1.UnsignedContractCallTxsResponse") + proto.RegisterType((*BatchTxFeesRequest)(nil), "gravity.v1.BatchTxFeesRequest") + proto.RegisterType((*BatchTxFeesResponse)(nil), "gravity.v1.BatchTxFeesResponse") + proto.RegisterType((*ContractCallTxConfirmationsRequest)(nil), "gravity.v1.ContractCallTxConfirmationsRequest") + proto.RegisterType((*ContractCallTxConfirmationsResponse)(nil), "gravity.v1.ContractCallTxConfirmationsResponse") + proto.RegisterType((*BatchTxConfirmationsRequest)(nil), "gravity.v1.BatchTxConfirmationsRequest") + proto.RegisterType((*BatchTxConfirmationsResponse)(nil), "gravity.v1.BatchTxConfirmationsResponse") + proto.RegisterType((*LastSubmittedEthereumEventRequest)(nil), "gravity.v1.LastSubmittedEthereumEventRequest") + proto.RegisterType((*LastSubmittedEthereumEventResponse)(nil), "gravity.v1.LastSubmittedEthereumEventResponse") + proto.RegisterType((*ERC20ToDenomRequest)(nil), "gravity.v1.ERC20ToDenomRequest") + proto.RegisterType((*ERC20ToDenomResponse)(nil), "gravity.v1.ERC20ToDenomResponse") + proto.RegisterType((*DenomToERC20ParamsRequest)(nil), "gravity.v1.DenomToERC20ParamsRequest") + proto.RegisterType((*DenomToERC20ParamsResponse)(nil), "gravity.v1.DenomToERC20ParamsResponse") + proto.RegisterType((*DenomToERC20Request)(nil), "gravity.v1.DenomToERC20Request") + proto.RegisterType((*DenomToERC20Response)(nil), "gravity.v1.DenomToERC20Response") + proto.RegisterType((*DelegateKeysByValidatorRequest)(nil), "gravity.v1.DelegateKeysByValidatorRequest") + proto.RegisterType((*DelegateKeysByValidatorResponse)(nil), "gravity.v1.DelegateKeysByValidatorResponse") + proto.RegisterType((*DelegateKeysByEthereumSignerRequest)(nil), "gravity.v1.DelegateKeysByEthereumSignerRequest") + proto.RegisterType((*DelegateKeysByEthereumSignerResponse)(nil), "gravity.v1.DelegateKeysByEthereumSignerResponse") + proto.RegisterType((*DelegateKeysByOrchestratorRequest)(nil), "gravity.v1.DelegateKeysByOrchestratorRequest") + proto.RegisterType((*DelegateKeysByOrchestratorResponse)(nil), "gravity.v1.DelegateKeysByOrchestratorResponse") + proto.RegisterType((*DelegateKeysRequest)(nil), "gravity.v1.DelegateKeysRequest") + proto.RegisterType((*DelegateKeysResponse)(nil), "gravity.v1.DelegateKeysResponse") + proto.RegisterType((*BatchedSendToEthereumsRequest)(nil), "gravity.v1.BatchedSendToEthereumsRequest") + proto.RegisterType((*BatchedSendToEthereumsResponse)(nil), "gravity.v1.BatchedSendToEthereumsResponse") + proto.RegisterType((*UnbatchedSendToEthereumsRequest)(nil), "gravity.v1.UnbatchedSendToEthereumsRequest") + proto.RegisterType((*UnbatchedSendToEthereumsResponse)(nil), "gravity.v1.UnbatchedSendToEthereumsResponse") + proto.RegisterType((*LastObservedEthereumHeightRequest)(nil), "gravity.v1.LastObservedEthereumHeightRequest") + proto.RegisterType((*LastObservedEthereumHeightResponse)(nil), "gravity.v1.LastObservedEthereumHeightResponse") + proto.RegisterType((*CompletedBatchTxsRequest)(nil), "gravity.v1.CompletedBatchTxsRequest") + proto.RegisterType((*CompletedBatchTxsResponse)(nil), "gravity.v1.CompletedBatchTxsResponse") + proto.RegisterType((*CompletedContractCallTxsRequest)(nil), "gravity.v1.CompletedContractCallTxsRequest") + proto.RegisterType((*CompletedContractCallTxsResponse)(nil), "gravity.v1.CompletedContractCallTxsResponse") + proto.RegisterType((*CompletedSignerSetTxsRequest)(nil), "gravity.v1.CompletedSignerSetTxsRequest") + proto.RegisterType((*CompletedSignerSetTxsResponse)(nil), "gravity.v1.CompletedSignerSetTxsResponse") + proto.RegisterType((*BatchTxConfirmationsByValidatorRequest)(nil), "gravity.v1.BatchTxConfirmationsByValidatorRequest") + proto.RegisterType((*BatchTxConfirmationsByValidatorResponse)(nil), "gravity.v1.BatchTxConfirmationsByValidatorResponse") + proto.RegisterType((*ContractCallTxConfirmationsByValidatorRequest)(nil), "gravity.v1.ContractCallTxConfirmationsByValidatorRequest") + proto.RegisterType((*ContractCallTxConfirmationsByValidatorResponse)(nil), "gravity.v1.ContractCallTxConfirmationsByValidatorResponse") + proto.RegisterType((*SignerSetTxConfirmationsByValidatorRequest)(nil), "gravity.v1.SignerSetTxConfirmationsByValidatorRequest") + proto.RegisterType((*SignerSetTxConfirmationsByValidatorResponse)(nil), "gravity.v1.SignerSetTxConfirmationsByValidatorResponse") + proto.RegisterType((*EthereumEventVoteRecordsRequest)(nil), "gravity.v1.EthereumEventVoteRecordsRequest") + proto.RegisterType((*EthereumEventVoteRecordsResponse)(nil), "gravity.v1.EthereumEventVoteRecordsResponse") + proto.RegisterType((*EthereumEventVotesRequest)(nil), "gravity.v1.EthereumEventVotesRequest") + proto.RegisterType((*EthereumEventVotesResponse)(nil), "gravity.v1.EthereumEventVotesResponse") } -func _Query_DelegateKeysByEthereumSigner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysByEthereumSignerRequest) - if err := dec(in); err != nil { +func init() { proto.RegisterFile("gravity/v1/query.proto", fileDescriptor_29a9d4192703013c) } + +var fileDescriptor_29a9d4192703013c = []byte{ + // 2285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x1a, 0x4d, 0x6f, 0x1b, 0xc7, + 0x95, 0xab, 0x58, 0x76, 0xf4, 0x64, 0x7d, 0x8d, 0x28, 0x9b, 0x5a, 0xc9, 0xa4, 0x34, 0xb2, 0x65, + 0xd9, 0xaa, 0x48, 0x49, 0x06, 0x92, 0x26, 0x6d, 0xda, 0x5a, 0xb2, 0x9d, 0x14, 0x89, 0x3f, 0x4a, + 0xd9, 0x86, 0x55, 0x24, 0xd8, 0x2c, 0xc9, 0x31, 0xc5, 0x8a, 0xdc, 0x95, 0x77, 0x97, 0xac, 0x55, + 0x20, 0x40, 0xd0, 0x02, 0x3d, 0x14, 0x45, 0x91, 0x02, 0x3d, 0xb4, 0x87, 0x1e, 0x0a, 0xf4, 0x94, + 0x6b, 0xfb, 0x23, 0x82, 0x9e, 0x72, 0xec, 0xa1, 0x68, 0x0b, 0xfb, 0x8f, 0x14, 0xbb, 0x33, 0xb3, + 0x9c, 0xd9, 0x9d, 0x59, 0x52, 0xb2, 0x7a, 0xb2, 0xf7, 0x7d, 0xbf, 0x99, 0x37, 0xef, 0x8b, 0x82, + 0x4b, 0x4d, 0xcf, 0xee, 0xb5, 0x82, 0xe3, 0x4a, 0x6f, 0xab, 0xf2, 0xa2, 0x4b, 0xbc, 0xe3, 0xf2, + 0x91, 0xe7, 0x06, 0x2e, 0x02, 0x06, 0x2f, 0xf7, 0xb6, 0xcc, 0x9b, 0x75, 0xd7, 0xef, 0xb8, 0x7e, + 0xa5, 0x66, 0xfb, 0x84, 0x12, 0x55, 0x7a, 0x5b, 0x35, 0x12, 0xd8, 0x5b, 0x95, 0x23, 0xbb, 0xd9, + 0x72, 0xec, 0xa0, 0xe5, 0x3a, 0x94, 0xcf, 0x2c, 0x8a, 0xb4, 0x9c, 0xaa, 0xee, 0xb6, 0x38, 0x7e, + 0x9e, 0xe2, 0xad, 0xe8, 0xab, 0x42, 0x3f, 0x18, 0x2a, 0xdf, 0x74, 0x9b, 0x2e, 0x85, 0x87, 0xff, + 0x63, 0xd0, 0xc5, 0xa6, 0xeb, 0x36, 0xdb, 0xa4, 0x62, 0x1f, 0xb5, 0x2a, 0xb6, 0xe3, 0xb8, 0x41, + 0xa4, 0x8d, 0xf3, 0xcc, 0x33, 0x6c, 0xf4, 0x55, 0xeb, 0x3e, 0xaf, 0xd8, 0x0e, 0xf3, 0xc0, 0x2c, + 0x08, 0x9e, 0x35, 0x89, 0x43, 0xfc, 0x96, 0xaf, 0xc2, 0x30, 0x37, 0x29, 0x66, 0x4e, 0xc0, 0x74, + 0xfc, 0x26, 0x63, 0xc0, 0x53, 0x30, 0xf1, 0xc8, 0xf6, 0xec, 0x8e, 0x5f, 0x25, 0x2f, 0xba, 0xc4, + 0x0f, 0xf0, 0x0e, 0x4c, 0x72, 0x80, 0x7f, 0xe4, 0x3a, 0x3e, 0x41, 0x9b, 0x70, 0xfe, 0x28, 0x82, + 0x14, 0x8c, 0x25, 0x63, 0x6d, 0x7c, 0x1b, 0x95, 0xfb, 0x07, 0x58, 0xa6, 0xb4, 0x3b, 0xe7, 0xbe, + 0xf9, 0x77, 0x29, 0x57, 0x65, 0x74, 0xf8, 0x07, 0x80, 0xf6, 0x5a, 0x4d, 0x87, 0x78, 0x7b, 0x24, + 0x78, 0xfc, 0x92, 0x49, 0x46, 0x6b, 0x30, 0xed, 0x47, 0x50, 0xcb, 0x27, 0x81, 0xe5, 0xb8, 0x4e, + 0x9d, 0x44, 0x12, 0xcf, 0x55, 0x27, 0x7d, 0x4e, 0xfd, 0x20, 0x84, 0x62, 0x13, 0x0a, 0x9f, 0xd8, + 0x01, 0xf1, 0x83, 0xb4, 0x14, 0x7c, 0x1f, 0x66, 0x25, 0x28, 0x33, 0xf2, 0x1d, 0x80, 0xbe, 0x70, + 0x66, 0xe8, 0x65, 0xd1, 0x50, 0x91, 0x69, 0x2c, 0xd6, 0x87, 0x9f, 0xc1, 0xe4, 0x8e, 0x1d, 0xd4, + 0x0f, 0xfa, 0x66, 0x5e, 0x83, 0xc9, 0xc0, 0x3d, 0x24, 0x8e, 0x55, 0x77, 0x9d, 0xc0, 0xb3, 0xeb, + 0x54, 0xda, 0x58, 0x75, 0x22, 0x82, 0xee, 0x32, 0x20, 0x2a, 0xc1, 0x78, 0x2d, 0x64, 0x64, 0x8e, + 0x8c, 0x44, 0x8e, 0x40, 0x04, 0xa2, 0x4e, 0x7c, 0x1f, 0xa6, 0x62, 0xc9, 0xcc, 0xc8, 0x1b, 0x30, + 0x1a, 0x11, 0x30, 0xfb, 0x66, 0x45, 0xfb, 0x38, 0x2d, 0xa5, 0xc0, 0x5d, 0x98, 0xe3, 0xaa, 0x76, + 0xed, 0x76, 0xbb, 0x6f, 0xde, 0x06, 0xa0, 0x96, 0xd3, 0xb3, 0xdb, 0xad, 0x46, 0x14, 0x2d, 0x96, + 0x5f, 0x77, 0x8f, 0xe8, 0x39, 0x5e, 0xac, 0xce, 0x88, 0x98, 0xbd, 0x10, 0x91, 0x22, 0x17, 0xad, + 0x95, 0xc8, 0xa9, 0xd1, 0x7b, 0x70, 0x29, 0xa9, 0x96, 0xd9, 0xfe, 0x1e, 0x40, 0xdb, 0x6d, 0xb6, + 0xea, 0x56, 0xdd, 0x6e, 0xb7, 0x99, 0x03, 0xa6, 0xe8, 0x40, 0x82, 0x6f, 0x2c, 0xa2, 0x0e, 0x3f, + 0xf0, 0xc7, 0x50, 0x12, 0x4e, 0x7f, 0xd7, 0x75, 0x9e, 0xb7, 0xbc, 0x0e, 0x8d, 0xf5, 0x93, 0xc7, + 0x46, 0x13, 0x96, 0xf4, 0xc2, 0x98, 0xad, 0xbb, 0x34, 0x18, 0xec, 0xa0, 0xeb, 0x91, 0x30, 0x6a, + 0xdf, 0x5a, 0x1b, 0xdf, 0x5e, 0xd1, 0x04, 0x83, 0x28, 0xa1, 0x2a, 0xb0, 0xe1, 0xcf, 0xa4, 0x40, + 0x8b, 0x2d, 0xbd, 0x07, 0xd0, 0xcf, 0x0c, 0xec, 0x1c, 0x56, 0xcb, 0xec, 0xb5, 0x87, 0xa9, 0xa1, + 0x4c, 0x73, 0x0d, 0x4b, 0x10, 0xe5, 0x47, 0x76, 0x93, 0x30, 0xde, 0xaa, 0xc0, 0x89, 0xff, 0x64, + 0x40, 0x5e, 0x96, 0xcf, 0x8c, 0xff, 0x2e, 0x8c, 0xf7, 0x8f, 0x82, 0x5b, 0xaf, 0x0d, 0x65, 0x88, + 0x8f, 0xc7, 0x47, 0x1f, 0x4a, 0xa6, 0x8d, 0x44, 0xa6, 0x5d, 0x1f, 0x68, 0x1a, 0x55, 0x2b, 0xd9, + 0xb6, 0x1f, 0x87, 0xee, 0x99, 0xbb, 0xfd, 0x1b, 0x03, 0xa6, 0xfb, 0xb2, 0x99, 0xcb, 0x1b, 0x70, + 0x21, 0x8a, 0xfa, 0xf8, 0xb2, 0x94, 0x2f, 0x83, 0xd3, 0x9c, 0x9d, 0x9f, 0x9f, 0x27, 0xa3, 0xfd, + 0xcc, 0xdd, 0xfd, 0x83, 0x01, 0x97, 0x53, 0x2a, 0xe2, 0xbc, 0x3a, 0x1a, 0xbe, 0x25, 0xee, 0x73, + 0xd6, 0x63, 0xa2, 0x84, 0x67, 0xe7, 0xf8, 0xbb, 0xb0, 0xf0, 0xc4, 0x89, 0x22, 0xa7, 0xa1, 0x8a, + 0xf1, 0x02, 0x5c, 0xb0, 0x1b, 0x0d, 0x8f, 0xf8, 0x3e, 0xcb, 0x7d, 0xfc, 0x13, 0x3f, 0x83, 0x45, + 0x35, 0xe3, 0x9b, 0x06, 0x2f, 0xbe, 0x05, 0x97, 0xb9, 0xe4, 0x64, 0xec, 0xe9, 0xcd, 0xf9, 0x31, + 0x14, 0xd2, 0x4c, 0xa7, 0x0a, 0x2a, 0xfc, 0x3e, 0x14, 0xb9, 0x28, 0x4d, 0x4c, 0xe8, 0xcd, 0xd8, + 0x83, 0x92, 0x96, 0xf7, 0xb4, 0x97, 0x8d, 0xf3, 0x80, 0x98, 0x91, 0xf7, 0x08, 0x89, 0xcb, 0x73, + 0x0f, 0x66, 0x25, 0x28, 0x13, 0x6f, 0xc1, 0xb9, 0xe7, 0x24, 0xf6, 0x74, 0x5e, 0x8a, 0x09, 0x1e, + 0x0d, 0xbb, 0x6e, 0xcb, 0xd9, 0xd9, 0x0c, 0x0b, 0xf5, 0xd7, 0xff, 0x29, 0xad, 0x35, 0x5b, 0xc1, + 0x41, 0xb7, 0x56, 0xae, 0xbb, 0x1d, 0xd6, 0xaa, 0xb0, 0x7f, 0x36, 0xfc, 0xc6, 0x61, 0x25, 0x38, + 0x3e, 0x22, 0x7e, 0xc4, 0xe0, 0x57, 0x23, 0xc1, 0xf8, 0x97, 0x06, 0x60, 0xd9, 0x4e, 0x65, 0x1e, + 0xff, 0xff, 0x56, 0xa7, 0x0e, 0xac, 0x64, 0xda, 0xc0, 0x0e, 0xe3, 0x9e, 0x22, 0xfd, 0xaf, 0xea, + 0x0f, 0x5c, 0x5b, 0x01, 0x08, 0x2c, 0xb0, 0xb3, 0x56, 0xfa, 0x9a, 0xe8, 0x00, 0x8c, 0x64, 0x07, + 0xa0, 0xe8, 0x24, 0x46, 0x14, 0x9d, 0x04, 0xb6, 0x60, 0x51, 0xad, 0x86, 0xb9, 0xf3, 0x43, 0x85, + 0x3b, 0x25, 0x45, 0x2c, 0x6b, 0xfd, 0xf8, 0x00, 0x96, 0x3f, 0xb1, 0xfd, 0x60, 0xaf, 0x5b, 0xeb, + 0xb4, 0x82, 0x80, 0x34, 0xee, 0x06, 0x07, 0xc4, 0x23, 0xdd, 0xce, 0xdd, 0x1e, 0x71, 0x82, 0xc1, + 0xd1, 0x7d, 0x17, 0x70, 0x16, 0x3b, 0xb3, 0xb2, 0x04, 0xe3, 0x24, 0x04, 0xc8, 0xa7, 0x11, 0x81, + 0xe8, 0xe5, 0xad, 0xc3, 0xec, 0xdd, 0xea, 0xee, 0xf6, 0xe6, 0x63, 0xf7, 0x0e, 0x71, 0xdc, 0x0e, + 0xd7, 0x9b, 0x87, 0x51, 0xe2, 0xd5, 0xb7, 0x37, 0x99, 0x56, 0xfa, 0x81, 0xf7, 0x21, 0x2f, 0x13, + 0x33, 0x2d, 0x79, 0x18, 0x6d, 0x84, 0x00, 0x4e, 0x1d, 0x7d, 0xa0, 0x75, 0x98, 0x61, 0xbd, 0xb7, + 0xeb, 0xb5, 0xa2, 0x24, 0x47, 0x1a, 0xd1, 0x59, 0xbf, 0x5d, 0x9d, 0xa6, 0x88, 0x87, 0x31, 0x1c, + 0x6f, 0xc1, 0x7c, 0x24, 0xf3, 0xb1, 0x1b, 0x69, 0x90, 0xba, 0x5f, 0xb5, 0x7c, 0xfc, 0x57, 0x03, + 0x4c, 0x15, 0x0f, 0x33, 0xea, 0x0a, 0x40, 0xf8, 0xd0, 0x2c, 0x91, 0x73, 0x2c, 0x84, 0x44, 0x3c, + 0x21, 0x3a, 0x72, 0xca, 0x72, 0xec, 0x0e, 0x61, 0x21, 0x30, 0x16, 0x41, 0x1e, 0xd8, 0x1d, 0x82, + 0x96, 0xe1, 0x22, 0x45, 0xfb, 0xc7, 0x9d, 0x9a, 0xdb, 0x2e, 0xbc, 0x15, 0x11, 0x8c, 0x47, 0xb0, + 0xbd, 0x08, 0x14, 0x06, 0x12, 0x25, 0x69, 0x90, 0x7a, 0xab, 0x63, 0xb7, 0xfd, 0xc2, 0xb9, 0xe8, + 0x78, 0x27, 0x22, 0xe8, 0x1d, 0x06, 0x0c, 0x4f, 0x58, 0xb4, 0x32, 0xdb, 0xa7, 0x7d, 0xc8, 0xcb, + 0xc4, 0xfd, 0x13, 0x4e, 0xdf, 0xc7, 0xc9, 0x4e, 0xf8, 0x3e, 0x14, 0xef, 0x90, 0x36, 0x69, 0xda, + 0x01, 0xf9, 0x98, 0x1c, 0xfb, 0x3b, 0xc7, 0x4f, 0xe9, 0x3b, 0x76, 0x3d, 0x6e, 0xd2, 0x3a, 0xcc, + 0xf4, 0x38, 0xcc, 0x92, 0xc3, 0x6e, 0x3a, 0x46, 0xdc, 0x66, 0xf1, 0xd7, 0x85, 0x92, 0x56, 0x9c, + 0x10, 0x7c, 0xc1, 0x41, 0x42, 0x12, 0x90, 0xe0, 0x80, 0xc9, 0x40, 0x5b, 0x90, 0x77, 0xbd, 0x30, + 0xcf, 0x07, 0x9e, 0xa4, 0x93, 0xde, 0xc6, 0xac, 0x88, 0xe3, 0x6a, 0x1f, 0xc0, 0x8a, 0xac, 0x96, + 0xc7, 0x3d, 0xad, 0x60, 0xdc, 0x95, 0xeb, 0x30, 0x45, 0x18, 0xc2, 0xa2, 0xe5, 0x8c, 0xa9, 0x9f, + 0x24, 0x12, 0x3d, 0xfe, 0xb5, 0x01, 0x57, 0xb3, 0x05, 0x32, 0x67, 0x4e, 0x72, 0x38, 0xa7, 0x71, + 0xec, 0x29, 0x2c, 0xcb, 0x76, 0x3c, 0x14, 0x88, 0xb8, 0x5b, 0x3a, 0xb9, 0x86, 0x5e, 0xee, 0x2f, + 0x00, 0x67, 0xc9, 0x3d, 0x8d, 0x77, 0x8a, 0xc3, 0x1d, 0x51, 0x1e, 0xee, 0x5c, 0x18, 0xfa, 0x7d, + 0xdd, 0xbc, 0x5a, 0x3e, 0x0b, 0x83, 0x5c, 0x04, 0x33, 0x23, 0x7e, 0x04, 0x13, 0x0d, 0x06, 0xb7, + 0x0e, 0xc9, 0x31, 0xcf, 0xaa, 0x0b, 0x62, 0x56, 0xbd, 0xef, 0x37, 0x25, 0xde, 0x8b, 0x0d, 0xe1, + 0x0b, 0xdf, 0x83, 0x2b, 0x51, 0xda, 0x25, 0x8d, 0x3d, 0xe2, 0x34, 0x1e, 0xbb, 0xfc, 0x2e, 0x7d, + 0x61, 0x8c, 0xf4, 0x89, 0xd3, 0x20, 0x49, 0x27, 0x27, 0x28, 0x94, 0x1f, 0xda, 0x01, 0x14, 0x75, + 0x72, 0xe2, 0x6a, 0x36, 0x13, 0xb2, 0x58, 0x81, 0x6b, 0x71, 0xa7, 0x95, 0x5d, 0x84, 0xcc, 0x5f, + 0x9d, 0xf2, 0x65, 0x79, 0xf8, 0x2b, 0x23, 0xec, 0x52, 0x6a, 0x67, 0x60, 0x74, 0xa2, 0x3b, 0x1e, + 0x39, 0x75, 0x77, 0xfc, 0x37, 0x03, 0x96, 0xf4, 0x26, 0x9d, 0xad, 0xff, 0x67, 0xd7, 0x3c, 0xaf, + 0xd0, 0x72, 0xfa, 0xb0, 0xe6, 0x13, 0xaf, 0xd7, 0x2f, 0x87, 0x1f, 0x91, 0x56, 0xf3, 0x80, 0x97, + 0x53, 0xfc, 0x3b, 0x83, 0x56, 0x4d, 0x1d, 0x15, 0x73, 0xee, 0x00, 0xae, 0xb4, 0x6d, 0x3f, 0xb0, + 0x5c, 0x46, 0x16, 0xbb, 0x68, 0x1d, 0x44, 0x84, 0x6c, 0xf4, 0xb8, 0x26, 0x3a, 0x4a, 0x57, 0x23, + 0x5c, 0xe0, 0x4e, 0xdb, 0xad, 0x1f, 0x32, 0xa9, 0x66, 0x5b, 0xab, 0x11, 0x9b, 0x50, 0xd8, 0x75, + 0x3b, 0x47, 0x6d, 0x12, 0xa4, 0x1a, 0x6c, 0xfc, 0x39, 0xcc, 0x2b, 0x70, 0xf1, 0x30, 0x3d, 0x5b, + 0xe7, 0x48, 0x8b, 0x36, 0x3c, 0xc1, 0xcb, 0xcc, 0x9e, 0x7a, 0xa6, 0x9e, 0x14, 0x86, 0x97, 0xa1, + 0x14, 0x6b, 0x50, 0xb7, 0xd7, 0xf8, 0x0b, 0x58, 0xd2, 0x93, 0x30, 0x5b, 0xf6, 0x61, 0xa1, 0x6f, + 0x0b, 0xef, 0xaa, 0xa2, 0x8d, 0x84, 0x60, 0x53, 0x56, 0x6f, 0x5d, 0xa8, 0x6b, 0x54, 0xe0, 0x22, + 0x2c, 0xc6, 0xea, 0x15, 0x33, 0x11, 0x7e, 0x01, 0x57, 0x34, 0x78, 0x66, 0xdb, 0x23, 0xe8, 0x0b, + 0xb7, 0x84, 0x65, 0x46, 0xdf, 0x30, 0xed, 0x1c, 0x34, 0x57, 0x57, 0x49, 0xc6, 0x4f, 0x60, 0x55, + 0xd5, 0x18, 0xbe, 0x69, 0x3d, 0xfd, 0xd2, 0x80, 0xeb, 0x03, 0xe5, 0x32, 0xa7, 0x9e, 0xc0, 0x25, + 0x7e, 0xe5, 0xe1, 0x79, 0xf7, 0x89, 0x87, 0xed, 0x43, 0xf3, 0x35, 0x85, 0x26, 0xfc, 0x29, 0x6c, + 0x64, 0x34, 0xf2, 0x6f, 0xea, 0xe0, 0x9f, 0x0d, 0x28, 0x0f, 0x2b, 0x9e, 0xf9, 0x79, 0x08, 0xc5, + 0x64, 0x38, 0x25, 0xfc, 0x1d, 0x39, 0xd1, 0x18, 0xb1, 0x50, 0xd7, 0xeb, 0xc7, 0xfb, 0x70, 0x53, + 0xb7, 0xc2, 0x7a, 0x53, 0xd7, 0x7f, 0x6f, 0xc0, 0xfa, 0x50, 0xb2, 0x99, 0xdf, 0x35, 0x58, 0x90, + 0x42, 0x35, 0xe1, 0xf4, 0x5b, 0xc3, 0xaf, 0xce, 0x0a, 0xbe, 0x46, 0x2d, 0x6e, 0x41, 0x49, 0x1a, + 0x19, 0x9e, 0xba, 0x01, 0xa9, 0x92, 0xba, 0xeb, 0x35, 0xce, 0x7c, 0xdd, 0xf2, 0xb5, 0x01, 0x4b, + 0x7a, 0x5d, 0xcc, 0xe7, 0x0f, 0xe0, 0x82, 0x47, 0x41, 0xaa, 0xd5, 0xa0, 0x86, 0xbd, 0xca, 0x79, + 0xce, 0xae, 0x8e, 0x7c, 0x04, 0xf3, 0x29, 0x65, 0xfe, 0xa9, 0x6e, 0xfd, 0x33, 0x30, 0x55, 0x92, + 0xe2, 0xf9, 0xf1, 0x7c, 0x34, 0x86, 0x71, 0x77, 0xf3, 0x65, 0xfa, 0xcb, 0x42, 0x99, 0xff, 0xb2, + 0x50, 0xbe, 0xed, 0x1c, 0xef, 0xcc, 0xfc, 0xe3, 0xef, 0x1b, 0x13, 0xf2, 0x68, 0xc7, 0xd8, 0xb6, + 0xff, 0xb5, 0x08, 0xa3, 0x3f, 0x09, 0x7d, 0x42, 0xb7, 0xe1, 0x3c, 0x9d, 0x7d, 0xd0, 0x7c, 0xfa, + 0x47, 0x00, 0x66, 0xba, 0x69, 0xaa, 0x50, 0xd4, 0x16, 0x9c, 0x43, 0x8f, 0x60, 0x5c, 0x08, 0x21, + 0x54, 0xd4, 0xe5, 0x44, 0x26, 0xac, 0xa4, 0xc5, 0xc7, 0x12, 0x3f, 0x85, 0x99, 0xd4, 0xaf, 0x05, + 0xe8, 0x6a, 0xba, 0x62, 0x9e, 0x4e, 0xfa, 0x1d, 0xb8, 0xc0, 0xf2, 0x1a, 0x32, 0x55, 0xc5, 0x8e, + 0x49, 0x5a, 0x50, 0xe2, 0x62, 0x29, 0xfb, 0x30, 0x29, 0x67, 0x0b, 0xb4, 0x9c, 0x51, 0xa5, 0x98, + 0x4c, 0x9c, 0x45, 0x12, 0x8b, 0xde, 0x83, 0x8b, 0x62, 0xd5, 0x40, 0x3a, 0x9f, 0xe2, 0xfb, 0x59, + 0xd2, 0x13, 0xc4, 0x42, 0x3f, 0x84, 0xb7, 0x79, 0xed, 0x46, 0x2a, 0xd7, 0x62, 0x61, 0x8b, 0x6a, + 0xa4, 0x70, 0x39, 0x53, 0x89, 0x4a, 0x8b, 0x32, 0xdc, 0x8a, 0xc5, 0xae, 0x64, 0xd2, 0xc4, 0xd2, + 0x7f, 0x0e, 0x05, 0x5d, 0xb6, 0x43, 0xeb, 0x43, 0x64, 0xad, 0x58, 0xdf, 0x77, 0x86, 0x23, 0x8e, + 0x15, 0x1f, 0x42, 0x5e, 0x55, 0x42, 0xd1, 0xf5, 0x01, 0xf5, 0x30, 0x56, 0xb8, 0x36, 0x98, 0x30, + 0x56, 0xf6, 0xa5, 0x01, 0x0b, 0x19, 0xf5, 0x0c, 0x95, 0x87, 0x2b, 0x4a, 0xb1, 0xee, 0xca, 0xd0, + 0xf4, 0xa2, 0xbf, 0xaa, 0xbd, 0xaf, 0xec, 0x6f, 0xc6, 0x4a, 0x59, 0xf6, 0x37, 0x6b, 0x85, 0x8c, + 0x73, 0xc8, 0x82, 0xe9, 0xe4, 0x56, 0x17, 0xad, 0xa8, 0xf8, 0x93, 0xc1, 0x78, 0x35, 0x9b, 0x28, + 0x56, 0x10, 0xf4, 0x77, 0xcd, 0xc9, 0xe0, 0xbc, 0xa9, 0x12, 0xa1, 0x09, 0xd2, 0xf5, 0xa1, 0x68, + 0x63, 0xad, 0x5f, 0x80, 0xa9, 0xdf, 0xa3, 0xa1, 0x0d, 0x39, 0x61, 0x0d, 0x58, 0xd7, 0x99, 0xe5, + 0x61, 0xc9, 0xc5, 0xc4, 0x2b, 0x6c, 0x8e, 0xe5, 0xc4, 0x9b, 0x5e, 0x34, 0x9b, 0x25, 0x2d, 0x5e, + 0xcc, 0x3c, 0xe2, 0x92, 0x4e, 0xce, 0x3c, 0x8a, 0x5d, 0x9f, 0x9c, 0x79, 0x54, 0xfb, 0x3d, 0x9c, + 0x43, 0x04, 0x50, 0x7a, 0xd5, 0x86, 0xa4, 0x01, 0x48, 0xbb, 0xbe, 0x33, 0x57, 0x07, 0x91, 0x89, + 0xb6, 0x8b, 0x78, 0xd9, 0x76, 0xc5, 0x16, 0x4d, 0xb6, 0x5d, 0xb5, 0x39, 0xc3, 0x39, 0xf4, 0x02, + 0x2e, 0xa9, 0x87, 0x79, 0x74, 0x23, 0x75, 0x9a, 0xba, 0x19, 0xdc, 0xbc, 0x39, 0x0c, 0xa9, 0x98, + 0x01, 0x75, 0x13, 0x34, 0x4a, 0xc4, 0x67, 0xe6, 0xe8, 0x2f, 0x67, 0xc0, 0x41, 0x43, 0x39, 0x7d, + 0x43, 0x9a, 0xad, 0x9c, 0xfc, 0x86, 0xb2, 0x37, 0x81, 0xf2, 0x1b, 0x1a, 0xb0, 0xe6, 0xc3, 0x39, + 0xf4, 0x2b, 0x03, 0x16, 0xb3, 0x96, 0x68, 0xa8, 0xa2, 0x97, 0xa7, 0xdc, 0xdf, 0x99, 0x9b, 0xc3, + 0x33, 0x88, 0x2f, 0x59, 0xbf, 0xe9, 0x92, 0x5f, 0xf2, 0xc0, 0x4d, 0x9b, 0xfc, 0x92, 0x07, 0x2f, + 0xd0, 0x78, 0xec, 0xf6, 0xe9, 0x92, 0xb1, 0x9b, 0x5a, 0x83, 0x25, 0x63, 0x37, 0xbd, 0x10, 0xeb, + 0x67, 0x27, 0xf5, 0xf6, 0x20, 0x9d, 0x9d, 0x32, 0xb7, 0x1f, 0xe9, 0xec, 0x94, 0xbd, 0x06, 0xc1, + 0x39, 0xe4, 0xc0, 0x9c, 0x72, 0xbc, 0x46, 0x6b, 0x72, 0xb1, 0xd2, 0x4f, 0xe8, 0xe6, 0x8d, 0x21, + 0x28, 0x63, 0x7d, 0x35, 0x98, 0x49, 0xad, 0x3c, 0xe4, 0xa6, 0x51, 0xb7, 0x2d, 0x31, 0xaf, 0x0d, + 0xa0, 0x12, 0xdf, 0xa6, 0x6e, 0xa3, 0x21, 0xbf, 0xcd, 0x01, 0xab, 0x11, 0xf9, 0x6d, 0x0e, 0x5a, + 0x92, 0xe0, 0x1c, 0xfa, 0xad, 0x01, 0xa5, 0x01, 0x13, 0x3e, 0xda, 0x1e, 0xd4, 0x80, 0x28, 0x1e, + 0xeb, 0xad, 0x13, 0xf1, 0xc4, 0xe6, 0xfc, 0xc5, 0x80, 0xd5, 0xe1, 0xe6, 0x71, 0xf4, 0xde, 0x90, + 0xad, 0x89, 0xc2, 0xb8, 0xf7, 0x4f, 0xc3, 0x1a, 0xdb, 0xf8, 0x47, 0x03, 0x56, 0x86, 0x18, 0x9c, + 0xd1, 0x3b, 0xc3, 0x34, 0x8a, 0x0a, 0xeb, 0xde, 0x3d, 0x31, 0x9f, 0x18, 0x46, 0xba, 0x99, 0x56, + 0x0e, 0xa3, 0x01, 0x53, 0xb6, 0x1c, 0x46, 0x83, 0xc6, 0x64, 0x5a, 0x8a, 0xd3, 0x63, 0xa5, 0x5c, + 0x8a, 0xb5, 0x03, 0xac, 0x5c, 0x8a, 0xf5, 0xd3, 0x29, 0xce, 0xed, 0x3c, 0xf9, 0xe6, 0x55, 0xd1, + 0xf8, 0xf6, 0x55, 0xd1, 0xf8, 0xef, 0xab, 0xa2, 0xf1, 0xd5, 0xeb, 0x62, 0xee, 0xdb, 0xd7, 0xc5, + 0xdc, 0x3f, 0x5f, 0x17, 0x73, 0x3f, 0xfd, 0x9e, 0xf0, 0x23, 0xf5, 0x11, 0x69, 0x36, 0x8f, 0x7f, + 0xd6, 0xe3, 0x7f, 0xd5, 0xb6, 0x51, 0xf3, 0x5a, 0x8d, 0x26, 0xa9, 0x74, 0xdc, 0x46, 0xb7, 0x4d, + 0x2a, 0xbd, 0x5b, 0x95, 0x97, 0x1c, 0x45, 0x7f, 0xbd, 0xae, 0x9d, 0x8f, 0xc6, 0xdb, 0x5b, 0xff, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0x95, 0x00, 0xeb, 0x53, 0x07, 0x28, 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 { + // Module parameters query + Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) + // get info on individual outgoing data + SignerSetTx(ctx context.Context, in *SignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) + LatestSignerSetTx(ctx context.Context, in *LatestSignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) + BatchTx(ctx context.Context, in *BatchTxRequest, opts ...grpc.CallOption) (*BatchTxResponse, error) + ContractCallTx(ctx context.Context, in *ContractCallTxRequest, opts ...grpc.CallOption) (*ContractCallTxResponse, error) + // get collections of outgoing traffic from the bridge + SignerSetTxs(ctx context.Context, in *SignerSetTxsRequest, opts ...grpc.CallOption) (*SignerSetTxsResponse, error) + BatchTxs(ctx context.Context, in *BatchTxsRequest, opts ...grpc.CallOption) (*BatchTxsResponse, error) + ContractCallTxs(ctx context.Context, in *ContractCallTxsRequest, opts ...grpc.CallOption) (*ContractCallTxsResponse, error) + // TODO: can/should we group these into one endpoint? + SignerSetTxConfirmations(ctx context.Context, in *SignerSetTxConfirmationsRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsResponse, error) + BatchTxConfirmations(ctx context.Context, in *BatchTxConfirmationsRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsResponse, error) + ContractCallTxConfirmations(ctx context.Context, in *ContractCallTxConfirmationsRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsResponse, error) + // pending ethereum signature queries for orchestrators to figure out which + // signatures they are missing + // TODO: can/should we group this into one endpoint? + UnsignedSignerSetTxs(ctx context.Context, in *UnsignedSignerSetTxsRequest, opts ...grpc.CallOption) (*UnsignedSignerSetTxsResponse, error) + UnsignedBatchTxs(ctx context.Context, in *UnsignedBatchTxsRequest, opts ...grpc.CallOption) (*UnsignedBatchTxsResponse, error) + UnsignedContractCallTxs(ctx context.Context, in *UnsignedContractCallTxsRequest, opts ...grpc.CallOption) (*UnsignedContractCallTxsResponse, error) + LastSubmittedEthereumEvent(ctx context.Context, in *LastSubmittedEthereumEventRequest, opts ...grpc.CallOption) (*LastSubmittedEthereumEventResponse, error) + // Queries the fees for all pending batches, results are returned in sdk.Coin + // (fee_amount_int)(contract_address) style + BatchTxFees(ctx context.Context, in *BatchTxFeesRequest, opts ...grpc.CallOption) (*BatchTxFeesResponse, error) + // Query for info about denoms tracked by gravity + ERC20ToDenom(ctx context.Context, in *ERC20ToDenomRequest, opts ...grpc.CallOption) (*ERC20ToDenomResponse, error) + // DenomToERC20Params implements a query that allows ERC-20 parameter + // information to be retrieved by a Cosmos base denomination. + DenomToERC20Params(ctx context.Context, in *DenomToERC20ParamsRequest, opts ...grpc.CallOption) (*DenomToERC20ParamsResponse, error) + // Query for info about denoms tracked by gravity + DenomToERC20(ctx context.Context, in *DenomToERC20Request, opts ...grpc.CallOption) (*DenomToERC20Response, error) + // Query for batch send to ethereums + BatchedSendToEthereums(ctx context.Context, in *BatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*BatchedSendToEthereumsResponse, error) + // Query for unbatched send to ethereums + UnbatchedSendToEthereums(ctx context.Context, in *UnbatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*UnbatchedSendToEthereumsResponse, error) + // delegate keys + DelegateKeysByValidator(ctx context.Context, in *DelegateKeysByValidatorRequest, opts ...grpc.CallOption) (*DelegateKeysByValidatorResponse, error) + DelegateKeysByEthereumSigner(ctx context.Context, in *DelegateKeysByEthereumSignerRequest, opts ...grpc.CallOption) (*DelegateKeysByEthereumSignerResponse, error) + DelegateKeysByOrchestrator(ctx context.Context, in *DelegateKeysByOrchestratorRequest, opts ...grpc.CallOption) (*DelegateKeysByOrchestratorResponse, error) + DelegateKeys(ctx context.Context, in *DelegateKeysRequest, opts ...grpc.CallOption) (*DelegateKeysResponse, error) + LastObservedEthereumHeight(ctx context.Context, in *LastObservedEthereumHeightRequest, opts ...grpc.CallOption) (*LastObservedEthereumHeightResponse, error) + CompletedSignerSetTxs(ctx context.Context, in *CompletedSignerSetTxsRequest, opts ...grpc.CallOption) (*CompletedSignerSetTxsResponse, error) + CompletedBatchTxs(ctx context.Context, in *CompletedBatchTxsRequest, opts ...grpc.CallOption) (*CompletedBatchTxsResponse, error) + CompletedContractCallTxs(ctx context.Context, in *CompletedContractCallTxsRequest, opts ...grpc.CallOption) (*CompletedContractCallTxsResponse, error) + BatchTxConfirmationsByValidator(ctx context.Context, in *BatchTxConfirmationsByValidatorRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsByValidatorResponse, error) + ContractCallTxConfirmationsByValidator(ctx context.Context, in *ContractCallTxConfirmationsByValidatorRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsByValidatorResponse, error) + SignerSetTxConfirmationsByValidator(ctx context.Context, in *SignerSetTxConfirmationsByValidatorRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsByValidatorResponse, error) + EthereumEventVoteRecords(ctx context.Context, in *EthereumEventVoteRecordsRequest, opts ...grpc.CallOption) (*EthereumEventVoteRecordsResponse, error) + EthereumEventVotes(ctx context.Context, in *EthereumEventVotesRequest, opts ...grpc.CallOption) (*EthereumEventVotesResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) { + out := new(ParamsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/Params", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).DelegateKeysByEthereumSigner(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/DelegateKeysByEthereumSigner", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeysByEthereumSigner(ctx, req.(*DelegateKeysByEthereumSignerRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_DelegateKeysByOrchestrator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysByOrchestratorRequest) - if err := dec(in); err != nil { +func (c *queryClient) SignerSetTx(ctx context.Context, in *SignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) { + out := new(SignerSetTxResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/SignerSetTx", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).DelegateKeysByOrchestrator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/DelegateKeysByOrchestrator", + return out, nil +} + +func (c *queryClient) LatestSignerSetTx(ctx context.Context, in *LatestSignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) { + out := new(SignerSetTxResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/LatestSignerSetTx", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeysByOrchestrator(ctx, req.(*DelegateKeysByOrchestratorRequest)) + return out, nil +} + +func (c *queryClient) BatchTx(ctx context.Context, in *BatchTxRequest, opts ...grpc.CallOption) (*BatchTxResponse, error) { + out := new(BatchTxResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTx", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_DelegateKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysRequest) - if err := dec(in); err != nil { +func (c *queryClient) ContractCallTx(ctx context.Context, in *ContractCallTxRequest, opts ...grpc.CallOption) (*ContractCallTxResponse, error) { + out := new(ContractCallTxResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/ContractCallTx", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).DelegateKeys(ctx, in) + return out, nil +} + +func (c *queryClient) SignerSetTxs(ctx context.Context, in *SignerSetTxsRequest, opts ...grpc.CallOption) (*SignerSetTxsResponse, error) { + out := new(SignerSetTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/SignerSetTxs", in, out, opts...) + if err != nil { + return nil, err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/DelegateKeys", + return out, nil +} + +func (c *queryClient) BatchTxs(ctx context.Context, in *BatchTxsRequest, opts ...grpc.CallOption) (*BatchTxsResponse, error) { + out := new(BatchTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTxs", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeys(ctx, req.(*DelegateKeysRequest)) + return out, nil +} + +func (c *queryClient) ContractCallTxs(ctx context.Context, in *ContractCallTxsRequest, opts ...grpc.CallOption) (*ContractCallTxsResponse, error) { + out := new(ContractCallTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/ContractCallTxs", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Query_LastObservedEthereumHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LastObservedEthereumHeightRequest) - if err := dec(in); err != nil { +func (c *queryClient) SignerSetTxConfirmations(ctx context.Context, in *SignerSetTxConfirmationsRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsResponse, error) { + out := new(SignerSetTxConfirmationsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/SignerSetTxConfirmations", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(QueryServer).LastObservedEthereumHeight(ctx, in) + return out, nil +} + +func (c *queryClient) BatchTxConfirmations(ctx context.Context, in *BatchTxConfirmationsRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsResponse, error) { + out := new(BatchTxConfirmationsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTxConfirmations", in, out, opts...) + if err != nil { + return nil, err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1.Query/LastObservedEthereumHeight", + return out, nil +} + +func (c *queryClient) ContractCallTxConfirmations(ctx context.Context, in *ContractCallTxConfirmationsRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsResponse, error) { + out := new(ContractCallTxConfirmationsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/ContractCallTxConfirmations", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LastObservedEthereumHeight(ctx, req.(*LastObservedEthereumHeightRequest)) + return out, nil +} + +func (c *queryClient) UnsignedSignerSetTxs(ctx context.Context, in *UnsignedSignerSetTxsRequest, opts ...grpc.CallOption) (*UnsignedSignerSetTxsResponse, error) { + out := new(UnsignedSignerSetTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnsignedSignerSetTxs", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "gravity.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "SignerSetTx", - Handler: _Query_SignerSetTx_Handler, - }, - { - MethodName: "LatestSignerSetTx", - Handler: _Query_LatestSignerSetTx_Handler, - }, - { - MethodName: "BatchTx", - Handler: _Query_BatchTx_Handler, - }, - { - MethodName: "ContractCallTx", - Handler: _Query_ContractCallTx_Handler, - }, - { - MethodName: "SignerSetTxs", - Handler: _Query_SignerSetTxs_Handler, - }, - { - MethodName: "BatchTxs", - Handler: _Query_BatchTxs_Handler, - }, - { - MethodName: "ContractCallTxs", - Handler: _Query_ContractCallTxs_Handler, - }, - { - MethodName: "SignerSetTxConfirmations", - Handler: _Query_SignerSetTxConfirmations_Handler, - }, - { - MethodName: "BatchTxConfirmations", - Handler: _Query_BatchTxConfirmations_Handler, - }, - { - MethodName: "ContractCallTxConfirmations", - Handler: _Query_ContractCallTxConfirmations_Handler, - }, - { - MethodName: "UnsignedSignerSetTxs", - Handler: _Query_UnsignedSignerSetTxs_Handler, - }, - { - MethodName: "UnsignedBatchTxs", - Handler: _Query_UnsignedBatchTxs_Handler, - }, - { - MethodName: "UnsignedContractCallTxs", - Handler: _Query_UnsignedContractCallTxs_Handler, - }, - { - MethodName: "LastSubmittedEthereumEvent", - Handler: _Query_LastSubmittedEthereumEvent_Handler, - }, - { - MethodName: "BatchTxFees", - Handler: _Query_BatchTxFees_Handler, - }, - { - MethodName: "ERC20ToDenom", - Handler: _Query_ERC20ToDenom_Handler, - }, - { - MethodName: "DenomToERC20Params", - Handler: _Query_DenomToERC20Params_Handler, - }, - { - MethodName: "DenomToERC20", - Handler: _Query_DenomToERC20_Handler, - }, - { - MethodName: "BatchedSendToEthereums", - Handler: _Query_BatchedSendToEthereums_Handler, - }, - { - MethodName: "UnbatchedSendToEthereums", - Handler: _Query_UnbatchedSendToEthereums_Handler, - }, - { - MethodName: "DelegateKeysByValidator", - Handler: _Query_DelegateKeysByValidator_Handler, - }, - { - MethodName: "DelegateKeysByEthereumSigner", - Handler: _Query_DelegateKeysByEthereumSigner_Handler, - }, - { - MethodName: "DelegateKeysByOrchestrator", - Handler: _Query_DelegateKeysByOrchestrator_Handler, - }, - { - MethodName: "DelegateKeys", - Handler: _Query_DelegateKeys_Handler, - }, - { - MethodName: "LastObservedEthereumHeight", - Handler: _Query_LastObservedEthereumHeight_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "gravity/v1/query.proto", -} - -func (m *ParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) UnsignedBatchTxs(ctx context.Context, in *UnsignedBatchTxsRequest, opts ...grpc.CallOption) (*UnsignedBatchTxsResponse, error) { + out := new(UnsignedBatchTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnsignedBatchTxs", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *ParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return out, nil } -func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *queryClient) UnsignedContractCallTxs(ctx context.Context, in *UnsignedContractCallTxsRequest, opts ...grpc.CallOption) (*UnsignedContractCallTxsResponse, error) { + out := new(UnsignedContractCallTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnsignedContractCallTxs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *ParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) LastSubmittedEthereumEvent(ctx context.Context, in *LastSubmittedEthereumEventRequest, opts ...grpc.CallOption) (*LastSubmittedEthereumEventResponse, error) { + out := new(LastSubmittedEthereumEventResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/LastSubmittedEthereumEvent", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) BatchTxFees(ctx context.Context, in *BatchTxFeesRequest, opts ...grpc.CallOption) (*BatchTxFeesResponse, error) { + out := new(BatchTxFeesResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTxFees", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *ParamsResponse) 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)) +func (c *queryClient) ERC20ToDenom(ctx context.Context, in *ERC20ToDenomRequest, opts ...grpc.CallOption) (*ERC20ToDenomResponse, error) { + out := new(ERC20ToDenomResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/ERC20ToDenom", in, out, opts...) + if err != nil { + return nil, err } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return out, nil } -func (m *SignerSetTxRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DenomToERC20Params(ctx context.Context, in *DenomToERC20ParamsRequest, opts ...grpc.CallOption) (*DenomToERC20ParamsResponse, error) { + out := new(DenomToERC20ParamsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/DenomToERC20Params", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *SignerSetTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DenomToERC20(ctx context.Context, in *DenomToERC20Request, opts ...grpc.CallOption) (*DenomToERC20Response, error) { + out := new(DenomToERC20Response) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/DenomToERC20", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *SignerSetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SignerSetNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.SignerSetNonce)) - i-- - dAtA[i] = 0x8 +func (c *queryClient) BatchedSendToEthereums(ctx context.Context, in *BatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*BatchedSendToEthereumsResponse, error) { + out := new(BatchedSendToEthereumsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchedSendToEthereums", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *LatestSignerSetTxRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) UnbatchedSendToEthereums(ctx context.Context, in *UnbatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*UnbatchedSendToEthereumsResponse, error) { + out := new(UnbatchedSendToEthereumsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/UnbatchedSendToEthereums", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *LatestSignerSetTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DelegateKeysByValidator(ctx context.Context, in *DelegateKeysByValidatorRequest, opts ...grpc.CallOption) (*DelegateKeysByValidatorResponse, error) { + out := new(DelegateKeysByValidatorResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeysByValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *LatestSignerSetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *queryClient) DelegateKeysByEthereumSigner(ctx context.Context, in *DelegateKeysByEthereumSignerRequest, opts ...grpc.CallOption) (*DelegateKeysByEthereumSignerResponse, error) { + out := new(DelegateKeysByEthereumSignerResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeysByEthereumSigner", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *SignerSetTxResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DelegateKeysByOrchestrator(ctx context.Context, in *DelegateKeysByOrchestratorRequest, opts ...grpc.CallOption) (*DelegateKeysByOrchestratorResponse, error) { + out := new(DelegateKeysByOrchestratorResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeysByOrchestrator", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *SignerSetTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SignerSet != nil { - { - size, err := m.SignerSet.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 *BatchTxRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DelegateKeys(ctx context.Context, in *DelegateKeysRequest, opts ...grpc.CallOption) (*DelegateKeysResponse, error) { + out := new(DelegateKeysResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/DelegateKeys", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *BatchTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BatchNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BatchNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return out, nil } -func (m *BatchTxResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) LastObservedEthereumHeight(ctx context.Context, in *LastObservedEthereumHeightRequest, opts ...grpc.CallOption) (*LastObservedEthereumHeightResponse, error) { + out := new(LastObservedEthereumHeightResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/LastObservedEthereumHeight", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *BatchTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Batch != nil { - { - size, err := m.Batch.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 + return out, nil } -func (m *ContractCallTxRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) CompletedSignerSetTxs(ctx context.Context, in *CompletedSignerSetTxsRequest, opts ...grpc.CallOption) (*CompletedSignerSetTxsResponse, error) { + out := new(CompletedSignerSetTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/CompletedSignerSetTxs", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *ContractCallTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.InvalidationNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.InvalidationNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.InvalidationScope) > 0 { - i -= len(m.InvalidationScope) - copy(dAtA[i:], m.InvalidationScope) - i = encodeVarintQuery(dAtA, i, uint64(len(m.InvalidationScope))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return out, nil } -func (m *ContractCallTxResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) CompletedBatchTxs(ctx context.Context, in *CompletedBatchTxsRequest, opts ...grpc.CallOption) (*CompletedBatchTxsResponse, error) { + out := new(CompletedBatchTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/CompletedBatchTxs", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *ContractCallTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LogicCall != nil { - { - size, err := m.LogicCall.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 + return out, nil } -func (m *SignerSetTxConfirmationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) CompletedContractCallTxs(ctx context.Context, in *CompletedContractCallTxsRequest, opts ...grpc.CallOption) (*CompletedContractCallTxsResponse, error) { + out := new(CompletedContractCallTxsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/CompletedContractCallTxs", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *SignerSetTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SignerSetNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.SignerSetNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + return out, nil } -func (m *SignerSetTxConfirmationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) BatchTxConfirmationsByValidator(ctx context.Context, in *BatchTxConfirmationsByValidatorRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsByValidatorResponse, error) { + out := new(BatchTxConfirmationsByValidatorResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/BatchTxConfirmationsByValidator", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *SignerSetTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return out, nil } -func (m *SignerSetTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func (c *queryClient) ContractCallTxConfirmationsByValidator(ctx context.Context, in *ContractCallTxConfirmationsByValidatorRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsByValidatorResponse, error) { + out := new(ContractCallTxConfirmationsByValidatorResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/ContractCallTxConfirmationsByValidator", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *SignerSetTxsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) SignerSetTxConfirmationsByValidator(ctx context.Context, in *SignerSetTxConfirmationsByValidatorRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsByValidatorResponse, error) { + out := new(SignerSetTxConfirmationsByValidatorResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/SignerSetTxConfirmationsByValidator", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *SignerSetTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return out, nil } -func (m *SignerSetTxsRequest) 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 +func (c *queryClient) EthereumEventVoteRecords(ctx context.Context, in *EthereumEventVoteRecordsRequest, opts ...grpc.CallOption) (*EthereumEventVoteRecordsResponse, error) { + out := new(EthereumEventVoteRecordsResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/EthereumEventVoteRecords", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *SignerSetTxsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) EthereumEventVotes(ctx context.Context, in *EthereumEventVotesRequest, opts ...grpc.CallOption) (*EthereumEventVotesResponse, error) { + out := new(EthereumEventVotesResponse) + err := c.cc.Invoke(ctx, "/gravity.v1.Query/EthereumEventVotes", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *SignerSetTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return out, nil } -func (m *SignerSetTxsResponse) 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.SignerSets) > 0 { - for iNdEx := len(m.SignerSets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SignerSets[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 +// QueryServer is the server API for Query service. +type QueryServer interface { + // Module parameters query + Params(context.Context, *ParamsRequest) (*ParamsResponse, error) + // get info on individual outgoing data + SignerSetTx(context.Context, *SignerSetTxRequest) (*SignerSetTxResponse, error) + LatestSignerSetTx(context.Context, *LatestSignerSetTxRequest) (*SignerSetTxResponse, error) + BatchTx(context.Context, *BatchTxRequest) (*BatchTxResponse, error) + ContractCallTx(context.Context, *ContractCallTxRequest) (*ContractCallTxResponse, error) + // get collections of outgoing traffic from the bridge + SignerSetTxs(context.Context, *SignerSetTxsRequest) (*SignerSetTxsResponse, error) + BatchTxs(context.Context, *BatchTxsRequest) (*BatchTxsResponse, error) + ContractCallTxs(context.Context, *ContractCallTxsRequest) (*ContractCallTxsResponse, error) + // TODO: can/should we group these into one endpoint? + SignerSetTxConfirmations(context.Context, *SignerSetTxConfirmationsRequest) (*SignerSetTxConfirmationsResponse, error) + BatchTxConfirmations(context.Context, *BatchTxConfirmationsRequest) (*BatchTxConfirmationsResponse, error) + ContractCallTxConfirmations(context.Context, *ContractCallTxConfirmationsRequest) (*ContractCallTxConfirmationsResponse, error) + // pending ethereum signature queries for orchestrators to figure out which + // signatures they are missing + // TODO: can/should we group this into one endpoint? + UnsignedSignerSetTxs(context.Context, *UnsignedSignerSetTxsRequest) (*UnsignedSignerSetTxsResponse, error) + UnsignedBatchTxs(context.Context, *UnsignedBatchTxsRequest) (*UnsignedBatchTxsResponse, error) + UnsignedContractCallTxs(context.Context, *UnsignedContractCallTxsRequest) (*UnsignedContractCallTxsResponse, error) + LastSubmittedEthereumEvent(context.Context, *LastSubmittedEthereumEventRequest) (*LastSubmittedEthereumEventResponse, error) + // Queries the fees for all pending batches, results are returned in sdk.Coin + // (fee_amount_int)(contract_address) style + BatchTxFees(context.Context, *BatchTxFeesRequest) (*BatchTxFeesResponse, error) + // Query for info about denoms tracked by gravity + ERC20ToDenom(context.Context, *ERC20ToDenomRequest) (*ERC20ToDenomResponse, error) + // DenomToERC20Params implements a query that allows ERC-20 parameter + // information to be retrieved by a Cosmos base denomination. + DenomToERC20Params(context.Context, *DenomToERC20ParamsRequest) (*DenomToERC20ParamsResponse, error) + // Query for info about denoms tracked by gravity + DenomToERC20(context.Context, *DenomToERC20Request) (*DenomToERC20Response, error) + // Query for batch send to ethereums + BatchedSendToEthereums(context.Context, *BatchedSendToEthereumsRequest) (*BatchedSendToEthereumsResponse, error) + // Query for unbatched send to ethereums + UnbatchedSendToEthereums(context.Context, *UnbatchedSendToEthereumsRequest) (*UnbatchedSendToEthereumsResponse, error) + // delegate keys + DelegateKeysByValidator(context.Context, *DelegateKeysByValidatorRequest) (*DelegateKeysByValidatorResponse, error) + DelegateKeysByEthereumSigner(context.Context, *DelegateKeysByEthereumSignerRequest) (*DelegateKeysByEthereumSignerResponse, error) + DelegateKeysByOrchestrator(context.Context, *DelegateKeysByOrchestratorRequest) (*DelegateKeysByOrchestratorResponse, error) + DelegateKeys(context.Context, *DelegateKeysRequest) (*DelegateKeysResponse, error) + LastObservedEthereumHeight(context.Context, *LastObservedEthereumHeightRequest) (*LastObservedEthereumHeightResponse, error) + CompletedSignerSetTxs(context.Context, *CompletedSignerSetTxsRequest) (*CompletedSignerSetTxsResponse, error) + CompletedBatchTxs(context.Context, *CompletedBatchTxsRequest) (*CompletedBatchTxsResponse, error) + CompletedContractCallTxs(context.Context, *CompletedContractCallTxsRequest) (*CompletedContractCallTxsResponse, error) + BatchTxConfirmationsByValidator(context.Context, *BatchTxConfirmationsByValidatorRequest) (*BatchTxConfirmationsByValidatorResponse, error) + ContractCallTxConfirmationsByValidator(context.Context, *ContractCallTxConfirmationsByValidatorRequest) (*ContractCallTxConfirmationsByValidatorResponse, error) + SignerSetTxConfirmationsByValidator(context.Context, *SignerSetTxConfirmationsByValidatorRequest) (*SignerSetTxConfirmationsByValidatorResponse, error) + EthereumEventVoteRecords(context.Context, *EthereumEventVoteRecordsRequest) (*EthereumEventVoteRecordsResponse, error) + EthereumEventVotes(context.Context, *EthereumEventVotesRequest) (*EthereumEventVotesResponse, error) } -func (m *BatchTxsRequest) 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 +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { } -func (m *BatchTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } - -func (m *BatchTxsRequest) 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 (*UnimplementedQueryServer) SignerSetTx(ctx context.Context, req *SignerSetTxRequest) (*SignerSetTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignerSetTx not implemented") } - -func (m *BatchTxsResponse) 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 (*UnimplementedQueryServer) LatestSignerSetTx(ctx context.Context, req *LatestSignerSetTxRequest) (*SignerSetTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LatestSignerSetTx not implemented") +} +func (*UnimplementedQueryServer) BatchTx(ctx context.Context, req *BatchTxRequest) (*BatchTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchTx not implemented") +} +func (*UnimplementedQueryServer) ContractCallTx(ctx context.Context, req *ContractCallTxRequest) (*ContractCallTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContractCallTx not implemented") +} +func (*UnimplementedQueryServer) SignerSetTxs(ctx context.Context, req *SignerSetTxsRequest) (*SignerSetTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignerSetTxs not implemented") +} +func (*UnimplementedQueryServer) BatchTxs(ctx context.Context, req *BatchTxsRequest) (*BatchTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchTxs not implemented") +} +func (*UnimplementedQueryServer) ContractCallTxs(ctx context.Context, req *ContractCallTxsRequest) (*ContractCallTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContractCallTxs not implemented") +} +func (*UnimplementedQueryServer) SignerSetTxConfirmations(ctx context.Context, req *SignerSetTxConfirmationsRequest) (*SignerSetTxConfirmationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignerSetTxConfirmations not implemented") +} +func (*UnimplementedQueryServer) BatchTxConfirmations(ctx context.Context, req *BatchTxConfirmationsRequest) (*BatchTxConfirmationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchTxConfirmations not implemented") +} +func (*UnimplementedQueryServer) ContractCallTxConfirmations(ctx context.Context, req *ContractCallTxConfirmationsRequest) (*ContractCallTxConfirmationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContractCallTxConfirmations not implemented") +} +func (*UnimplementedQueryServer) UnsignedSignerSetTxs(ctx context.Context, req *UnsignedSignerSetTxsRequest) (*UnsignedSignerSetTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnsignedSignerSetTxs not implemented") +} +func (*UnimplementedQueryServer) UnsignedBatchTxs(ctx context.Context, req *UnsignedBatchTxsRequest) (*UnsignedBatchTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnsignedBatchTxs not implemented") +} +func (*UnimplementedQueryServer) UnsignedContractCallTxs(ctx context.Context, req *UnsignedContractCallTxsRequest) (*UnsignedContractCallTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnsignedContractCallTxs not implemented") +} +func (*UnimplementedQueryServer) LastSubmittedEthereumEvent(ctx context.Context, req *LastSubmittedEthereumEventRequest) (*LastSubmittedEthereumEventResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastSubmittedEthereumEvent not implemented") +} +func (*UnimplementedQueryServer) BatchTxFees(ctx context.Context, req *BatchTxFeesRequest) (*BatchTxFeesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchTxFees not implemented") +} +func (*UnimplementedQueryServer) ERC20ToDenom(ctx context.Context, req *ERC20ToDenomRequest) (*ERC20ToDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ERC20ToDenom not implemented") +} +func (*UnimplementedQueryServer) DenomToERC20Params(ctx context.Context, req *DenomToERC20ParamsRequest) (*DenomToERC20ParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomToERC20Params not implemented") +} +func (*UnimplementedQueryServer) DenomToERC20(ctx context.Context, req *DenomToERC20Request) (*DenomToERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomToERC20 not implemented") +} +func (*UnimplementedQueryServer) BatchedSendToEthereums(ctx context.Context, req *BatchedSendToEthereumsRequest) (*BatchedSendToEthereumsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchedSendToEthereums not implemented") +} +func (*UnimplementedQueryServer) UnbatchedSendToEthereums(ctx context.Context, req *UnbatchedSendToEthereumsRequest) (*UnbatchedSendToEthereumsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnbatchedSendToEthereums not implemented") +} +func (*UnimplementedQueryServer) DelegateKeysByValidator(ctx context.Context, req *DelegateKeysByValidatorRequest) (*DelegateKeysByValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByValidator not implemented") +} +func (*UnimplementedQueryServer) DelegateKeysByEthereumSigner(ctx context.Context, req *DelegateKeysByEthereumSignerRequest) (*DelegateKeysByEthereumSignerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByEthereumSigner not implemented") +} +func (*UnimplementedQueryServer) DelegateKeysByOrchestrator(ctx context.Context, req *DelegateKeysByOrchestratorRequest) (*DelegateKeysByOrchestratorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByOrchestrator not implemented") +} +func (*UnimplementedQueryServer) DelegateKeys(ctx context.Context, req *DelegateKeysRequest) (*DelegateKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateKeys not implemented") +} +func (*UnimplementedQueryServer) LastObservedEthereumHeight(ctx context.Context, req *LastObservedEthereumHeightRequest) (*LastObservedEthereumHeightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastObservedEthereumHeight not implemented") +} +func (*UnimplementedQueryServer) CompletedSignerSetTxs(ctx context.Context, req *CompletedSignerSetTxsRequest) (*CompletedSignerSetTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompletedSignerSetTxs not implemented") +} +func (*UnimplementedQueryServer) CompletedBatchTxs(ctx context.Context, req *CompletedBatchTxsRequest) (*CompletedBatchTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompletedBatchTxs not implemented") +} +func (*UnimplementedQueryServer) CompletedContractCallTxs(ctx context.Context, req *CompletedContractCallTxsRequest) (*CompletedContractCallTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompletedContractCallTxs not implemented") +} +func (*UnimplementedQueryServer) BatchTxConfirmationsByValidator(ctx context.Context, req *BatchTxConfirmationsByValidatorRequest) (*BatchTxConfirmationsByValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchTxConfirmationsByValidator not implemented") +} +func (*UnimplementedQueryServer) ContractCallTxConfirmationsByValidator(ctx context.Context, req *ContractCallTxConfirmationsByValidatorRequest) (*ContractCallTxConfirmationsByValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContractCallTxConfirmationsByValidator not implemented") +} +func (*UnimplementedQueryServer) SignerSetTxConfirmationsByValidator(ctx context.Context, req *SignerSetTxConfirmationsByValidatorRequest) (*SignerSetTxConfirmationsByValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignerSetTxConfirmationsByValidator not implemented") +} +func (*UnimplementedQueryServer) EthereumEventVoteRecords(ctx context.Context, req *EthereumEventVoteRecordsRequest) (*EthereumEventVoteRecordsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EthereumEventVoteRecords not implemented") +} +func (*UnimplementedQueryServer) EthereumEventVotes(ctx context.Context, req *EthereumEventVotesRequest) (*EthereumEventVotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EthereumEventVotes not implemented") } -func (m *BatchTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) } -func (m *BatchTxsResponse) 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 +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParamsRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.Batches) > 0 { - for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*ParamsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_SignerSetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignerSetTxRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *ContractCallTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxsRequest) 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 + if interceptor == nil { + return srv.(QueryServer).SignerSetTx(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/SignerSetTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SignerSetTx(ctx, req.(*SignerSetTxRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_LatestSignerSetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LatestSignerSetTxRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *ContractCallTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxsResponse) 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 interceptor == nil { + return srv.(QueryServer).LatestSignerSetTx(ctx, in) } - if len(m.Calls) > 0 { - for iNdEx := len(m.Calls) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Calls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/LatestSignerSetTx", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LatestSignerSetTx(ctx, req.(*LatestSignerSetTxRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedSignerSetTxsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_BatchTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchTxRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *UnsignedSignerSetTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedSignerSetTxsRequest) 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 + if interceptor == nil { + return srv.(QueryServer).BatchTx(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/BatchTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BatchTx(ctx, req.(*BatchTxRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedSignerSetTxsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_ContractCallTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContractCallTxRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *UnsignedSignerSetTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedSignerSetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SignerSets) > 0 { - for iNdEx := len(m.SignerSets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SignerSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if interceptor == nil { + return srv.(QueryServer).ContractCallTx(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/ContractCallTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ContractCallTx(ctx, req.(*ContractCallTxRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedBatchTxsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_SignerSetTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignerSetTxsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).SignerSetTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/SignerSetTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SignerSetTxs(ctx, req.(*SignerSetTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedBatchTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_BatchTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchTxsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BatchTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/BatchTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BatchTxs(ctx, req.(*BatchTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedBatchTxsRequest) 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 +func _Query_ContractCallTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContractCallTxsRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).ContractCallTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/ContractCallTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ContractCallTxs(ctx, req.(*ContractCallTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedBatchTxsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_SignerSetTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignerSetTxConfirmationsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).SignerSetTxConfirmations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/SignerSetTxConfirmations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SignerSetTxConfirmations(ctx, req.(*SignerSetTxConfirmationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedBatchTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedBatchTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Batches) > 0 { - for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func _Query_BatchTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchTxConfirmationsRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).BatchTxConfirmations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/BatchTxConfirmations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BatchTxConfirmations(ctx, req.(*BatchTxConfirmationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedContractCallTxsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_ContractCallTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContractCallTxConfirmationsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *UnsignedContractCallTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedContractCallTxsRequest) 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 + if interceptor == nil { + return srv.(QueryServer).ContractCallTxConfirmations(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/ContractCallTxConfirmations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ContractCallTxConfirmations(ctx, req.(*ContractCallTxConfirmationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedContractCallTxsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_UnsignedSignerSetTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsignedSignerSetTxsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).UnsignedSignerSetTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/UnsignedSignerSetTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnsignedSignerSetTxs(ctx, req.(*UnsignedSignerSetTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedContractCallTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_UnsignedBatchTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsignedBatchTxsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnsignedBatchTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/UnsignedBatchTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnsignedBatchTxs(ctx, req.(*UnsignedBatchTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *UnsignedContractCallTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Calls) > 0 { - for iNdEx := len(m.Calls) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Calls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func _Query_UnsignedContractCallTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsignedContractCallTxsRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).UnsignedContractCallTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/UnsignedContractCallTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnsignedContractCallTxs(ctx, req.(*UnsignedContractCallTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxFeesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_LastSubmittedEthereumEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LastSubmittedEthereumEventRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).LastSubmittedEthereumEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/LastSubmittedEthereumEvent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastSubmittedEthereumEvent(ctx, req.(*LastSubmittedEthereumEventRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxFeesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_BatchTxFees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchTxFeesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BatchTxFees(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/BatchTxFees", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BatchTxFees(ctx, req.(*BatchTxFeesRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func _Query_ERC20ToDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ERC20ToDenomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ERC20ToDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/ERC20ToDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ERC20ToDenom(ctx, req.(*ERC20ToDenomRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxFeesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_DenomToERC20Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DenomToERC20ParamsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).DenomToERC20Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/DenomToERC20Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomToERC20Params(ctx, req.(*DenomToERC20ParamsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxFeesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_DenomToERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DenomToERC20Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomToERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/DenomToERC20", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomToERC20(ctx, req.(*DenomToERC20Request)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Fees) > 0 { - for iNdEx := len(m.Fees) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Fees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func _Query_BatchedSendToEthereums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchedSendToEthereumsRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).BatchedSendToEthereums(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/BatchedSendToEthereums", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BatchedSendToEthereums(ctx, req.(*BatchedSendToEthereumsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxConfirmationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_UnbatchedSendToEthereums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnbatchedSendToEthereumsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).UnbatchedSendToEthereums(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/UnbatchedSendToEthereums", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnbatchedSendToEthereums(ctx, req.(*UnbatchedSendToEthereumsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_DelegateKeysByValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelegateKeysByValidatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegateKeysByValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/DelegateKeysByValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegateKeysByValidator(ctx, req.(*DelegateKeysByValidatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.InvalidationNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.InvalidationNonce)) - i-- - dAtA[i] = 0x10 +func _Query_DelegateKeysByEthereumSigner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelegateKeysByEthereumSignerRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.InvalidationScope) > 0 { - i -= len(m.InvalidationScope) - copy(dAtA[i:], m.InvalidationScope) - i = encodeVarintQuery(dAtA, i, uint64(len(m.InvalidationScope))) - i-- - dAtA[i] = 0xa + if interceptor == nil { + return srv.(QueryServer).DelegateKeysByEthereumSigner(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/DelegateKeysByEthereumSigner", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegateKeysByEthereumSigner(ctx, req.(*DelegateKeysByEthereumSignerRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxConfirmationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_DelegateKeysByOrchestrator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelegateKeysByOrchestratorRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).DelegateKeysByOrchestrator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/DelegateKeysByOrchestrator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegateKeysByOrchestrator(ctx, req.(*DelegateKeysByOrchestratorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_DelegateKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelegateKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegateKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/DelegateKeys", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegateKeys(ctx, req.(*DelegateKeysRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *ContractCallTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func _Query_LastObservedEthereumHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LastObservedEthereumHeightRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).LastObservedEthereumHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/LastObservedEthereumHeight", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastObservedEthereumHeight(ctx, req.(*LastObservedEthereumHeightRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxConfirmationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_CompletedSignerSetTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CompletedSignerSetTxsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).CompletedSignerSetTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/CompletedSignerSetTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CompletedSignerSetTxs(ctx, req.(*CompletedSignerSetTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_CompletedBatchTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CompletedBatchTxsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CompletedBatchTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/CompletedBatchTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CompletedBatchTxs(ctx, req.(*CompletedBatchTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0x12 +func _Query_CompletedContractCallTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CompletedContractCallTxsRequest) + if err := dec(in); err != nil { + return nil, err } - if m.BatchNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BatchNonce)) - i-- - dAtA[i] = 0x8 + if interceptor == nil { + return srv.(QueryServer).CompletedContractCallTxs(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/CompletedContractCallTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CompletedContractCallTxs(ctx, req.(*CompletedContractCallTxsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxConfirmationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_BatchTxConfirmationsByValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchTxConfirmationsByValidatorRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).BatchTxConfirmationsByValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/BatchTxConfirmationsByValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BatchTxConfirmationsByValidator(ctx, req.(*BatchTxConfirmationsByValidatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_ContractCallTxConfirmationsByValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContractCallTxConfirmationsByValidatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ContractCallTxConfirmationsByValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/ContractCallTxConfirmationsByValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ContractCallTxConfirmationsByValidator(ctx, req.(*ContractCallTxConfirmationsByValidatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *BatchTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func _Query_SignerSetTxConfirmationsByValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignerSetTxConfirmationsByValidatorRequest) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).SignerSetTxConfirmationsByValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/SignerSetTxConfirmationsByValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SignerSetTxConfirmationsByValidator(ctx, req.(*SignerSetTxConfirmationsByValidatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *LastSubmittedEthereumEventRequest) Marshal() (dAtA []byte, err error) { +func _Query_EthereumEventVoteRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EthereumEventVoteRecordsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EthereumEventVoteRecords(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/EthereumEventVoteRecords", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EthereumEventVoteRecords(ctx, req.(*EthereumEventVoteRecordsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EthereumEventVotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EthereumEventVotesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EthereumEventVotes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gravity.v1.Query/EthereumEventVotes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EthereumEventVotes(ctx, req.(*EthereumEventVotesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gravity.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "SignerSetTx", + Handler: _Query_SignerSetTx_Handler, + }, + { + MethodName: "LatestSignerSetTx", + Handler: _Query_LatestSignerSetTx_Handler, + }, + { + MethodName: "BatchTx", + Handler: _Query_BatchTx_Handler, + }, + { + MethodName: "ContractCallTx", + Handler: _Query_ContractCallTx_Handler, + }, + { + MethodName: "SignerSetTxs", + Handler: _Query_SignerSetTxs_Handler, + }, + { + MethodName: "BatchTxs", + Handler: _Query_BatchTxs_Handler, + }, + { + MethodName: "ContractCallTxs", + Handler: _Query_ContractCallTxs_Handler, + }, + { + MethodName: "SignerSetTxConfirmations", + Handler: _Query_SignerSetTxConfirmations_Handler, + }, + { + MethodName: "BatchTxConfirmations", + Handler: _Query_BatchTxConfirmations_Handler, + }, + { + MethodName: "ContractCallTxConfirmations", + Handler: _Query_ContractCallTxConfirmations_Handler, + }, + { + MethodName: "UnsignedSignerSetTxs", + Handler: _Query_UnsignedSignerSetTxs_Handler, + }, + { + MethodName: "UnsignedBatchTxs", + Handler: _Query_UnsignedBatchTxs_Handler, + }, + { + MethodName: "UnsignedContractCallTxs", + Handler: _Query_UnsignedContractCallTxs_Handler, + }, + { + MethodName: "LastSubmittedEthereumEvent", + Handler: _Query_LastSubmittedEthereumEvent_Handler, + }, + { + MethodName: "BatchTxFees", + Handler: _Query_BatchTxFees_Handler, + }, + { + MethodName: "ERC20ToDenom", + Handler: _Query_ERC20ToDenom_Handler, + }, + { + MethodName: "DenomToERC20Params", + Handler: _Query_DenomToERC20Params_Handler, + }, + { + MethodName: "DenomToERC20", + Handler: _Query_DenomToERC20_Handler, + }, + { + MethodName: "BatchedSendToEthereums", + Handler: _Query_BatchedSendToEthereums_Handler, + }, + { + MethodName: "UnbatchedSendToEthereums", + Handler: _Query_UnbatchedSendToEthereums_Handler, + }, + { + MethodName: "DelegateKeysByValidator", + Handler: _Query_DelegateKeysByValidator_Handler, + }, + { + MethodName: "DelegateKeysByEthereumSigner", + Handler: _Query_DelegateKeysByEthereumSigner_Handler, + }, + { + MethodName: "DelegateKeysByOrchestrator", + Handler: _Query_DelegateKeysByOrchestrator_Handler, + }, + { + MethodName: "DelegateKeys", + Handler: _Query_DelegateKeys_Handler, + }, + { + MethodName: "LastObservedEthereumHeight", + Handler: _Query_LastObservedEthereumHeight_Handler, + }, + { + MethodName: "CompletedSignerSetTxs", + Handler: _Query_CompletedSignerSetTxs_Handler, + }, + { + MethodName: "CompletedBatchTxs", + Handler: _Query_CompletedBatchTxs_Handler, + }, + { + MethodName: "CompletedContractCallTxs", + Handler: _Query_CompletedContractCallTxs_Handler, + }, + { + MethodName: "BatchTxConfirmationsByValidator", + Handler: _Query_BatchTxConfirmationsByValidator_Handler, + }, + { + MethodName: "ContractCallTxConfirmationsByValidator", + Handler: _Query_ContractCallTxConfirmationsByValidator_Handler, + }, + { + MethodName: "SignerSetTxConfirmationsByValidator", + Handler: _Query_SignerSetTxConfirmationsByValidator_Handler, + }, + { + MethodName: "EthereumEventVoteRecords", + Handler: _Query_EthereumEventVoteRecords_Handler, + }, + { + MethodName: "EthereumEventVotes", + Handler: _Query_EthereumEventVotes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gravity/v1/query.proto", +} + +func (m *ParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4590,27 +4627,20 @@ func (m *LastSubmittedEthereumEventRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LastSubmittedEthereumEventRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LastSubmittedEthereumEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ParamsRequest) 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 *LastSubmittedEthereumEventResponse) Marshal() (dAtA []byte, err error) { +func (m *ParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4620,25 +4650,30 @@ func (m *LastSubmittedEthereumEventResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *LastSubmittedEthereumEventResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LastSubmittedEthereumEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.EventNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EventNonce)) - i-- - dAtA[i] = 0x8 + { + 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 *ERC20ToDenomRequest) Marshal() (dAtA []byte, err error) { +func (m *SignerSetTxRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4648,27 +4683,25 @@ func (m *ERC20ToDenomRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ERC20ToDenomRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SignerSetTxRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ERC20ToDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SignerSetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Erc20) > 0 { - i -= len(m.Erc20) - copy(dAtA[i:], m.Erc20) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) + if m.SignerSetNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.SignerSetNonce)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *ERC20ToDenomResponse) Marshal() (dAtA []byte, err error) { +func (m *LatestSignerSetTxRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4678,37 +4711,20 @@ func (m *ERC20ToDenomResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ERC20ToDenomResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *LatestSignerSetTxRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ERC20ToDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *LatestSignerSetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.CosmosOriginated { - i-- - if m.CosmosOriginated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *DenomToERC20ParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *SignerSetTxResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4718,27 +4734,32 @@ func (m *DenomToERC20ParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DenomToERC20ParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SignerSetTxResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DenomToERC20ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SignerSetTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if m.SignerSet != nil { + { + size, err := m.SignerSet.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 *DenomToERC20ParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *BatchTxRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4748,46 +4769,32 @@ func (m *DenomToERC20ParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DenomToERC20ParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *BatchTxRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DenomToERC20ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BatchTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Erc20Decimals != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Erc20Decimals)) - i-- - dAtA[i] = 0x20 - } - if len(m.Erc20Symbol) > 0 { - i -= len(m.Erc20Symbol) - copy(dAtA[i:], m.Erc20Symbol) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(m.Erc20Name) > 0 { - i -= len(m.Erc20Name) - copy(dAtA[i:], m.Erc20Name) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20Name))) + if m.BatchNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BatchNonce)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if len(m.BaseDenom) > 0 { - i -= len(m.BaseDenom) - copy(dAtA[i:], m.BaseDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BaseDenom))) + if len(m.TokenContract) > 0 { + i -= len(m.TokenContract) + copy(dAtA[i:], m.TokenContract) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenContract))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *DenomToERC20Request) Marshal() (dAtA []byte, err error) { +func (m *BatchTxResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4797,27 +4804,32 @@ func (m *DenomToERC20Request) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DenomToERC20Request) MarshalTo(dAtA []byte) (int, error) { +func (m *BatchTxResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DenomToERC20Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BatchTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if m.Batch != nil { + { + size, err := m.Batch.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 *DenomToERC20Response) Marshal() (dAtA []byte, err error) { +func (m *ContractCallTxRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4827,37 +4839,32 @@ func (m *DenomToERC20Response) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DenomToERC20Response) MarshalTo(dAtA []byte) (int, error) { +func (m *ContractCallTxRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DenomToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ContractCallTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.CosmosOriginated { - i-- - if m.CosmosOriginated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.InvalidationNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.InvalidationNonce)) i-- dAtA[i] = 0x10 } - if len(m.Erc20) > 0 { - i -= len(m.Erc20) - copy(dAtA[i:], m.Erc20) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) + if len(m.InvalidationScope) > 0 { + i -= len(m.InvalidationScope) + copy(dAtA[i:], m.InvalidationScope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.InvalidationScope))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *DelegateKeysByValidatorRequest) Marshal() (dAtA []byte, err error) { +func (m *ContractCallTxResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4867,27 +4874,32 @@ func (m *DelegateKeysByValidatorRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DelegateKeysByValidatorRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ContractCallTxResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysByValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ContractCallTxResponse) 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 = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + if m.LogicCall != nil { + { + size, err := m.LogicCall.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 *DelegateKeysByValidatorResponse) Marshal() (dAtA []byte, err error) { +func (m *SignerSetTxConfirmationsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4897,34 +4909,25 @@ func (m *DelegateKeysByValidatorResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DelegateKeysByValidatorResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SignerSetTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysByValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SignerSetTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.OrchestratorAddress) > 0 { - i -= len(m.OrchestratorAddress) - copy(dAtA[i:], m.OrchestratorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.EthAddress) > 0 { - i -= len(m.EthAddress) - copy(dAtA[i:], m.EthAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.EthAddress))) + if m.SignerSetNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.SignerSetNonce)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *DelegateKeysByEthereumSignerRequest) Marshal() (dAtA []byte, err error) { +func (m *SignerSetTxConfirmationsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4934,27 +4937,34 @@ func (m *DelegateKeysByEthereumSignerRequest) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *DelegateKeysByEthereumSignerRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SignerSetTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysByEthereumSignerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SignerSetTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.EthereumSigner) > 0 { - i -= len(m.EthereumSigner) - copy(dAtA[i:], m.EthereumSigner) - i = encodeVarintQuery(dAtA, i, uint64(len(m.EthereumSigner))) - i-- - dAtA[i] = 0xa + if len(m.Signatures) > 0 { + for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Signatures[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 *DelegateKeysByEthereumSignerResponse) Marshal() (dAtA []byte, err error) { +func (m *SignerSetTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4964,34 +4974,32 @@ func (m *DelegateKeysByEthereumSignerResponse) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *DelegateKeysByEthereumSignerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SignerSetTxsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysByEthereumSignerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SignerSetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.OrchestratorAddress) > 0 { - i -= len(m.OrchestratorAddress) - copy(dAtA[i:], m.OrchestratorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + 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 *DelegateKeysByOrchestratorRequest) Marshal() (dAtA []byte, err error) { +func (m *SignerSetTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5001,27 +5009,46 @@ func (m *DelegateKeysByOrchestratorRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DelegateKeysByOrchestratorRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SignerSetTxsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysByOrchestratorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SignerSetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.OrchestratorAddress) > 0 { - i -= len(m.OrchestratorAddress) - copy(dAtA[i:], m.OrchestratorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) + 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 + dAtA[i] = 0x12 + } + if len(m.SignerSets) > 0 { + for iNdEx := len(m.SignerSets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignerSets[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 *DelegateKeysByOrchestratorResponse) Marshal() (dAtA []byte, err error) { +func (m *BatchTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5031,34 +5058,32 @@ func (m *DelegateKeysByOrchestratorResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *DelegateKeysByOrchestratorResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *BatchTxsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysByOrchestratorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BatchTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.EthereumSigner) > 0 { - i -= len(m.EthereumSigner) - copy(dAtA[i:], m.EthereumSigner) - i = encodeVarintQuery(dAtA, i, uint64(len(m.EthereumSigner))) - i-- - dAtA[i] = 0x12 - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + 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 *DelegateKeysRequest) Marshal() (dAtA []byte, err error) { +func (m *BatchTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5068,43 +5093,116 @@ func (m *DelegateKeysRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DelegateKeysRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *BatchTxsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BatchTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - return len(dAtA) - i, nil -} - -func (m *DelegateKeysResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + 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.Batches) > 0 { + for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Batches[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 *ContractCallTxsRequest) 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 *DelegateKeysResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ContractCallTxsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ContractCallTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.DelegateKeys) > 0 { - for iNdEx := len(m.DelegateKeys) - 1; iNdEx >= 0; iNdEx-- { + 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 *ContractCallTxsResponse) 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 *ContractCallTxsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractCallTxsResponse) 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.Calls) > 0 { + for iNdEx := len(m.Calls) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.DelegateKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Calls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -5118,7 +5216,7 @@ func (m *DelegateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BatchedSendToEthereumsRequest) Marshal() (dAtA []byte, err error) { +func (m *UnsignedSignerSetTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5128,27 +5226,27 @@ func (m *BatchedSendToEthereumsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BatchedSendToEthereumsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *UnsignedSignerSetTxsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BatchedSendToEthereumsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnsignedSignerSetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SenderAddress))) + 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 *BatchedSendToEthereumsResponse) Marshal() (dAtA []byte, err error) { +func (m *UnsignedSignerSetTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5158,20 +5256,20 @@ func (m *BatchedSendToEthereumsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BatchedSendToEthereumsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *UnsignedSignerSetTxsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnsignedSignerSetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.SendToEthereums) > 0 { - for iNdEx := len(m.SendToEthereums) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SignerSets) > 0 { + for iNdEx := len(m.SignerSets) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SendToEthereums[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SignerSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -5185,7 +5283,7 @@ func (m *BatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *UnbatchedSendToEthereumsRequest) Marshal() (dAtA []byte, err error) { +func (m *UnsignedBatchTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5195,39 +5293,27 @@ func (m *UnbatchedSendToEthereumsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *UnbatchedSendToEthereumsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *UnsignedBatchTxsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *UnbatchedSendToEthereumsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnsignedBatchTxsRequest) 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.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SenderAddress))) + 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 *UnbatchedSendToEthereumsResponse) Marshal() (dAtA []byte, err error) { +func (m *UnsignedBatchTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5237,32 +5323,20 @@ func (m *UnbatchedSendToEthereumsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *UnbatchedSendToEthereumsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *UnsignedBatchTxsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *UnbatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnsignedBatchTxsResponse) 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.SendToEthereums) > 0 { - for iNdEx := len(m.SendToEthereums) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Batches) > 0 { + for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SendToEthereums[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -5276,7 +5350,7 @@ func (m *UnbatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *LastObservedEthereumHeightRequest) Marshal() (dAtA []byte, err error) { +func (m *UnsignedContractCallTxsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5286,20 +5360,27 @@ func (m *LastObservedEthereumHeightRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LastObservedEthereumHeightRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *UnsignedContractCallTxsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LastObservedEthereumHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnsignedContractCallTxsRequest) 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 *LastObservedEthereumHeightResponse) Marshal() (dAtA []byte, err error) { +func (m *UnsignedContractCallTxsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5309,774 +5390,3641 @@ func (m *LastObservedEthereumHeightResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *LastObservedEthereumHeightResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *UnsignedContractCallTxsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LastObservedEthereumHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnsignedContractCallTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.LastObservedEthereumHeight != nil { - { - size, err := m.LastObservedEthereumHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Calls) > 0 { + for iNdEx := len(m.Calls) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Calls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - 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 *ParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *BatchTxFeesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *ParamsResponse) 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 *BatchTxFeesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignerSetTxRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *BatchTxFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.SignerSetNonce != 0 { - n += 1 + sovQuery(uint64(m.SignerSetNonce)) - } - return n + return len(dAtA) - i, nil } -func (m *LatestSignerSetTxRequest) Size() (n int) { - if m == nil { - return 0 +func (m *BatchTxFeesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *SignerSetTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignerSet != nil { - l = m.SignerSet.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *BatchTxFeesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BatchTxRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *BatchTxFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.BatchNonce != 0 { - n += 1 + sovQuery(uint64(m.BatchNonce)) + if len(m.Fees) > 0 { + for iNdEx := len(m.Fees) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Fees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return n + return len(dAtA) - i, nil } -func (m *BatchTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Batch != nil { - l = m.Batch.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *ContractCallTxConfirmationsRequest) 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 n + return dAtA[:n], nil } -func (m *ContractCallTxRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *ContractCallTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractCallTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.InvalidationScope) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } if m.InvalidationNonce != 0 { - n += 1 + sovQuery(uint64(m.InvalidationNonce)) + i = encodeVarintQuery(dAtA, i, uint64(m.InvalidationNonce)) + i-- + dAtA[i] = 0x10 } - return n + if len(m.InvalidationScope) > 0 { + i -= len(m.InvalidationScope) + copy(dAtA[i:], m.InvalidationScope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.InvalidationScope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *ContractCallTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LogicCall != nil { - l = m.LogicCall.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *ContractCallTxConfirmationsResponse) 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 n + return dAtA[:n], nil } -func (m *SignerSetTxConfirmationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignerSetNonce != 0 { - n += 1 + sovQuery(uint64(m.SignerSetNonce)) - } - return n +func (m *ContractCallTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignerSetTxConfirmationsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *ContractCallTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - return n + return len(dAtA) - i, nil } -func (m *SignerSetTxsRequest) 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)) +func (m *BatchTxConfirmationsRequest) 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 n + return dAtA[:n], nil } -func (m *SignerSetTxsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *BatchTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.SignerSets) > 0 { - for _, e := range m.SignerSets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + if len(m.TokenContract) > 0 { + i -= len(m.TokenContract) + copy(dAtA[i:], m.TokenContract) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenContract))) + i-- + dAtA[i] = 0x12 } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.BatchNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BatchNonce)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *BatchTxsRequest) 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)) +func (m *BatchTxConfirmationsResponse) 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 n + return dAtA[:n], nil } -func (m *BatchTxsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *BatchTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Signatures) > 0 { + for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + return len(dAtA) - i, nil } -func (m *ContractCallTxsRequest) 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)) +func (m *LastSubmittedEthereumEventRequest) 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 n + return dAtA[:n], nil } -func (m *ContractCallTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Calls) > 0 { - for _, e := range m.Calls { - 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 *LastSubmittedEthereumEventRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *UnsignedSignerSetTxsRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *LastSubmittedEthereumEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(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 n + return len(dAtA) - i, nil } -func (m *UnsignedSignerSetTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SignerSets) > 0 { - for _, e := range m.SignerSets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } +func (m *LastSubmittedEthereumEventResponse) 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 n + return dAtA[:n], nil } -func (m *UnsignedBatchTxsRequest) 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 *LastSubmittedEthereumEventResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *UnsignedBatchTxsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *LastSubmittedEthereumEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + if m.EventNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EventNonce)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *UnsignedContractCallTxsRequest) 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)) +func (m *ERC20ToDenomRequest) 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 n + return dAtA[:n], nil } -func (m *UnsignedContractCallTxsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *ERC20ToDenomRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ERC20ToDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Calls) > 0 { - for _, e := range m.Calls { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + if len(m.Erc20) > 0 { + i -= len(m.Erc20) + copy(dAtA[i:], m.Erc20) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *BatchTxFeesRequest) Size() (n int) { - if m == nil { - return 0 +func (m *ERC20ToDenomResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *BatchTxFeesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Fees) > 0 { - for _, e := range m.Fees { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n +func (m *ERC20ToDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ContractCallTxConfirmationsRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *ERC20ToDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.InvalidationScope) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.CosmosOriginated { + i-- + if m.CosmosOriginated { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if m.InvalidationNonce != 0 { - n += 1 + sovQuery(uint64(m.InvalidationNonce)) + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *ContractCallTxConfirmationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } +func (m *DenomToERC20ParamsRequest) 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 n + return dAtA[:n], nil } -func (m *BatchTxConfirmationsRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *DenomToERC20ParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DenomToERC20ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.BatchNonce != 0 { - n += 1 + sovQuery(uint64(m.BatchNonce)) + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa } - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *DenomToERC20ParamsResponse) 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 n + return dAtA[:n], nil } -func (m *BatchTxConfirmationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n +func (m *DenomToERC20ParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LastSubmittedEthereumEventRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *DenomToERC20ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Erc20Decimals != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Erc20Decimals)) + i-- + dAtA[i] = 0x20 } - return n -} - -func (m *LastSubmittedEthereumEventResponse) Size() (n int) { - if m == nil { - return 0 + if len(m.Erc20Symbol) > 0 { + i -= len(m.Erc20Symbol) + copy(dAtA[i:], m.Erc20Symbol) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20Symbol))) + i-- + dAtA[i] = 0x1a } - var l int - _ = l - if m.EventNonce != 0 { - n += 1 + sovQuery(uint64(m.EventNonce)) + if len(m.Erc20Name) > 0 { + i -= len(m.Erc20Name) + copy(dAtA[i:], m.Erc20Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20Name))) + i-- + dAtA[i] = 0x12 } - return n + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *ERC20ToDenomRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Erc20) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) +func (m *DenomToERC20Request) 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 n + return dAtA[:n], nil } -func (m *ERC20ToDenomResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.CosmosOriginated { - n += 2 - } - return n +func (m *DenomToERC20Request) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DenomToERC20ParamsRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *DenomToERC20Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *DenomToERC20ParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Erc20Name) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Erc20Symbol) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Erc20Decimals != 0 { - n += 1 + sovQuery(uint64(m.Erc20Decimals)) +func (m *DenomToERC20Response) 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 n + return dAtA[:n], nil } -func (m *DenomToERC20Request) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *DenomToERC20Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DenomToERC20Response) Size() (n int) { - if m == nil { - return 0 - } +func (m *DenomToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Erc20) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } if m.CosmosOriginated { - n += 2 + i-- + if m.CosmosOriginated { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - return n + if len(m.Erc20) > 0 { + i -= len(m.Erc20) + copy(dAtA[i:], m.Erc20) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *DelegateKeysByValidatorRequest) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysByValidatorRequest) 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 *DelegateKeysByValidatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysByValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *DelegateKeysByValidatorResponse) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysByValidatorResponse) 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 *DelegateKeysByValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysByValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.EthAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.OrchestratorAddress) > 0 { + i -= len(m.OrchestratorAddress) + copy(dAtA[i:], m.OrchestratorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) + i-- + dAtA[i] = 0x12 } - l = len(m.OrchestratorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.EthAddress) > 0 { + i -= len(m.EthAddress) + copy(dAtA[i:], m.EthAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EthAddress))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *DelegateKeysByEthereumSignerRequest) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysByEthereumSignerRequest) 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 *DelegateKeysByEthereumSignerRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysByEthereumSignerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.EthereumSigner) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.EthereumSigner) > 0 { + i -= len(m.EthereumSigner) + copy(dAtA[i:], m.EthereumSigner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EthereumSigner))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *DelegateKeysByEthereumSignerResponse) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysByEthereumSignerResponse) 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 *DelegateKeysByEthereumSignerResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysByEthereumSignerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.OrchestratorAddress) > 0 { + i -= len(m.OrchestratorAddress) + copy(dAtA[i:], m.OrchestratorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) + i-- + dAtA[i] = 0x12 } - l = len(m.OrchestratorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *DelegateKeysByOrchestratorRequest) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysByOrchestratorRequest) 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 *DelegateKeysByOrchestratorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysByOrchestratorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.OrchestratorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.OrchestratorAddress) > 0 { + i -= len(m.OrchestratorAddress) + copy(dAtA[i:], m.OrchestratorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *DelegateKeysByOrchestratorResponse) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysByOrchestratorResponse) 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 *DelegateKeysByOrchestratorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysByOrchestratorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.EthereumSigner) > 0 { + i -= len(m.EthereumSigner) + copy(dAtA[i:], m.EthereumSigner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EthereumSigner))) + i-- + dAtA[i] = 0x12 } - l = len(m.EthereumSigner) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *DelegateKeysRequest) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysRequest) 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 *DelegateKeysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *DelegateKeysResponse) Size() (n int) { - if m == nil { - return 0 +func (m *DelegateKeysResponse) 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 *DelegateKeysResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if len(m.DelegateKeys) > 0 { - for _, e := range m.DelegateKeys { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + for iNdEx := len(m.DelegateKeys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegateKeys[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 *BatchedSendToEthereumsRequest) 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 *BatchedSendToEthereumsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchedSendToEthereumsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchedSendToEthereumsResponse) 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 *BatchedSendToEthereumsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SendToEthereums) > 0 { + for iNdEx := len(m.SendToEthereums) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SendToEthereums[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 *UnbatchedSendToEthereumsRequest) 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 *UnbatchedSendToEthereumsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbatchedSendToEthereumsRequest) 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.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnbatchedSendToEthereumsResponse) 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 *UnbatchedSendToEthereumsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbatchedSendToEthereumsResponse) 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.SendToEthereums) > 0 { + for iNdEx := len(m.SendToEthereums) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SendToEthereums[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 *LastObservedEthereumHeightRequest) 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 *LastObservedEthereumHeightRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastObservedEthereumHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *LastObservedEthereumHeightResponse) 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 *LastObservedEthereumHeightResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastObservedEthereumHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastObservedEthereumHeight != nil { + { + size, err := m.LastObservedEthereumHeight.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 *CompletedBatchTxsRequest) 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 *CompletedBatchTxsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompletedBatchTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *CompletedBatchTxsResponse) 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 *CompletedBatchTxsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompletedBatchTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CompletedBatchTxs) > 0 { + for iNdEx := len(m.CompletedBatchTxs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CompletedBatchTxs[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 *CompletedContractCallTxsRequest) 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 *CompletedContractCallTxsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompletedContractCallTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *CompletedContractCallTxsResponse) 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 *CompletedContractCallTxsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompletedContractCallTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CompletedContractCallTxs) > 0 { + for iNdEx := len(m.CompletedContractCallTxs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CompletedContractCallTxs[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 *CompletedSignerSetTxsRequest) 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 *CompletedSignerSetTxsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompletedSignerSetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *CompletedSignerSetTxsResponse) 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 *CompletedSignerSetTxsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompletedSignerSetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CompletedSignerSetTxs) > 0 { + for iNdEx := len(m.CompletedSignerSetTxs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CompletedSignerSetTxs[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 *BatchTxConfirmationsByValidatorRequest) 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 *BatchTxConfirmationsByValidatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTxConfirmationsByValidatorRequest) 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 = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchTxConfirmationsByValidatorResponse) 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 *BatchTxConfirmationsByValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTxConfirmationsByValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BatchTxConfirmations) > 0 { + for iNdEx := len(m.BatchTxConfirmations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BatchTxConfirmations[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 *ContractCallTxConfirmationsByValidatorRequest) 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 *ContractCallTxConfirmationsByValidatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractCallTxConfirmationsByValidatorRequest) 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 = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContractCallTxConfirmationsByValidatorResponse) 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 *ContractCallTxConfirmationsByValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractCallTxConfirmationsByValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractCallTxConfirmations) > 0 { + for iNdEx := len(m.ContractCallTxConfirmations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContractCallTxConfirmations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + return len(dAtA) - i, nil +} + +func (m *SignerSetTxConfirmationsByValidatorRequest) 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 *SignerSetTxConfirmationsByValidatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignerSetTxConfirmationsByValidatorRequest) 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 = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignerSetTxConfirmationsByValidatorResponse) 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 *SignerSetTxConfirmationsByValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignerSetTxConfirmationsByValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SignerSetTxConfirmations) > 0 { + for iNdEx := len(m.SignerSetTxConfirmations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignerSetTxConfirmations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + return len(dAtA) - i, nil +} + +func (m *EthereumEventVoteRecordsRequest) 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 *EthereumEventVoteRecordsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthereumEventVoteRecordsRequest) 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 *EthereumEventVoteRecordsResponse) 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 *EthereumEventVoteRecordsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthereumEventVoteRecordsResponse) 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.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Records[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 *EthereumEventVotesRequest) 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 *EthereumEventVotesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthereumEventVotesRequest) 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 = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EthereumEventVotesResponse) 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 *EthereumEventVotesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthereumEventVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[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 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 *ParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ParamsResponse) 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 *SignerSetTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SignerSetNonce != 0 { + n += 1 + sovQuery(uint64(m.SignerSetNonce)) + } + return n +} + +func (m *LatestSignerSetTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *SignerSetTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SignerSet != nil { + l = m.SignerSet.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *BatchTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TokenContract) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.BatchNonce != 0 { + n += 1 + sovQuery(uint64(m.BatchNonce)) + } + return n +} + +func (m *BatchTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Batch != nil { + l = m.Batch.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *ContractCallTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InvalidationScope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.InvalidationNonce != 0 { + n += 1 + sovQuery(uint64(m.InvalidationNonce)) + } + return n +} + +func (m *ContractCallTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.LogicCall != nil { + l = m.LogicCall.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SignerSetTxConfirmationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SignerSetNonce != 0 { + n += 1 + sovQuery(uint64(m.SignerSetNonce)) + } + return n +} + +func (m *SignerSetTxConfirmationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Signatures) > 0 { + for _, e := range m.Signatures { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SignerSetTxsRequest) 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 *SignerSetTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SignerSets) > 0 { + for _, e := range m.SignerSets { + 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 *BatchTxsRequest) 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 *BatchTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Batches) > 0 { + for _, e := range m.Batches { + 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 *ContractCallTxsRequest) 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 *ContractCallTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Calls) > 0 { + for _, e := range m.Calls { + 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 *UnsignedSignerSetTxsRequest) 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 *UnsignedSignerSetTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SignerSets) > 0 { + for _, e := range m.SignerSets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *UnsignedBatchTxsRequest) 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 *UnsignedBatchTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Batches) > 0 { + for _, e := range m.Batches { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *UnsignedContractCallTxsRequest) 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 *UnsignedContractCallTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Calls) > 0 { + for _, e := range m.Calls { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *BatchTxFeesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *BatchTxFeesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Fees) > 0 { + for _, e := range m.Fees { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *ContractCallTxConfirmationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InvalidationScope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.InvalidationNonce != 0 { + n += 1 + sovQuery(uint64(m.InvalidationNonce)) + } + return n +} + +func (m *ContractCallTxConfirmationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Signatures) > 0 { + for _, e := range m.Signatures { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *BatchTxConfirmationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BatchNonce != 0 { + n += 1 + sovQuery(uint64(m.BatchNonce)) + } + l = len(m.TokenContract) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *BatchTxConfirmationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Signatures) > 0 { + for _, e := range m.Signatures { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *LastSubmittedEthereumEventRequest) 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 *LastSubmittedEthereumEventResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EventNonce != 0 { + n += 1 + sovQuery(uint64(m.EventNonce)) + } + return n +} + +func (m *ERC20ToDenomRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Erc20) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *ERC20ToDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.CosmosOriginated { + n += 2 + } + return n +} + +func (m *DenomToERC20ParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DenomToERC20ParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Erc20Name) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Erc20Symbol) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Erc20Decimals != 0 { + n += 1 + sovQuery(uint64(m.Erc20Decimals)) + } + return n +} + +func (m *DenomToERC20Request) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DenomToERC20Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Erc20) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.CosmosOriginated { + n += 2 + } + return n +} + +func (m *DelegateKeysByValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DelegateKeysByValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EthAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.OrchestratorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DelegateKeysByEthereumSignerRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EthereumSigner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DelegateKeysByEthereumSignerResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.OrchestratorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DelegateKeysByOrchestratorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrchestratorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DelegateKeysByOrchestratorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.EthereumSigner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DelegateKeysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *DelegateKeysResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DelegateKeys) > 0 { + for _, e := range m.DelegateKeys { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *BatchedSendToEthereumsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *BatchedSendToEthereumsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SendToEthereums) > 0 { + for _, e := range m.SendToEthereums { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *UnbatchedSendToEthereumsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + 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 *UnbatchedSendToEthereumsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SendToEthereums) > 0 { + for _, e := range m.SendToEthereums { + 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 *LastObservedEthereumHeightRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *LastObservedEthereumHeightResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.LastObservedEthereumHeight != nil { + l = m.LastObservedEthereumHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *CompletedBatchTxsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *CompletedBatchTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CompletedBatchTxs) > 0 { + for _, e := range m.CompletedBatchTxs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *CompletedContractCallTxsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *CompletedContractCallTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CompletedContractCallTxs) > 0 { + for _, e := range m.CompletedContractCallTxs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *CompletedSignerSetTxsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *CompletedSignerSetTxsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CompletedSignerSetTxs) > 0 { + for _, e := range m.CompletedSignerSetTxs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *BatchTxConfirmationsByValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *BatchTxConfirmationsByValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BatchTxConfirmations) > 0 { + for _, e := range m.BatchTxConfirmations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *ContractCallTxConfirmationsByValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *ContractCallTxConfirmationsByValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ContractCallTxConfirmations) > 0 { + for _, e := range m.ContractCallTxConfirmations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SignerSetTxConfirmationsByValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SignerSetTxConfirmationsByValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SignerSetTxConfirmations) > 0 { + for _, e := range m.SignerSetTxConfirmations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *EthereumEventVoteRecordsRequest) 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 *EthereumEventVoteRecordsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + 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 *EthereumEventVotesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *EthereumEventVotesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.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 *ParamsRequest) 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: ParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamsRequest: 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 *ParamsResponse) 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: ParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamsResponse: 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 *SignerSetTxRequest) 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: SignerSetTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignerSetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignerSetNonce", wireType) + } + m.SignerSetNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SignerSetNonce |= 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 *LatestSignerSetTxRequest) 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: LatestSignerSetTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LatestSignerSetTxRequest: 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 *SignerSetTxResponse) 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: SignerSetTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignerSetTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignerSet", 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.SignerSet == nil { + m.SignerSet = &SignerSetTx{} + } + if err := m.SignerSet.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 *BatchTxRequest) 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: BatchTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", 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.TokenContract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) + } + m.BatchNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BatchNonce |= 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 *BatchTxResponse) 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: BatchTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Batch", 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.Batch == nil { + m.Batch = &BatchTx{} + } + if err := m.Batch.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 *ContractCallTxRequest) 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: ContractCallTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractCallTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", 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.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) + if m.InvalidationScope == nil { + m.InvalidationScope = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + } + m.InvalidationNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InvalidationNonce |= 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 *ContractCallTxResponse) 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: ContractCallTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractCallTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogicCall", 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.LogicCall == nil { + m.LogicCall = &ContractCallTx{} + } + if err := m.LogicCall.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 *SignerSetTxConfirmationsRequest) 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: SignerSetTxConfirmationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignerSetTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignerSetNonce", wireType) + } + m.SignerSetNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SignerSetNonce |= 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 *SignerSetTxConfirmationsResponse) 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: SignerSetTxConfirmationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignerSetTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", 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.Signatures = append(m.Signatures, &SignerSetTxConfirmation{}) + if err := m.Signatures[len(m.Signatures)-1].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 *SignerSetTxsRequest) 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: SignerSetTxsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignerSetTxsRequest: 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 *SignerSetTxsResponse) 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: SignerSetTxsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignerSetTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignerSets", 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.SignerSets = append(m.SignerSets, &SignerSetTx{}) + if err := m.SignerSets[len(m.SignerSets)-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 } } - return n -} -func (m *BatchedSendToEthereumsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n + return nil } - -func (m *BatchedSendToEthereumsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SendToEthereums) > 0 { - for _, e := range m.SendToEthereums { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *BatchTxsRequest) 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 + } } - } - return n -} - -func (m *UnbatchedSendToEthereumsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - 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 *UnbatchedSendToEthereumsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SendToEthereums) > 0 { - for _, e := range m.SendToEthereums { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchTxsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchTxsRequest: 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 m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *LastObservedEthereumHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} -func (m *LastObservedEthereumHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LastObservedEthereumHeight != nil { - l = m.LastObservedEthereumHeight.Size() - n += 1 + l + sovQuery(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - 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)))) + return nil } -func (m *ParamsRequest) Unmarshal(dAtA []byte) error { +func (m *BatchTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6086,25 +9034,95 @@ func (m *ParamsRequest) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowQuery } - if iNdEx >= l { + 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: BatchTxsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Batches", 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.Batches = append(m.Batches, &BatchTx{}) + if err := m.Batches[len(m.Batches)-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 } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6126,7 +9144,7 @@ func (m *ParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ParamsResponse) Unmarshal(dAtA []byte) error { +func (m *ContractCallTxsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6149,15 +9167,15 @@ func (m *ParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ContractCallTxsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContractCallTxsRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6184,7 +9202,10 @@ func (m *ParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6209,7 +9230,7 @@ func (m *ParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignerSetTxRequest) Unmarshal(dAtA []byte) error { +func (m *ContractCallTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6232,17 +9253,17 @@ func (m *SignerSetTxRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignerSetTxRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ContractCallTxsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContractCallTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSetNonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Calls", wireType) } - m.SignerSetNonce = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6252,11 +9273,62 @@ func (m *SignerSetTxRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SignerSetNonce |= uint64(b&0x7F) << shift + 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.Calls = append(m.Calls, &ContractCallTx{}) + if err := m.Calls[len(m.Calls)-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:]) @@ -6278,7 +9350,7 @@ func (m *SignerSetTxRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *LatestSignerSetTxRequest) Unmarshal(dAtA []byte) error { +func (m *UnsignedSignerSetTxsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6301,12 +9373,44 @@ func (m *LatestSignerSetTxRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LatestSignerSetTxRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UnsignedSignerSetTxsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LatestSignerSetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UnsignedSignerSetTxsRequest: 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:]) @@ -6328,7 +9432,7 @@ func (m *LatestSignerSetTxRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignerSetTxResponse) Unmarshal(dAtA []byte) error { +func (m *UnsignedSignerSetTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6351,15 +9455,15 @@ func (m *SignerSetTxResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignerSetTxResponse: wiretype end group for non-group") + return fmt.Errorf("proto: UnsignedSignerSetTxsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UnsignedSignerSetTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignerSets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6386,10 +9490,8 @@ func (m *SignerSetTxResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SignerSet == nil { - m.SignerSet = &SignerSetTx{} - } - if err := m.SignerSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SignerSets = append(m.SignerSets, &SignerSetTx{}) + if err := m.SignerSets[len(m.SignerSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6414,7 +9516,7 @@ func (m *SignerSetTxResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchTxRequest) Unmarshal(dAtA []byte) error { +func (m *UnsignedBatchTxsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6437,15 +9539,15 @@ func (m *BatchTxRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchTxRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UnsignedBatchTxsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UnsignedBatchTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6473,27 +9575,8 @@ func (m *BatchTxRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenContract = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) - } - m.BatchNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6515,7 +9598,7 @@ func (m *BatchTxRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchTxResponse) Unmarshal(dAtA []byte) error { +func (m *UnsignedBatchTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6538,15 +9621,15 @@ func (m *BatchTxResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchTxResponse: wiretype end group for non-group") + return fmt.Errorf("proto: UnsignedBatchTxsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UnsignedBatchTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6573,10 +9656,8 @@ func (m *BatchTxResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Batch == nil { - m.Batch = &BatchTx{} - } - if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Batches = append(m.Batches, &BatchTx{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6601,7 +9682,7 @@ func (m *BatchTxResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContractCallTxRequest) Unmarshal(dAtA []byte) error { +func (m *UnsignedContractCallTxsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6624,51 +9705,17 @@ func (m *ContractCallTxRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContractCallTxRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UnsignedContractCallTxsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", 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.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) - if m.InvalidationScope == nil { - m.InvalidationScope = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + return fmt.Errorf("proto: UnsignedContractCallTxsRequest: 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) } - m.InvalidationNonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6678,11 +9725,24 @@ func (m *ContractCallTxRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.InvalidationNonce |= uint64(b&0x7F) << shift + 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:]) @@ -6704,7 +9764,7 @@ func (m *ContractCallTxRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContractCallTxResponse) Unmarshal(dAtA []byte) error { +func (m *UnsignedContractCallTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6727,15 +9787,15 @@ func (m *ContractCallTxResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContractCallTxResponse: wiretype end group for non-group") + return fmt.Errorf("proto: UnsignedContractCallTxsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UnsignedContractCallTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogicCall", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Calls", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6762,10 +9822,8 @@ func (m *ContractCallTxResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LogicCall == nil { - m.LogicCall = &ContractCallTx{} - } - if err := m.LogicCall.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Calls = append(m.Calls, &ContractCallTx{}) + if err := m.Calls[len(m.Calls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6790,7 +9848,7 @@ func (m *ContractCallTxResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignerSetTxConfirmationsRequest) Unmarshal(dAtA []byte) error { +func (m *BatchTxFeesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6813,31 +9871,12 @@ func (m *SignerSetTxConfirmationsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignerSetTxConfirmationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: BatchTxFeesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchTxFeesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSetNonce", wireType) - } - m.SignerSetNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignerSetNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6859,7 +9898,7 @@ func (m *SignerSetTxConfirmationsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignerSetTxConfirmationsResponse) Unmarshal(dAtA []byte) error { +func (m *BatchTxFeesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6882,15 +9921,15 @@ func (m *SignerSetTxConfirmationsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignerSetTxConfirmationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: BatchTxFeesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchTxFeesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fees", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6917,8 +9956,8 @@ func (m *SignerSetTxConfirmationsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Signatures = append(m.Signatures, &SignerSetTxConfirmation{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Fees = append(m.Fees, types.Coin{}) + if err := m.Fees[len(m.Fees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6943,7 +9982,7 @@ func (m *SignerSetTxConfirmationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignerSetTxsRequest) Unmarshal(dAtA []byte) error { +func (m *ContractCallTxConfirmationsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6966,17 +10005,17 @@ func (m *SignerSetTxsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignerSetTxsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ContractCallTxConfirmationsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContractCallTxConfirmationsRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6986,28 +10025,45 @@ func (m *SignerSetTxsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen 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 + m.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) + if m.InvalidationScope == nil { + m.InvalidationScope = []byte{} } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + } + m.InvalidationNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InvalidationNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7029,7 +10085,7 @@ func (m *SignerSetTxsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignerSetTxsResponse) Unmarshal(dAtA []byte) error { +func (m *ContractCallTxConfirmationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7052,49 +10108,15 @@ func (m *SignerSetTxsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignerSetTxsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ContractCallTxConfirmationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContractCallTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSets", 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.SignerSets = append(m.SignerSets, &SignerSetTx{}) - if err := m.SignerSets[len(m.SignerSets)-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) + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7121,10 +10143,8 @@ func (m *SignerSetTxsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Signatures = append(m.Signatures, &ContractCallTxConfirmation{}) + if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7149,7 +10169,7 @@ func (m *SignerSetTxsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchTxsRequest) Unmarshal(dAtA []byte) error { +func (m *BatchTxConfirmationsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7172,17 +10192,36 @@ func (m *BatchTxsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchTxsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: BatchTxConfirmationsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) + } + m.BatchNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BatchNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7192,27 +10231,23 @@ func (m *BatchTxsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen 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 - } + m.TokenContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7235,7 +10270,7 @@ func (m *BatchTxsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchTxsResponse) Unmarshal(dAtA []byte) error { +func (m *BatchTxConfirmationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7258,49 +10293,15 @@ func (m *BatchTxsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchTxsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: BatchTxConfirmationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", 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.Batches = append(m.Batches, &BatchTx{}) - if err := m.Batches[len(m.Batches)-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) + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7327,10 +10328,8 @@ func (m *BatchTxsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Signatures = append(m.Signatures, &BatchTxConfirmation{}) + if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7355,7 +10354,7 @@ func (m *BatchTxsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContractCallTxsRequest) Unmarshal(dAtA []byte) error { +func (m *LastSubmittedEthereumEventRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7378,17 +10377,17 @@ func (m *ContractCallTxsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContractCallTxsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: LastSubmittedEthereumEventRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LastSubmittedEthereumEventRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7398,27 +10397,23 @@ func (m *ContractCallTxsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen 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 - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7441,7 +10436,7 @@ func (m *ContractCallTxsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContractCallTxsResponse) Unmarshal(dAtA []byte) error { +func (m *LastSubmittedEthereumEventResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7464,51 +10459,17 @@ func (m *ContractCallTxsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContractCallTxsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: LastSubmittedEthereumEventResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LastSubmittedEthereumEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calls", 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.Calls = append(m.Calls, &ContractCallTx{}) - if err := m.Calls[len(m.Calls)-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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) } - var msglen int + m.EventNonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7518,28 +10479,11 @@ func (m *ContractCallTxsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.EventNonce |= uint64(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:]) @@ -7561,7 +10505,7 @@ func (m *ContractCallTxsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnsignedSignerSetTxsRequest) Unmarshal(dAtA []byte) error { +func (m *ERC20ToDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7584,15 +10528,15 @@ func (m *UnsignedSignerSetTxsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnsignedSignerSetTxsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ERC20ToDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedSignerSetTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ERC20ToDenomRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7620,7 +10564,7 @@ func (m *UnsignedSignerSetTxsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Erc20 = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7643,7 +10587,7 @@ func (m *UnsignedSignerSetTxsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnsignedSignerSetTxsResponse) Unmarshal(dAtA []byte) error { +func (m *ERC20ToDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7666,17 +10610,17 @@ func (m *UnsignedSignerSetTxsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnsignedSignerSetTxsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ERC20ToDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedSignerSetTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ERC20ToDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7686,26 +10630,44 @@ func (m *UnsignedSignerSetTxsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.SignerSets = append(m.SignerSets, &SignerSetTx{}) - if err := m.SignerSets[len(m.SignerSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CosmosOriginated = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7727,7 +10689,7 @@ func (m *UnsignedSignerSetTxsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnsignedBatchTxsRequest) Unmarshal(dAtA []byte) error { +func (m *DenomToERC20ParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7750,15 +10712,15 @@ func (m *UnsignedBatchTxsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnsignedBatchTxsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DenomToERC20ParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedBatchTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DenomToERC20ParamsRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7786,7 +10748,7 @@ func (m *UnsignedBatchTxsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7809,7 +10771,7 @@ func (m *UnsignedBatchTxsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnsignedBatchTxsResponse) Unmarshal(dAtA []byte) error { +func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7832,17 +10794,113 @@ func (m *UnsignedBatchTxsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnsignedBatchTxsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DenomToERC20ParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedBatchTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DenomToERC20ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) } - var msglen int + 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.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Name", 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.Erc20Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Symbol", 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.Erc20Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Erc20Decimals", wireType) + } + m.Erc20Decimals = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7852,26 +10910,11 @@ func (m *UnsignedBatchTxsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Erc20Decimals |= uint64(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.Batches = append(m.Batches, &BatchTx{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7893,7 +10936,7 @@ func (m *UnsignedBatchTxsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnsignedContractCallTxsRequest) Unmarshal(dAtA []byte) error { +func (m *DenomToERC20Request) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7916,15 +10959,15 @@ func (m *UnsignedContractCallTxsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnsignedContractCallTxsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DenomToERC20Request: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedContractCallTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DenomToERC20Request: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7952,7 +10995,7 @@ func (m *UnsignedContractCallTxsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7975,7 +11018,7 @@ func (m *UnsignedContractCallTxsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnsignedContractCallTxsResponse) Unmarshal(dAtA []byte) error { +func (m *DenomToERC20Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7998,17 +11041,17 @@ func (m *UnsignedContractCallTxsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnsignedContractCallTxsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DenomToERC20Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedContractCallTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DenomToERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calls", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8018,76 +11061,44 @@ func (m *UnsignedContractCallTxsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Calls = append(m.Calls, &ContractCallTx{}) - if err := m.Calls[len(m.Calls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Erc20 = 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 *BatchTxFeesRequest) 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 + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BatchTxFeesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxFeesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + m.CosmosOriginated = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8109,7 +11120,7 @@ func (m *BatchTxFeesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchTxFeesResponse) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysByValidatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8132,17 +11143,17 @@ func (m *BatchTxFeesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchTxFeesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysByValidatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxFeesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysByValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fees", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8152,25 +11163,23 @@ func (m *BatchTxFeesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Fees = append(m.Fees, types.Coin{}) - if err := m.Fees[len(m.Fees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8193,7 +11202,7 @@ func (m *BatchTxFeesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContractCallTxConfirmationsRequest) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysByValidatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8216,17 +11225,17 @@ func (m *ContractCallTxConfirmationsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContractCallTxConfirmationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysByValidatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysByValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8236,31 +11245,29 @@ func (m *ContractCallTxConfirmationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) - if m.InvalidationScope == nil { - m.InvalidationScope = []byte{} - } + m.EthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) } - m.InvalidationNonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8270,11 +11277,24 @@ func (m *ContractCallTxConfirmationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.InvalidationNonce |= uint64(b&0x7F) << shift + 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.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8296,7 +11316,7 @@ func (m *ContractCallTxConfirmationsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContractCallTxConfirmationsResponse) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysByEthereumSignerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8319,17 +11339,17 @@ func (m *ContractCallTxConfirmationsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContractCallTxConfirmationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysByEthereumSignerRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysByEthereumSignerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8339,25 +11359,23 @@ func (m *ContractCallTxConfirmationsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signatures = append(m.Signatures, &ContractCallTxConfirmation{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.EthereumSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8380,7 +11398,7 @@ func (m *ContractCallTxConfirmationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchTxConfirmationsRequest) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysByEthereumSignerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8403,17 +11421,17 @@ func (m *BatchTxConfirmationsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchTxConfirmationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysByEthereumSignerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysByEthereumSignerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - m.BatchNonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8423,14 +11441,27 @@ func (m *BatchTxConfirmationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift + 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8458,7 +11489,7 @@ func (m *BatchTxConfirmationsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenContract = string(dAtA[iNdEx:postIndex]) + m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8481,7 +11512,7 @@ func (m *BatchTxConfirmationsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchTxConfirmationsResponse) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysByOrchestratorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8504,17 +11535,17 @@ func (m *BatchTxConfirmationsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchTxConfirmationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysByOrchestratorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysByOrchestratorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8524,25 +11555,23 @@ func (m *BatchTxConfirmationsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Signatures = append(m.Signatures, &BatchTxConfirmation{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8565,7 +11594,7 @@ func (m *BatchTxConfirmationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *LastSubmittedEthereumEventRequest) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysByOrchestratorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8588,15 +11617,15 @@ func (m *LastSubmittedEthereumEventRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LastSubmittedEthereumEventRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysByOrchestratorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LastSubmittedEthereumEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysByOrchestratorResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8624,7 +11653,39 @@ func (m *LastSubmittedEthereumEventRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", 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.EthereumSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8647,7 +11708,7 @@ func (m *LastSubmittedEthereumEventRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *LastSubmittedEthereumEventResponse) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8670,31 +11731,12 @@ func (m *LastSubmittedEthereumEventResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LastSubmittedEthereumEventResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LastSubmittedEthereumEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) - } - m.EventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8716,7 +11758,7 @@ func (m *LastSubmittedEthereumEventResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ERC20ToDenomRequest) Unmarshal(dAtA []byte) error { +func (m *DelegateKeysResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8739,17 +11781,17 @@ func (m *ERC20ToDenomRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ERC20ToDenomRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DelegateKeysResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ERC20ToDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DelegateKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegateKeys", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8759,23 +11801,25 @@ func (m *ERC20ToDenomRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Erc20 = string(dAtA[iNdEx:postIndex]) + m.DelegateKeys = append(m.DelegateKeys, &MsgDelegateKeys{}) + if err := m.DelegateKeys[len(m.DelegateKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8798,7 +11842,7 @@ func (m *ERC20ToDenomRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ERC20ToDenomResponse) Unmarshal(dAtA []byte) error { +func (m *BatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8821,15 +11865,15 @@ func (m *ERC20ToDenomResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ERC20ToDenomResponse: wiretype end group for non-group") + return fmt.Errorf("proto: BatchedSendToEthereumsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ERC20ToDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchedSendToEthereumsRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8857,28 +11901,8 @@ func (m *ERC20ToDenomResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.SenderAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CosmosOriginated = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8900,7 +11924,7 @@ func (m *ERC20ToDenomResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DenomToERC20ParamsRequest) Unmarshal(dAtA []byte) error { +func (m *BatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8923,17 +11947,17 @@ func (m *DenomToERC20ParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DenomToERC20ParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: BatchedSendToEthereumsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20ParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchedSendToEthereumsResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field SendToEthereums", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8943,23 +11967,25 @@ func (m *DenomToERC20ParamsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.SendToEthereums = append(m.SendToEthereums, &SendToEthereum{}) + if err := m.SendToEthereums[len(m.SendToEthereums)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8982,7 +12008,7 @@ func (m *DenomToERC20ParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { +func (m *UnbatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9005,15 +12031,15 @@ func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DenomToERC20ParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: UnbatchedSendToEthereumsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UnbatchedSendToEthereumsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9041,13 +12067,13 @@ func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BaseDenom = string(dAtA[iNdEx:postIndex]) + m.SenderAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9057,29 +12083,83 @@ func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Erc20Name = string(dAtA[iNdEx:postIndex]) + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + 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 *UnbatchedSendToEthereumsResponse) 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: UnbatchedSendToEthereumsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbatchedSendToEthereumsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SendToEthereums", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9089,29 +12169,31 @@ func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Erc20Symbol = string(dAtA[iNdEx:postIndex]) + m.SendToEthereums = append(m.SendToEthereums, &SendToEthereum{}) + if err := m.SendToEthereums[len(m.SendToEthereums)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Decimals", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - m.Erc20Decimals = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9121,11 +12203,28 @@ func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Erc20Decimals |= uint64(b&0x7F) << shift + 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:]) @@ -9147,7 +12246,7 @@ func (m *DenomToERC20ParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DenomToERC20Request) Unmarshal(dAtA []byte) error { +func (m *LastObservedEthereumHeightRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9170,44 +12269,12 @@ func (m *DenomToERC20Request) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DenomToERC20Request: wiretype end group for non-group") + return fmt.Errorf("proto: LastObservedEthereumHeightRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20Request: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LastObservedEthereumHeightRequest: 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 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.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9229,7 +12296,7 @@ func (m *DenomToERC20Request) Unmarshal(dAtA []byte) error { } return nil } -func (m *DenomToERC20Response) Unmarshal(dAtA []byte) error { +func (m *LastObservedEthereumHeightResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9252,17 +12319,17 @@ func (m *DenomToERC20Response) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DenomToERC20Response: wiretype end group for non-group") + return fmt.Errorf("proto: LastObservedEthereumHeightResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LastObservedEthereumHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastObservedEthereumHeight", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9272,44 +12339,28 @@ func (m *DenomToERC20Response) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Erc20 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) + if m.LastObservedEthereumHeight == nil { + m.LastObservedEthereumHeight = &LatestEthereumBlockHeight{} } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.LastObservedEthereumHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.CosmosOriginated = bool(v != 0) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9331,7 +12382,7 @@ func (m *DenomToERC20Response) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysByValidatorRequest) Unmarshal(dAtA []byte) error { +func (m *CompletedBatchTxsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9354,44 +12405,12 @@ func (m *DelegateKeysByValidatorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysByValidatorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CompletedBatchTxsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CompletedBatchTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9413,7 +12432,7 @@ func (m *DelegateKeysByValidatorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysByValidatorResponse) Unmarshal(dAtA []byte) error { +func (m *CompletedBatchTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9436,17 +12455,17 @@ func (m *DelegateKeysByValidatorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysByValidatorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CompletedBatchTxsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CompletedBatchTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CompletedBatchTxs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9456,56 +12475,76 @@ func (m *DelegateKeysByValidatorResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.EthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) + m.CompletedBatchTxs = append(m.CompletedBatchTxs, &BatchTx{}) + if err := m.CompletedBatchTxs[len(m.CompletedBatchTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - 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 - } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CompletedContractCallTxsRequest) 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 } - m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + 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: CompletedContractCallTxsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CompletedContractCallTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9527,7 +12566,7 @@ func (m *DelegateKeysByValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysByEthereumSignerRequest) Unmarshal(dAtA []byte) error { +func (m *CompletedContractCallTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9550,17 +12589,17 @@ func (m *DelegateKeysByEthereumSignerRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysByEthereumSignerRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CompletedContractCallTxsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByEthereumSignerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CompletedContractCallTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CompletedContractCallTxs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9570,24 +12609,76 @@ func (m *DelegateKeysByEthereumSignerRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.EthereumSigner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.CompletedContractCallTxs = append(m.CompletedContractCallTxs, &ContractCallTx{}) + if err := m.CompletedContractCallTxs[len(m.CompletedContractCallTxs)-1].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 *CompletedSignerSetTxsRequest) 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: CompletedSignerSetTxsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CompletedSignerSetTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9609,7 +12700,7 @@ func (m *DelegateKeysByEthereumSignerRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysByEthereumSignerResponse) Unmarshal(dAtA []byte) error { +func (m *CompletedSignerSetTxsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9632,17 +12723,17 @@ func (m *DelegateKeysByEthereumSignerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysByEthereumSignerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CompletedSignerSetTxsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByEthereumSignerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CompletedSignerSetTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CompletedSignerSetTxs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9652,55 +12743,25 @@ func (m *DelegateKeysByEthereumSignerResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", 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.CompletedSignerSetTxs = append(m.CompletedSignerSetTxs, &SignerSetTx{}) + if err := m.CompletedSignerSetTxs[len(m.CompletedSignerSetTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9723,7 +12784,7 @@ func (m *DelegateKeysByEthereumSignerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysByOrchestratorRequest) Unmarshal(dAtA []byte) error { +func (m *BatchTxConfirmationsByValidatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9746,15 +12807,15 @@ func (m *DelegateKeysByOrchestratorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysByOrchestratorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: BatchTxConfirmationsByValidatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByOrchestratorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchTxConfirmationsByValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9782,7 +12843,7 @@ func (m *DelegateKeysByOrchestratorRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9805,7 +12866,7 @@ func (m *DelegateKeysByOrchestratorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysByOrchestratorResponse) Unmarshal(dAtA []byte) error { +func (m *BatchTxConfirmationsByValidatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9828,17 +12889,17 @@ func (m *DelegateKeysByOrchestratorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysByOrchestratorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: BatchTxConfirmationsByValidatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByOrchestratorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BatchTxConfirmationsByValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BatchTxConfirmations", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9848,55 +12909,25 @@ func (m *DelegateKeysByOrchestratorResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", 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.BatchTxConfirmations = append(m.BatchTxConfirmations, &BatchTxConfirmation{}) + if err := m.BatchTxConfirmations[len(m.BatchTxConfirmations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.EthereumSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9919,7 +12950,7 @@ func (m *DelegateKeysByOrchestratorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysRequest) Unmarshal(dAtA []byte) error { +func (m *ContractCallTxConfirmationsByValidatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9942,12 +12973,44 @@ func (m *DelegateKeysRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ContractCallTxConfirmationsByValidatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContractCallTxConfirmationsByValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9969,7 +13032,7 @@ func (m *DelegateKeysRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegateKeysResponse) Unmarshal(dAtA []byte) error { +func (m *ContractCallTxConfirmationsByValidatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9992,15 +13055,15 @@ func (m *DelegateKeysResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegateKeysResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ContractCallTxConfirmationsByValidatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContractCallTxConfirmationsByValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegateKeys", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContractCallTxConfirmations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10027,8 +13090,8 @@ func (m *DelegateKeysResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegateKeys = append(m.DelegateKeys, &MsgDelegateKeys{}) - if err := m.DelegateKeys[len(m.DelegateKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ContractCallTxConfirmations = append(m.ContractCallTxConfirmations, &ContractCallTxConfirmation{}) + if err := m.ContractCallTxConfirmations[len(m.ContractCallTxConfirmations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10053,7 +13116,7 @@ func (m *DelegateKeysResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { +func (m *SignerSetTxConfirmationsByValidatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10076,15 +13139,15 @@ func (m *BatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchedSendToEthereumsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SignerSetTxConfirmationsByValidatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchedSendToEthereumsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignerSetTxConfirmationsByValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10112,7 +13175,7 @@ func (m *BatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SenderAddress = string(dAtA[iNdEx:postIndex]) + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10135,7 +13198,7 @@ func (m *BatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { +func (m *SignerSetTxConfirmationsByValidatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10158,15 +13221,15 @@ func (m *BatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BatchedSendToEthereumsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SignerSetTxConfirmationsByValidatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BatchedSendToEthereumsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignerSetTxConfirmationsByValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SendToEthereums", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignerSetTxConfirmations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10193,8 +13256,8 @@ func (m *BatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SendToEthereums = append(m.SendToEthereums, &SendToEthereum{}) - if err := m.SendToEthereums[len(m.SendToEthereums)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SignerSetTxConfirmations = append(m.SignerSetTxConfirmations, &SignerSetTxConfirmation{}) + if err := m.SignerSetTxConfirmations[len(m.SignerSetTxConfirmations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10219,7 +13282,7 @@ func (m *BatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnbatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { +func (m *EthereumEventVoteRecordsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10242,45 +13305,13 @@ func (m *UnbatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnbatchedSendToEthereumsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: EthereumEventVoteRecordsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnbatchedSendToEthereumsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EthereumEventVoteRecordsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", 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.SenderAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -10337,7 +13368,7 @@ func (m *UnbatchedSendToEthereumsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnbatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { +func (m *EthereumEventVoteRecordsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10360,15 +13391,15 @@ func (m *UnbatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnbatchedSendToEthereumsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: EthereumEventVoteRecordsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnbatchedSendToEthereumsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EthereumEventVoteRecordsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SendToEthereums", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10395,8 +13426,8 @@ func (m *UnbatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SendToEthereums = append(m.SendToEthereums, &SendToEthereum{}) - if err := m.SendToEthereums[len(m.SendToEthereums)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Records = append(m.Records, &EthereumEventVoteRecord{}) + if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10457,7 +13488,7 @@ func (m *UnbatchedSendToEthereumsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *LastObservedEthereumHeightRequest) Unmarshal(dAtA []byte) error { +func (m *EthereumEventVotesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10480,12 +13511,44 @@ func (m *LastObservedEthereumHeightRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LastObservedEthereumHeightRequest: wiretype end group for non-group") + return fmt.Errorf("proto: EthereumEventVotesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LastObservedEthereumHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EthereumEventVotesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10507,7 +13570,7 @@ func (m *LastObservedEthereumHeightRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *LastObservedEthereumHeightResponse) Unmarshal(dAtA []byte) error { +func (m *EthereumEventVotesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10530,15 +13593,15 @@ func (m *LastObservedEthereumHeightResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LastObservedEthereumHeightResponse: wiretype end group for non-group") + return fmt.Errorf("proto: EthereumEventVotesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LastObservedEthereumHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EthereumEventVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastObservedEthereumHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10565,10 +13628,8 @@ func (m *LastObservedEthereumHeightResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LastObservedEthereumHeight == nil { - m.LastObservedEthereumHeight = &LatestEthereumBlockHeight{} - } - if err := m.LastObservedEthereumHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Events = append(m.Events, &types1.Any{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/orchestrator/cosmos_gravity/src/query.rs b/orchestrator/cosmos_gravity/src/query.rs index 2c1e4ef4b..9624f7e1f 100644 --- a/orchestrator/cosmos_gravity/src/query.rs +++ b/orchestrator/cosmos_gravity/src/query.rs @@ -1,3 +1,5 @@ +use std::cmp::Ordering; + use deep_space::address::Address; use ethers::types::Address as EthAddress; use gravity_proto::gravity::query_client::QueryClient as GravityQueryClient; @@ -32,7 +34,8 @@ pub async fn get_oldest_unsigned_valsets( address: address.to_string(), }) .await?; - let valsets = response.into_inner().signer_sets; + let mut valsets = response.into_inner().signer_sets; + valsets.sort_by(|a, b| a.nonce.cmp(&b.nonce)); // convert from proto valset type to rust valset type let valsets = valsets.iter().map(|v| v.clone().into()).collect(); Ok(valsets) @@ -77,7 +80,9 @@ pub async fn get_oldest_unsigned_transaction_batch( address: address.to_string(), }) .await?; - let batches = extract_valid_batches(request.into_inner().batches); + let mut batches = extract_valid_batches(request.into_inner().batches); + batches.sort_by(|a, b| a.nonce.cmp(&b.nonce)); + let batch = batches.get(0); match batch { Some(batch) => Ok(Some(batch.clone())), @@ -93,7 +98,10 @@ pub async fn get_latest_transaction_batches( let request = client .batch_txs(BatchTxsRequest { pagination: None }) .await?; - Ok(extract_valid_batches(request.into_inner().batches)) + let mut batches = request.into_inner().batches; + batches.sort_by(|a, b| a.batch_nonce.cmp(&b.batch_nonce)); + + Ok(extract_valid_batches(batches)) } // If we can't serialize a batch from a proto, but it was committed to the chain, @@ -193,7 +201,9 @@ pub async fn get_oldest_unsigned_logic_call( address: address.to_string(), }) .await?; - let calls = request.into_inner().calls; + let mut calls = request.into_inner().calls; + // sort by nonce ascending + calls.sort_by(|a, b| a.invalidation_nonce.cmp(&b.invalidation_nonce)); let mut out = Vec::new(); for call in calls { out.push(LogicCall::from_proto(call)?) diff --git a/orchestrator/gravity_proto/src/prost/gravity.v1.rs b/orchestrator/gravity_proto/src/prost/gravity.v1.rs index 8b22404fc..cf7d6df6f 100644 --- a/orchestrator/gravity_proto/src/prost/gravity.v1.rs +++ b/orchestrator/gravity_proto/src/prost/gravity.v1.rs @@ -156,7 +156,7 @@ pub struct MsgSendToEthereumResponse { #[prost(uint64, tag = "1")] pub id: u64, } -/// MsgCancelSendToEthereum allows the sender to cancel its own outgoing +/// MsgCancelSendToEthereum allows the sender to cancel its own unbatched /// SendToEthereum tx and recieve a refund of the tokens and bridge fees. This tx /// will only succeed if the SendToEthereum tx hasn't been batched to be /// processed and relayed to Ethereum. @@ -169,17 +169,6 @@ pub struct MsgCancelSendToEthereum { } #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCancelSendToEthereumResponse {} -/// MsgRequestBatchTx requests a batch of transactions with a given coin -/// denomination to send across the bridge to Ethereum. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRequestBatchTx { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub signer: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRequestBatchTxResponse {} /// MsgSubmitEthereumTxConfirmation submits an ethereum signature for a given /// validator #[derive(Clone, PartialEq, ::prost::Message)] @@ -421,20 +410,6 @@ pub mod msg_client { let path = http::uri::PathAndQuery::from_static("/gravity.v1.Msg/CancelSendToEthereum"); self.inner.unary(request.into_request(), path, codec).await } - pub async fn request_batch_tx( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/gravity.v1.Msg/RequestBatchTx"); - self.inner.unary(request.into_request(), path, codec).await - } pub async fn submit_ethereum_tx_confirmation( &mut self, request: impl tonic::IntoRequest, @@ -603,6 +578,8 @@ pub struct Params { pub slash_fraction_conflicting_ethereum_signature: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "17")] pub unbond_slashing_signer_set_txs_window: u64, + #[prost(uint64, tag = "18")] + pub event_vote_window: u64, } /// GenesisState struct /// TODO: this need to be audited and potentially simplified using the new @@ -936,6 +913,80 @@ pub struct LastObservedEthereumHeightResponse { #[prost(message, optional, tag = "1")] pub last_observed_ethereum_height: ::core::option::Option, } +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompletedBatchTxsRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompletedBatchTxsResponse { + #[prost(message, repeated, tag = "1")] + pub completed_batch_txs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompletedContractCallTxsRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompletedContractCallTxsResponse { + #[prost(message, repeated, tag = "1")] + pub completed_contract_call_txs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompletedSignerSetTxsRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompletedSignerSetTxsResponse { + #[prost(message, repeated, tag = "1")] + pub completed_signer_set_txs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BatchTxConfirmationsByValidatorRequest { + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BatchTxConfirmationsByValidatorResponse { + #[prost(message, repeated, tag = "1")] + pub batch_tx_confirmations: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ContractCallTxConfirmationsByValidatorRequest { + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ContractCallTxConfirmationsByValidatorResponse { + #[prost(message, repeated, tag = "2")] + pub contract_call_tx_confirmations: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignerSetTxConfirmationsByValidatorRequest { + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignerSetTxConfirmationsByValidatorResponse { + #[prost(message, repeated, tag = "3")] + pub signer_set_tx_confirmations: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EthereumEventVoteRecordsRequest { + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EthereumEventVoteRecordsResponse { + #[prost(message, repeated, tag = "1")] + pub records: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub pagination: + ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EthereumEventVotesRequest { + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EthereumEventVotesResponse { + #[prost(message, repeated, tag = "1")] + pub events: ::prost::alloc::vec::Vec<::prost_types::Any>, +} #[doc = r" Generated client implementations."] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs)] @@ -1376,6 +1427,136 @@ pub mod query_client { ); self.inner.unary(request.into_request(), path, codec).await } + pub async fn completed_signer_set_txs( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/gravity.v1.Query/CompletedSignerSetTxs"); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn completed_batch_txs( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/gravity.v1.Query/CompletedBatchTxs"); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn completed_contract_call_txs( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/gravity.v1.Query/CompletedContractCallTxs"); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn batch_tx_confirmations_by_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/gravity.v1.Query/BatchTxConfirmationsByValidator", + ); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn contract_call_tx_confirmations_by_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/gravity.v1.Query/ContractCallTxConfirmationsByValidator", + ); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn signer_set_tx_confirmations_by_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/gravity.v1.Query/SignerSetTxConfirmationsByValidator", + ); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn ethereum_event_vote_records( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/gravity.v1.Query/EthereumEventVoteRecords"); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn ethereum_event_votes( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/gravity.v1.Query/EthereumEventVotes"); + self.inner.unary(request.into_request(), path, codec).await + } } impl Clone for QueryClient { fn clone(&self) -> Self { diff --git a/orchestrator/relayer/src/batch_relaying.rs b/orchestrator/relayer/src/batch_relaying.rs index 470a2ee4c..698dea9cb 100644 --- a/orchestrator/relayer/src/batch_relaying.rs +++ b/orchestrator/relayer/src/batch_relaying.rs @@ -107,11 +107,7 @@ async fn get_batches_and_signatures( ); } } - // reverse the list so that it is oldest first, we want to submit - // older batches so that we don't invalidate newer batches - possible_batches.par_iter_mut().for_each(|(_key, value)| { - value.reverse(); - }); + possible_batches }